[sdiy] [synth-diy] numerically controlled superoscillator without hard sync

rsdio at sounds.wa.com rsdio at sounds.wa.com
Sun Feb 9 21:34:35 CET 2014


This project reminds me of the article where one of the Prophet VS  
engineers talks about their variable rate digital oscillators, and  
how all of these unexpected aliased frequencies created a shimmer of  
interesting high frequencies.

You really have to be careful about oversimplifying your predictions  
about aliasing. If you only wanted to generate pure sine waves at the  
fundamental, then you're probably right about the aliasing only being  
innocuous harmonics. But it gets complex when you add increasing  
overtones, because they reflect around the sample rate to produce  
aliases at decreasing frequencies. I suppose it's not so bad, because  
you can predict the contribution of the unwanted harmonics and  
possibly use them to your advantage in building a tone. I've dealt  
with situations where all of my frequencies were pure divisions of  
the sample rate, but I needed to detect these same frequencies via A/ 
D, and the aliases made it hard to tell whether I was picking up the  
desired signal or an unwanted alias of a different signal. Maybe it's  
not so bad if you don't care about analysis and are willing to put up  
with the aliases, which should be similar to the Prophet VS. I'm  
pretty sure that the VS has variable rate digital oscillators that  
produce a bunch of aliased frequencies, at least for many of the  
waveforms.

One thing's for sure: if you draw simple waveforms like square, ramp,  
etc., then you'll have awful aliasing. But if you generate those  
general shapes by creating the samples as sums of pure sines, and  
don't go over Nyquist in your harmonic series, then aliasing will be  
almost gone. These summed waveforms can be pre-computed, so you don't  
really need to do it in real time.

The PIC is a fine processor, but for this task you want a real DSP.  
Something like the TMS320, or maybe the SHARC. The reason is that you  
get far more useful signal generating power per clock cycle. There  
are TMS320 chips in the C5000 series up to 300 MHz that still run off  
USB power. Pricing is $2 to $10. If you need more power, the C6000  
and DSP+ARM (OMAP) chips go up to 1 GHz, but range in cost from $5 to  
$25. I haven't tried feeding them with an oscillator rather than a  
crystal, but I suppose it should work.

By the way, distortion in the analog sections (after the DAC) can  
become very important, because then you start getting harmonic  
distortion of the aliased frequencies. Harmonic distortion adds  
frequencies that weren't there before, so your aliased frequencies  
become more prominent when distorted along with the desired  
frequencies. Then again, controlled grunge can be quite interesting.

Brian Willoughby
Sound Consulting


On Feb 9, 2014, at 11:38, Tom Wiltshire wrote:
> Hi Damian,
>
> This is a good idea. I think it came up in a discussion some time  
> ago about the PPG - a famous variable sample rate instrument. We  
> were considering possible ways to do something similar, and this  
> approach was mooted.
>
> It really does have a lot going for it - you could do wave shaping,  
> or phase distortion, or whatever, and as you say, any aliasing  
> products can be forced to remain harmonic. The advantages of this  
> can't really be overstated.
>
> I don't think the reconstruction filter is a massive issue either,  
> since whatever sample rate you're using, you need to make sure it's  
> sufficient for a decent audio quality - so say 48KHz or above. This  
> means you're looking at designing a sharp anti-aliasing filter at  
> around 24KHz - not impossible. Obviously getting a couple more  
> octaves between the top of the audio range and the lowest sample  
> rate would be nice, but that gets more demanding for the VCO.
>
> And that's the problem. The VCO. You've got to run the uP at  
> sufficient speed to get plenty of samples per wave cycle out of it  
> - say 128 as a binary-friendly minimum. You need a certain number  
> of processor instructions to calculate each sample, say 200. So  
> we're looking at 128x200 = 25600 instructions per wave cycle. The  
> PIC (for example) needs a clock at 4x the instruction rate, but  
> let's assume a single clock per instruction. For a full MIDI range,  
> your VCO has to cover 8.176Hz x 25600 = 209,306Hz to
> 12,543.8 x 25600 = 321,121,280Hz. That's a pretty big ask,  
> unfortunately.
>
> Paul Maddox's Monowave worked on this variable-rate principle  
> (though without a uP doing the synthesis), and he made the job  
> manageable by limiting the highest output frequency to around 4KHz  
> - e.g if you knock a couple of octaves off the top, that helps!
>
> I've thought about this a fair bit, 'cos I'd love it if it worked.  
> So if there's something crucial I'm missing, do please speak up.
>
> On 9 Feb 2014, at 17:08, cheater00 . <cheater00 at gmail.com> wrote:
>> thinking about this recently, one could use a high-frequency
>> oscillator, and use it as the clock for a microcontroller which
>> assuredly outputs a single sample every n clocks. This way you can
>> perform VA style synthesis where the time base is derived from an
>> analog oscillator that can perform FM and other neat analog  
>> tricks. On
>> the other hand the uC only has to synthesize at a single  
>> frequency. So
>> say it's always synthesizing at A440, and you change the pitch by
>> changing how fast it executes its algorithm, i.e. by changing the
>> clock, i.e. by changing the sampling frequency. This way, externally
>> (i.e. at the output of the DAC) the aliases are always precisely at
>> the same position in relation to the base frequency of the note being
>> played. The aliases become part of the timbre, enriching it. This is
>> in contrast to aliasing in a system where the sampling frequency is
>> fixed, and the pitch of the note being synthesized is changed in the
>> usual way. In this case, which doesn't happen here, the aliases  
>> are at
>> a different position for every pitch, and therefore the oscillator  
>> not
>> only plays your desired melody, but also a quieter, undesired melody
>> which is completely out of tune and works against your music.
>>
>> 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.
>>
>> The only thing you need to ensure is that your reconstruction filter
>> works well with a variable sample rate.
>



More information about the Synth-diy mailing list