[sdiy] [synth-diy] numerically controlled superoscillator without hard sync
cheater00 at gmail.com
Sun Feb 9 23:06:26 CET 2014
On Sun, Feb 9, 2014 at 9:54 PM, <rsdio at sounds.wa.com> wrote:
> On Feb 9, 2014, at 12:13, Declare Update wrote:
>> I have recently been pondering this same idea! I was thinking you'd have a
>> pin change trigger an ISR, which just increments the index to a wave table.
>> So you're driving vco would have to be the size of your array * desired
>> frequency. Clocking the actual micro is an option i guess, but as Tom points
>> out, that's pretty fast!
> Instead of an ISR, this external pin could trigger a DMA transfer. You'll be
> able to handle more voices this way because they require no instructions to
> be executed. The DMA automatically increments the index, and can even wrap
> around. Instead of an interrupt per sample, you just get an interrupt when
> the wave table ends, or you can even have complex bidirectional loops in the
> middle of the wave table by linking DMA transfers back-to-back.
> The TMS320 C5500 family has 6 channels of DMA, so it might actually be able
> to handle 6 voices in one chip (12 voice in two chips!). With only 3 serial
> ports, it might be difficult to have 6 DAC chips attached, but you do have
> the option of parallel DAC interfaces instead of serial. I suppose it's
> possible to share a pair of DAC chips on each of the 3 serial ports, but I
> haven't tried that. Other processors would have a different number of DMA
> channels, serial ports, and I/O configuration options.
> On Feb 9, 2014, at 12:32, Mattias Rickardsson wrote:
>> On 9 February 2014 18:08, cheater00 . <cheater00 at gmail.com> wrote:
>>> The variable sample rate oscillator could also contain things like
>>> filters and other stuff. A whole VA could be implemented, and aliasing
>>> is not an issue at all.
>> Multiple oscillators per voice is nice, at least so I've heard. ;-)
>> Could this be incorporated without having to duplicate everything?
> See above. Using multiple external oscillators and multiple DMA channels,
> you can handle multiple voices. Also, the DSP clock speed can remain at it's
> maximum, allowing for more processing, while only individual DMA channels
> slow down to alter the sample rate of their voices.
Just to clarify, DSP clock can be constant-rate whether you use ISR or
DMA. But DMA sounds like a much better idea.
>> And how about other behaviours that makes oscillators have tricky
>> frequencies... like PWM, where the oscillator is still but the
>> percieved pitch varies due to the modulation. How does the harmonic
>> aliasing behave there? Is all still well?
> The problem with PWM is that it's even worse than a square wave.
> When you generate a square wave as a wave table by just plugging in values,
> the discontinuity when it jumps from the bottom to the top, and from the top
> to the bottom, creates an infinite series of harmonics. But the harmonics
> above Nyquist can't really be reproduced at their actual frequency, so they
> are reproduced as aliased frequencies that aren't part of the real square
> wave. That's why a (poorly implemented) digital square wave sample sounds
> "digital" compared to an actual analog square wave circuit. But this can be
> fixed in the digital version by summing sines instead of naively filling in
> the sample values with discontinuities.
> PWM has the same problem with discontinuities in the digital domain, but
> it's worse because the aliased frequencies are shifting all around. I don't
> know of a simple way to create a PWM waveform by sum of sines, because of
> the changing pulse width, so I don't know how to avoid the aliases.
You add two sums of sines for saw waves, one is offset by an amount of
samples. Pretty much like in analog synthesis.
> Does the
> David Jaffe article on band-limited waveform generation cover this topic?
More information about the Synth-diy