[sdiy] PIC Wavetable OSC Timing
jays at aracnet.com
jays at aracnet.com
Wed Dec 29 23:33:16 CET 2004
It depends on how you've implemented things.
If you are programming the timer to do a complete sample time then you need to adjust the timer value.
If you are more or less implementing a 'master timer' and then counting 'timer ticks' as your sample period then you can tweak you 'timer tick' values.
One will probably give better timing but you'll have to do the math to figure which one. Also you'll need to account for receiving midi and not loose any timer IRQs or 'tick counts'.
I'd build a table with either the timer values or 'tick count' and use that. Then load either the timer or 'tick count' variable when the note is changed. These will probably be 16 bit values and with 128 notes so that'd be 256 bytes. Hopefully you have one of the pics with more memory in it.
Jay S.
William Berzinskas <WBERZINSKAS at nc.rr.com> wrote :
> Hey everyone..
>
> I've made a simple wavetable oscillator..
> it's got an r-2r ladder and 64 position waves.. works pretty good for the
> basic stuff i've got.. got a few waveforms in there.. nothing special,
> just the standard tri/saw/square for testing..
>
> can someone explain to me how to setup the timing
> to be controllable via midi..
>
> if i understand correctly, the midi note number
> would somehow set the reset point on a timer.. the timer would interrupt
> at a specified freq, and output the bits..
>
> assuming i've got that lil theory-ish part right,
> how to implement it?
>
More information about the Synth-diy
mailing list