In the meantime, here's a teaser - the first video of my synth running. I was at the inaugural Raspberry Jam in Bristol 3 days ago, and committed to a few people there that the synth, under development for a few weeks, would be up and running on a Raspberry Pi before the end of the week. And here we are.
The MIDI interface isn't in place yet (I couldn't find the right bits of ALSA last night so just injected a rising test sequence), it should be playable by the end of the week.
Features - she is currently 4 note polyphonic. The target after optimization (and possibly overclocking!) is 8 notes. She - she is definitely a she - has two oscillators, two LFOs, four Envelope Generators for each of VCA, VCF, Noise and Phase Distortion control. The EGs are not ADSR but ADSλR, where λ is the sustain half-life. The use of the Greek alphabet allows the decay of a held note independent of the D setting, and yields beautiful piano-style envelopes. Plus it makes me look quite clever. The two oscillators offer slightly different shapes of the fundamental waveforms - one saw is tighter and more spiky than the other, one square is rounder, one has an impure sin and one has a triangle - which makes adding and ring modulating more interesting. I forgot, she has a ring modulator, allowing an arbitrary blend of A+B and A*B. And a noise generator.
Beyond the harmonics of the oscillators themselves, additional harmonic richness is injected by Phase Distortion of the waveforms. Aliasing is managed by some deeply clever stuff, plus the final edge is taken off by running at 88.2kHz and downsampling to 44.1kHz. Each note has a 4th order resonant low-pass filter capable of self-oscillation.
The modulation system is rather bonkers, and features a bytecode interpreter with a stupidly small instruction set, but rich outputs. Any modulated output can be driven by a reasonably complex program - up to 32 bytecodes - with any modulation input as parameters to a set of multiply and add instructions. Modulation inputs being any of the EGs, the LFOs, magic keywords such as 'KEYFOLLOW' to guarantee a tuned filter response, constant such as 0.1, 3/4, 4/3, -1.0 - it's wild and crazy and great. And a bugger to program, hence the 'templated' approach, where 16 preselected algorithms have been set up as templates and illustrated as vector diagrams on the right hand side of the display, giving you the modulation matrix at a glance. Well, a glance, a frown and some following of pale blue lines with your fingers ...
And as you can see, there is a cool OpenGL ES accelerated user interface featuring a neat oscilloscope.
In the meantime, here's 30 seconds of video where very little happens ...
And all this - oscillators being alias-managed, bonkers modulation, Moogy rolloff filters, GPU interface with tons of oscilloscope vertices bouncing around in real time - all of this runs on a stock, unoverclocked, 700MHz Raspberry Pi.
It really does sound pretty great, and next week's videos will show that. Rather than being captured on an iPod under low-light conditions so looking horrible and sounding like a wasp trapped in a kettle. But forgive the video quality, it was 11.00 p.m. and I just wanted to celebrate a job well done and get some sleep.
And for those of you reading with eyes blinded by sheer, undiluted 21st century cynicism - yes, there have been compromises to get here. It has fewer oscillators than a Moog. It will at best only ever be 8 note polyphonic. But at every single compromise point where a quality-vs-anything decision had to be made, audio quality was selected above anything else. And yes, it may need to be overclocked to hit 8 note polyphony, and yes, it may yet need to be cranked down to a mere 32kHz (downsampled from 64) to hit the 8 note target. But even if it does - flippin' eck boys and girls, it's a whole polysynth. And only your nerdiest friends will be able to detect that it's not really analog. Seriously folks - this is about £30 for the entire hardware component of a polysynth tone generator.
Talk about Moog on a budget ... and lest ye forget, a Moog Slim Phatty - the benchmark of gorgeous, rich analog synth technology, and like the Raspberry Pi Synthesizer a keyboardless tone generator - is over £600, and it plays one note at a time.