[sdiy] Wavetable Design Update

Matthew Smith matt at smiffytech.com
Wed Feb 2 07:28:52 CET 2011


Hi Folks

Starting to make some headway with my design.

The 'oscillator' is actually 6 oscillators at this point. I'd always 
intended to have sub-octave outputs, but I decided to have a detunable 
second oscillator ALSO with sub-octave outputs. Or whatever - this will 
be my main configuration, but each unit will be identical and can thus 
be assigned to do whatever I wish.

This requires 6 AVR devices - ATTINY2313 if I can solve some code size 
issues - running at 20MHz. The code in all of these is identical keeping 
the firmware in this section simple. Notes will be sent from a master 
device (also one that receives MIDI) as I2C messages. I2C IDs will be 
assigned using select pins and board jumpering.

The 6 AVR devices have a simple task - to receive a note request and 
output a clock waveform 256 times the requested frequency.

Clocks are fed into a pair of Xilinx XC95108 CPLDs, each being 
configured as three synchronous counters, producing address information 
for the EEPROM memory which feeds to the DACs. (Anyone wondering why I 
don't put out the addresses directly from the microcontroller, it's a 
mixture of a) trying to save microcontroller pins for future development 
and b) because I'm desperate to play with CPLDs.)

Other outputs of the AVR are trigger and gate pulses and a reset pulse 
for the counters in the CPLD which is sent before the clock starts. 
(Yes, I have to clock the reset in!)

EEPROMs are Atmel AT28C256s, 32kx8bits. Will give me space for loads of 
waveforms, which will be 256 samples per cycle. (Started out at 128 
samples per cycle until I realised I could simplify the counter design 
by using the pairs of 4-bit counters to their full.)

Upper address bits of EEPROMs are used to select wave shape, my current 
list being:

* Sine
* Triangle
* Saw
* Reverse Saw
* Exponential Saw
* Reverse Exponential Saw
* Square (50% duty cycle)
* Square (25% duty cycle)
* Square (10% duty cycle)

EEPROM data bus feeds into DAC0800LCN.

Polyphony could be achieved with this setup by duplicating the 
oscillator board (still one master controller) and just changing the I2C 
address jumpers (or DIP switches. I like DIP switches.)

My current issues are:

* How much detune to provide for and in what increments.

* How to convert from my note numbers (these will be all the 
MIDI-defined notes plus intermediate detune values) to the 
prescaler/counter values to plug into AVR's onboard counter.  I would 
appear to have two options: a lookup table (would not fit in ATTINY2313 
FLASH) or to calculate these at note-on. I'm favouring the second 
approach for flexibility (would even allow an actual frequency to be 
specified rather than a note number) but haven't the foggiest how to 
work out the algorithm required.

* Whether to mix the 6 signals on this board before passing to VCF, VCA 
or whether EACH signal needs its own VCF (especially if I use suboctaves.)

Any feedback most welcome!

Cheers

M

-- 
Matthew Smith
Smiffytech - Technology Consulting & Web Application Development
Business:      http://www.smiffytech.com/
Blog/personal: http://www.smiffysplace.com/
LinkedIn:      http://www.linkedin.com/in/smiffy
Skype:         msmiffy
Twitter:       @smiffy



More information about the Synth-diy mailing list