...also the filter coefficient will be linearly related to the phase increment. you could get it with a single bit-shift.hakey wrote:Wouldn't one HP filter suffice for all 7 sawtooth processes?
it would come as no surprise if the filter coefficients happen to be exact add/sub/shift values, like (c << 2) - (c >> 4)
(== 3.9375)
you have to remember in these embedded systems: memory is extremely expensive, memory access is extremely intensive. if you can do _anything_ by a couple adds and a shift, that's the way it'll be done.
tables should be avoided at all costs, and minimizing the length of tables is extremely important. if possible, tables will be re-purposed and used for many things at the same time.
also, if you need to choose between two methods of operation, choose the one with less instructions. program space is valuable too.
is it a good idea to bank-switch into a large table, read values from it and apply the overhead of computing offsets? generally not unless the content of the table is extremely complex. the calculation of a two-pole filter is far less expensive than a table lookup including bank-switch.
for anybody who doesn't know i can recommend spending some time writing 16-bit x86 code or using embedded devices like for example the PIC series or Z80 series chips. with the usual 2k or 4k program memory and 128 bytes of ram you start to come up with some very interesting methods to do what you want to get done using the least instructions and memory possible. this lends intense insight into other related systems.

