[sdiy] Wavetable Design Update
Matthew Smith
matt at smiffytech.com
Thu Feb 3 03:02:03 CET 2011
Quoth Paul Maddox at 03/02/11 08:43...
...
> In your timer loop you simply add a value (up to 24bits) to your 32
> bit word, then in your "main" loop, pull off the top 8 bits and look
> up from a wavetable stored in FLASH and put that on an IO port.
> This saves problems with external EEPROM and lack of accuracy in the timers.
This might work with assembly (which I guess is what you used from past
conversations,) but I discovered that an array of 128 unsigned chars in
C takes up a fair bit more than 128 bytes. Having now moved to 256 bits
per sample and an ever-growing list of samples, this far exceeds the
FLASH capacity of the TINY2313 I had been hoping to use.
Otherwise, what I don't understand (I'm probably being a bit thick here)
is how doing this is how a loop can be run at the right speed without
the use of timers and interrupts - going back to the same issue.
Remember that I'm using VARIABLE rates to scan the table - wherever it
is - with number of samples per cycle being constant. As I'm also
looking to use arbitrary values to allow for detuning and possibly
modulation, the issue of calculating values for timer registers still
occurs.
I'd have thought it would be tricky to operate from a MEGA8 (at 8MHz)
when the top scan speed of 3.2MHz is nearly half clock speed.
> I don't mean this to sound rude, but it does sound like you're over
> complicating what you're trying to achieve.
That's the way things tend to turn out for me - I tend to start off with
a highly complex design, which I can only simplify when I've seen it in
action (even if this is on paper.) So yes, I probably am - at least at
this stage! (And thanks for your ongoing patience - it must be quite
exasperating watching me flounder around like this!)
This specific design, however, came about from an attempt to build the
whole thing from discrete logic and re-cycled EPROMs. (The discrete
logic has become a CPLD, but it's still showing discrete logic on the
schematic capture ;-) The microcontroller was only ever going to be a
timing source for testing - the idea being that this would be a module
with a clock input that could come from "somewhere."
Anyhow, my copy of Chamberlain's MAOMP has finally turned up today
(yay!) so I'll be getting stuck into that after my nap.
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