[sdiy] help understanding circular buffers for delay line
Matthew Smith
matt at smiffytech.com
Sat Mar 3 20:56:00 CET 2012
Quoth Martin Klang at 04/03/12 05:45...
>
> why not use modulus?
> inpos = (inpos + 1) % length ;
Personally, I try to avoid any form of division (other than ^2 shifts,)
when working with low-end micros. I see these as "expensive" operations
and try to keep to additions, shifts, and logical operations. (And
multiplications, if the device happens to have a hardware multiplier.
But not common on low-end devices.)
M
--
Matthew Smith
Business: http://www.smiffytech.com
Blog: http://www.smiffysplace.com
Linkedin: http://www.linkedin.com/in/smiffy
Flickr: http://www.flickr.com/photos/msmiffy
Twitter: http://twitter.com/smiffy
ABN 16 391 203 815
More information about the Synth-diy
mailing list