[sdiy] Reverse Sawtooth

Matthew Smith matt at smiffytech.com
Mon Jan 24 10:16:11 CET 2011


Quoth Olivier Gillet at 24/01/11 19:22...
...
> I see only two use cases for the reverse sawtooth:
> - at low-frequency, as a control signal, it's an entirely different story!
> - sawtooth + dephased inverse sawtooth = cheap square PWM from wavetables.

Thanks! I'd thought of the LFO situation, but I'd probably be using a 
device with more FLASH for that so I could go up to 256 or even 512 
samples per cycle.

But now I discover that even with the reverse saw stripped from the 
table, I've used 1948 bytes of my 2k bytes of FLASH - and I've only 
written half the programme! (And yes, I've run strip on the .hex file.)

So I'm going to have to get some bigger and faster devices - I have 
ATMega8's on hand, which have 8kb of FLASH, so adequate - but they only 
run at 8MHz so not too happy about the frequency accuracy of the higher 
notes - top MIDI note needs scanning of the (128 bit) table at about 
1.5MHz, timer needs to work at TWICE that frequency (so up to 3MHz) - 
think that might be cutting it a bit fine.

But... piano note 88 is only up at 4.1kHz, so clock only needs to be 
just over 1MHz - maybe I will be OK, with this being music rather than a 
piece of test gear...

What do you think, folks? Am I going a bit overboard on the top notes so 
I might be OK with an 8MHz device*? Can we perceive inaccuracies that 
far up?

Cheers

M

* And why is it that the ATTINY2313 goes up to 20MHz, but hardly any of 
the others do? Drives me nuts.

-- 
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