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

Real-time pitch interpolation engine for smooth frequency transitions. More...

Go to the source code of this file.

Classes

class  PortamentoPlayer
 High-precision frequency interpolation engine for musical portamento. More...

Detailed Description

Real-time pitch interpolation engine for smooth frequency transitions.

This module implements sophisticated pitch interpolation algorithms for creating smooth frequency transitions between musical notes. The system provides sample-accurate pitch sliding with configurable timing, supporting both linear and exponential interpolation methods appropriate for different musical contexts.

@mathematical_foundation The implementation uses linear frequency interpolation in Hertz domain rather than logarithmic (semitone) domain for computational efficiency. While logarithmic interpolation would be more perceptually accurate, linear interpolation provides acceptable results for typical portamento times (50-500ms) while maintaining real-time performance.

@frequency_conversion_theory MIDI note to frequency conversion follows the equal temperament formula:

f(n) = 440 × 2^((n-69)/12)

Where:

  • f(n) = frequency in Hz
  • n = MIDI note number
  • 440 Hz = A4 reference frequency (MIDI note 69)
  • 12 = semitones per octave in equal temperament

@interpolation_analysis Linear interpolation formula: f(t) = f₀ + (f₁ - f₀) × (t/T)

Where:

  • f₀ = starting frequency
  • f₁ = target frequency
  • t = elapsed time
  • T = total portamento duration

@performance_characteristics

  • Sample rate independence: Adapts to any audio sample rate
  • Computational complexity: O(1) per sample processing
  • Memory footprint: ~32 bytes object size
  • Numerical stability: IEEE 754 compliant arithmetic
Author
Timothy Paul Read
Date
2025/03/10 @organization AABSTRKT at play via gaialive.com
Version
1.0