[sdiy] Wavetables
Matthew Smith
matt at smiffytech.com
Sat Jan 22 07:26:05 CET 2011
Quoth jon schatz at 22/01/11 16:20...
...
> if i'm understanding you correctly you already have most of the work
> done for the saw / sine. the saw should just be the input value to your
> sine function (ie, y=x from -1 to 1). the triangle is y=2x for -1 < x <
> 0, y=1 for x = 0, and y = -2x for 0 < x < 1.
*headdesk* - at least as far as the sawtooth is concerned. Yes - that
makes sense now!
> both the saw and triangle should cross 0 if you're talking about an ac
> output. i expect your dac will take in 0 to 0xff as input values so your
> tables will have to map -1 to 0 and 1 to 0xff but that's not so hard.
Yup. Positive integers 0x00 to 0xFF, my kinda numbers ;-)
Since I've got to write some (Perl) code to generate the tables, think
I'll do it as a little web application where you can select waveform,
number of bits, times oversampling, to spit out a text file that can be
used howsoever. I'll post a link when I'm done.
Many thanks for that!
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