Self reply fail but it’s a big enough update I thought it better to separate things. The above I think actually does work but very quickly I run into having to interpolate since most pitches won’t divide nicely between my sample size of 32 and whatever the actual audio rate is.
I noticed this post mentions being able to set the sample rate to arbitrary values, but would be limited between 8kHz to 96kHz. If I could set the sample rate to literally whatever I wanted, I can avoid all the problems of above without interpolating.
I noticed CV_OUTs appear to be using a 12-bit DAC based on their range (0-4095). Thinking since I want lofi output, I’m wondering if I could just use SetCvOut1(val) instead as my actual audio output and then use the sampling rate to control pitch.
For example, A0 (27.5Hz) at 32 samples would be a sample rate of 880Hz. For A4 (440Hz),14.08kHz on up to as far as the Daisy could update the CV_OUT.
This actually works closer to how the GameBoy’s wave channel worked, which is what I’m basing my design off of. The GB uses countdown timers where the setting of the timer is varied according to pitch.