Files: oscmorph.h, oscmorph.c

Wavetable morphing oscillator
This is an oscillator with linear interpolation that is capable of morphing between an arbitrary number of wavetables.


sp_oscmorph_create(sp_oscmorph **oscmorph)
sp_oscmorph_init(sp_data *sp, sp_oscmorph *oscmorph, sp_ftbl **tbl, int nft, SPFLOAT phase)
sp_oscmorph_compute(sp_data *sp, sp_oscmorph *oscmorph, SPFLOAT *in, SPFLOAT *out)
sp_oscmorph_destroy(sp_oscmorph **oscmorph)

Mandatory Parameters

tbl: An array of ftables to read from. Note: the size of these tables must be a power of 2 (and the same size as well).
(Recommended value: N/A)
nft: Number of ftbls
(Recommended value: 2)
phase: Initial phase of waveform, expects a value 0-1
(Recommended value: 0)

Optional Parameters

freq: Frequency (in Hz)
(Default value: 440)
amp: Amplitude (typically a value between 0 and 1).
(Default value: 0.2)
wtpos: Wavetable position. (scaled 0-1)
(Default value: 0)


out: Signal output.