I have been playing about with the EasyMXPro for STM32 dev. board from Microelektronica. I am trying to create a simple monophonic wavetable synth using the DAC, playable via. a MIDI keyboard, however, I have the following problems:
I have a loop that cycles through the wavetable values (at the speed of the MCU clock). The rate at which the program cycles through the array obviously gives me an incorrect frequency to that of the fundamental frequency of the sine wave in the wavetable. What is the best way to delay/speed up the execution of the program for each sample in the array, given that I need to cycle through the array at different rates for different notes on the keyboard? I have tried using a simple delay, however for each change in note frequency, the delay amount has to change specifically. Is there an easier way to do this that I have not thought about (perhaps using timers)?
Thanks in advance for any helpful answers!
No comments:
Post a Comment