How to interpolate within a wavetable oscillator?

Mar 12, 2010 at 1:25pm

How to interpolate within a wavetable oscillator?

Hello Developers,

I’m currently building a wavetable-based oscillator like [cycle~] with some own functionality I need. I know that [cycle~] uses some kind of interpolation to calculate its output but I don’t know how is this done in an efficient way (I suppose there must be some trick that makes things faster than simply choosing the two closest values to the current phase of the oscillator and do the interpolation, which consumes a lot of CPU as I suppose). Can somebody give me some hints to do this?

Thank you,
Adam

#47430
Mar 12, 2010 at 5:32pm

Have a look at SC, the SinOsc UGen for example:

http://supercollider.svn.sourceforge.net/viewvc/supercollider/trunk/common/Source/plugins/OscUGens.cpp?view=markup

SC source is generally looking at how to do stuff efficiently.

The key to this is avoiding doing an “if” in the main DSP loop for every sample. SC uses bit masking etc for this.

#170671
Mar 12, 2010 at 9:16pm

Should have read “SC source is generally go for looking at how to do stuff efficiently” …

#170672
Mar 12, 2010 at 10:28pm
#170673

You must be logged in to reply to this topic.