Page 3 of 3

Re: Dual LFO with choice of waveforms using PT8211 and Blue Pill

Posted: Wed Nov 29, 2017 11:28 pm
by RogerClark
I presume you will need to control the speed at which the DMA sends the wave table, otherwise you will have no control over the frequency of the output waveform, as it will just go as fast as the DMA can push it to the SPI bus, i.e 36Mhz if you want...

Re: Dual LFO with choice of waveforms using PT8211 and Blue Pill

Posted: Wed Nov 29, 2017 11:49 pm
by KenLaszlo
Well this appears to be the thing :)

My approach was that the frequency was controlled by a phase accumulator variable, rather than a set frequency in which data is sent via DMA.
So (in simple terms) the data send rate is set, but the amount of samples being sent changes.
In fact, I have done just this. I have written some code for a VCO (DCO) running with multiple waveforms output up to about 12Khz and fully controllable. The problem is . . . terrible aliasing for anything above 1.2Khz caused by not being able to run at a high-enough sample rate.

Ken

Re: Dual LFO with choice of waveforms using PT8211 and Blue Pill

Posted: Thu Nov 30, 2017 12:24 am
by RogerClark
I didnt look at your code, but are you interpolating values your wavetable ? to generate extra data ?

I'm no expert in this, but I presume to get the best resolution on the output, you always need to run at the max sample rate and build the DMA buffer accordingly, e.g. by interpolating intermediate value between those in your wavetables

However depending on your interpolation algorithm and how many points you'd need to create, the processor speed will be the limitation.