[sdiy] Korg DSS1 DMA oscillators, the old beast!

Tom Wiltshire tom at electricdruid.net
Sat Jan 23 16:53:47 CET 2010


On 23 Jan 2010, at 15:46, karl dalen wrote:
>
> It seams your trying to implement such a DMA sample
> oscillator mechanism, the very same i was asking about?
>
> So by fiddling with the DMA transfer interrupt rate one gets
> a DMA driven oscillator? (yes we already know DMA was intended
> to be used for fast data transfer).
>
> Ai'nt that a very inefficient implementation?
>
> There seams to be a *interesting app* for the dspic DMA, a transfer  
> can
> be trigged by a Timer event! :-)

No, sorry. I'm being much more conventional than that.
I'm generating audio samples in blocks of sixteen. This is more  
efficient because I only have to do one set up for sixteen samples,  
and I can make better use of pointers and DSP instructions.
I then need the DMA to move those samples from the DPSRAM to the DAC  
in a timely manner (e.g. at the fixed sample rate). The DMA is  
operating in "ping-pong" mode, which means it uses two buffers. It  
reads one, generates an interrupt when it's finished, then reads the  
other, generates an interrupt, etc etc.
I use the DMA interrupts to set a flag telling the main code that one  
of the buffers is empty. The main code then runs its sample  
generation routine and refills it.
At least, that's the theory. I haven't got it working yet, as I said.

T.




More information about the Synth-diy mailing list