fmpair

Files: fmpair.h, fmpair.c

FM oscilator pair with linear interpolation

Functions

sp_fmpair_create(sp_fmpair **fmpair)
sp_fmpair_init(sp_data *sp, sp_fmpair *fmpair, sp_ftbl *tbl)
sp_fmpair_compute(sp_data *sp, sp_fmpair *fmpair, SPFLOAT *dummy, SPFLOAT *out)
sp_fmpair_destroy(sp_fmpair **fmpair)

Mandatory Parameters

tbl: Wavetable to read from. Note: the size of this table must be a power of 2.
(Recommended value: N/A)

Optional Parameters

freq: Frequency (in Hz)
(Default value: 440)
amp: Amplitude (typically a value between 0 and 1).
(Default value: 0.4)
car: Carrier frequency, expressed as a ratio number in C:M ratio. Typically an integer.
(Default value: 1)
mod: Modulator frequency, expressed as a ratio number in C:M ratio. Typically an integer.
(Default value: 1)
indx: Modulation index. Most commercial synthesizers have a range from 0-8, but there's nothing stopping you from going beyond that.
(Default value: 8)

Outputs

out: Signal out.