I've built a synth playing multiple soundfonts using the wavetable.playNote() function. However I need to "Fine Tune" the pitch of the synth to other non-electronic instruments and I've not been able to find any way to do this. The wavetable object does not seem to have a "fine tune" or even "pitch bend" function. The "Fine Tuning (cents)" information for each sample is defined in the soundfont file, and that pitch information is transferred to Teensy using the Teensy Soundfont Decoder, so it's possible to tune the soundfont at it's source before exporting it to Teensy, but this is not practical each time a tuning is needed. I don't believe that any of the "frequency" functions are useful as we want to maintain the integrity of the musical note pitches the wavetable is playing. The only way I can see at present is to somehow modify the 4th item in the instrument.cpp descriptor, (per hz phase increment):
(1 << (32 - 14)) * WAVETABLE_CENTS_SHIFT(-57) * 44100.0 / WAVETABLE_NOTE_TO_FREQUENCY(40) / AUDIO_SAMPLE_RATE_EXACT + 0.5,
However this does not seem to be a clean solution. Does anyone know of a way to fine tune the pitch of notes playing in the wavetable?
(1 << (32 - 14)) * WAVETABLE_CENTS_SHIFT(-57) * 44100.0 / WAVETABLE_NOTE_TO_FREQUENCY(40) / AUDIO_SAMPLE_RATE_EXACT + 0.5,
However this does not seem to be a clean solution. Does anyone know of a way to fine tune the pitch of notes playing in the wavetable?