TR123e - EMCT Computing Final Project Version 1.0
Research Project Translation from gen~ to embedded Moog synth
Loading...
Searching...
No Matches
KeyFollow.h File Reference

Keyboard tracking module for filter frequency modulation. More...

Go to the source code of this file.

Classes

class  KeyFollow
 Implements keyboard tracking for filter frequency modulation. More...

Detailed Description

Keyboard tracking module for filter frequency modulation.

This module implements keyboard tracking (key follow) functionality commonly found in analog synthesizers. It provides proportional filter cutoff frequency adjustment based on the played MIDI note number, ensuring consistent timbre across the keyboard range.

@theory_background In acoustic instruments, higher pitched notes naturally contain more high-frequency content. To maintain consistent perceived brightness across the keyboard, synthesizer filters traditionally open proportionally with higher notes. This module implements this behavior using configurable tracking intensity.

@mathematical_model Output = (max(0, note - 36) * 0.33 + 36) * tracking_amount

Where:

  • Note 36 (C2) serves as the reference frequency (0 Hz offset)
  • 0.33 scaling factor provides musically appropriate tracking slope
  • Linear mapping ensures predictable frequency relationships

@performance_characteristics

  • Computational complexity: O(1) constant time
  • Memory footprint: Single float member variable
  • Real-time safe: No dynamic allocation or blocking operations
  • Thread safe: Stateless processing with atomic parameter updates
Author
Timothy Paul Read
Date
2025/03/10
Version
1.0 @license Provided as-is without warranty, free for commercial/non-commercial use