I’ve set up a synth plugin where each oscillator contains a set of multiple waves loaded from an audio file, each wave then gets a band-limited set of subtables as described by Nigel Redmon here. All that works as expected with a single wave (or ‘frame’), but sweeping the position across multiple frames generates a lot of noise and irregularities. Right now, I’m basically trying to just lerp between two adjacent frames and the code looks like this:
pFrame = position * (numFrames - 1); lowerIndex = floor(pFrame); skew = pFrame - lowerIndex; upperIndex = (lowerIndex == (numFrames - 1)) ? 0 : lowerIndex + 1; bSample = aFrames[lowerIndex].getSample(freq); tSample = aFrames[upperIndex].getSample(freq); output = bSample + ((tSample - bSample) * skew);
Considering that the band-limiting works fine on single frames at all octaves, it seems like the issue has to be in the interpolation between adjacent frames but I can’t guess why the above code yields such bad sound. Any insight from those who have implemented this sort of thing before is much appreciated.