[sdiy] Wavetables
Olivier Gillet
ol.gillet at gmail.com
Mon Jan 24 23:24:26 CET 2011
> This is where Assembly comes into it's own..
> My oscillator code is a constant length, weather it's sync'ing a
> second oscillator, de-rezzing an oscillator and so on..
> understanding *100%* what the code is doing and how long each command
> takes in clock cycles REALLY is essential to prevent jitter.
Swapping the order of the write and the computation (so that the write
is the first thing done when entering the ISR) ; or buffering offline
the samples into a data structure with a constant read time are two
ways of dealing with jitter that do not involve cycle-counting and
trying to balance conditional branches.
> I'll be keen to see how you get on, but I still believe you'll get a
> higher top frequency using assembly than with any C compiler.
Write the code in C, look at the generated assembly code, and decide
whether or not you could have done better in assembly.
My feeling is that writing things in assembly push your nose so close
to the problem that sometimes you won't realize how things can be
improved if done in a radically different way. It's so easy to get
trapped into local optima with assembly.
Olivier
More information about the Synth-diy
mailing list