Functions

Anti-aliased wavetable square wave oscillator. More...

Functions

void tSquare_init (tSquare *const osc, LEAF *const leaf)
 Initialize a tSquare to the default mempool of a LEAF instance. More...
 
void tSquare_initToPool (tSquare *const osc, tMempool *const)
 Initialize a tSquare to a specified mempool. More...
 
void tSquare_free (tSquare *const osc)
 Free a tSquare from its mempool. More...
 
float tSquare_tick (tSquare *const osc)
 Tick a tSquare oscillator. More...
 
void tSquare_setFreq (tSquare *const osc, float freq)
 Set the frequency of a tSquare oscillator. More...
 

Detailed Description

Anti-aliased wavetable square wave oscillator.

Function Documentation

◆ tSquare_init()

void tSquare_init ( tSquare *const  osc,
LEAF *const  leaf 
)

Initialize a tSquare to the default mempool of a LEAF instance.

Parameters
oscA pointer to the tSquare to initialize.
leafA pointer to the leaf instance.

◆ tSquare_initToPool()

void tSquare_initToPool ( tSquare *const  osc,
tMempool * const  mempool 
)

Initialize a tSquare to a specified mempool.

Parameters
oscA pointer to the tSquare to initialize.
mempoolA pointer to the tMempool to use.

◆ tSquare_free()

void tSquare_free ( tSquare *const  osc)

Free a tSquare from its mempool.

Parameters
oscA pointer to the tSquare to free.

◆ tSquare_tick()

float tSquare_tick ( tSquare *const  osc)

Tick a tSquare oscillator.

Parameters
oscA pointer to the relevant tSquare.
Returns
The ticked sample as a float from -1 to 1.

◆ tSquare_setFreq()

void tSquare_setFreq ( tSquare *const  osc,
float  freq 
)

Set the frequency of a tSquare oscillator.

Parameters
oscA pointer to the relevant tSquare.
freqThe frequency to set the oscillator to.