Actually my implementation is rather silly now that I've looked at it again. :)
I should have taken advantage of ranges. E.g. I could use stride() to
skip every Nth element and I could use cycle() to create a circular
buffer. I'll give this a shot soon.
Oh that last snippet is wrong, it should be:
sample = audioTable.table[audioTable.phase[0] += leftPhase];
sample = audioTable.table[audioTable.phase[1] += rightPhase];
:)
Here's a little 100-line thingy that generates a wavetable of some
shape (sine, saw, square - although only sine is implemented at the
moment), of any length, and of either float or double element type. It
stores this inside a struct which can also keep a number of different
phases, which do bounds