Hi all,
First post so go easy on me!
I have encountered an issue when using JUCE demo code for creating audio waveforms. It is that the pitch of the waveform appears to become inaccurate at higher frequencies.
I am using as my waveform starting point the code from the standard JUCE tutorial project SynthUsingMidiInputTutorial:
https://docs.juce.com/master/tutorial_synth_using_midi_input.html
I won’t reproduce the code here as it can easily be seen in the segments of this tutorial, specifically the ‘Starting A Voice’ and ‘Rendering A Voice’ code blocks.
To give an example: the sine wave notes C6 and C7 are not octaves of each other when played. The C7 is flat by about a semitone. (C#7 is actually closer to being an octave of C6.)
I am guessing that the issue relates somehow to the fact that at higher frequencies there are fewer sample points for a cycle and therefore accuracy is attenuated.
I’m not expecting anyone to write code to solve this problem for me, all I would like is some directional pointers so I can fix this issue.
FWIW, though I doubt it is too important here, I am running JUCE on Apple Silicone with macOS Ventura.
Thanks in advance,
theSurfDoc