aubio 0.4.9
Typedefs | Functions
wavetable.h File Reference

Wavetable synthesis. More...

Go to the source code of this file.

Typedefs

typedef struct _aubio_wavetable_t aubio_wavetable_t
 wavetable object More...
 

Functions

aubio_wavetable_tnew_aubio_wavetable (uint_t samplerate, uint_t hop_size)
 create new wavetable object More...
 
uint_t aubio_wavetable_load (aubio_wavetable_t *o, const char_t *uri)
 load source in wavetable More...
 
void aubio_wavetable_do (aubio_wavetable_t *o, const fvec_t *input, fvec_t *output)
 process wavetable function More...
 
void aubio_wavetable_do_multi (aubio_wavetable_t *o, const fmat_t *input, fmat_t *output)
 process wavetable function, multiple channels More...
 
uint_t aubio_wavetable_get_playing (const aubio_wavetable_t *o)
 get current playing state More...
 
uint_t aubio_wavetable_set_playing (aubio_wavetable_t *o, uint_t playing)
 set current playing state More...
 
uint_t aubio_wavetable_play (aubio_wavetable_t *o)
 play sample from start More...
 
uint_t aubio_wavetable_stop (aubio_wavetable_t *o)
 stop wavetable More...
 
uint_t aubio_wavetable_set_freq (aubio_wavetable_t *o, smpl_t freq)
 set wavetable frequency More...
 
smpl_t aubio_wavetable_get_freq (const aubio_wavetable_t *o)
 get wavetable frequency More...
 
uint_t aubio_wavetable_set_amp (aubio_wavetable_t *o, smpl_t amp)
 set wavetable amplitude More...
 
smpl_t aubio_wavetable_get_amp (const aubio_wavetable_t *o)
 get wavetable amplitude More...
 
void del_aubio_wavetable (aubio_wavetable_t *o)
 destroy aubio_wavetable_t object More...
 

Detailed Description

Wavetable synthesis.

This file creates a wavetable and plays it at different frequency.

The _do function adds the new samples to the input, and write the result as the output.

Definition in file wavetable.h.

Typedef Documentation

◆ aubio_wavetable_t

typedef struct _aubio_wavetable_t aubio_wavetable_t

wavetable object

Definition at line 42 of file wavetable.h.

Function Documentation

◆ aubio_wavetable_do()

void aubio_wavetable_do ( aubio_wavetable_t o,
const fvec_t input,
fvec_t output 
)

process wavetable function

Parameters
owavetable, created by new_aubio_wavetable()
inputinput of the wavetable, to be added to the output
outputoutput of the wavetable

This function adds the new samples from the playing wavetable to the output.

If input is not NULL and different from output, then the samples from input are added to the output.

Examples
examples/aubioonset.c, examples/aubiopitch.c, examples/aubiotrack.c, and synth/test-wavetable.c.

◆ aubio_wavetable_do_multi()

void aubio_wavetable_do_multi ( aubio_wavetable_t o,
const fmat_t input,
fmat_t output 
)

process wavetable function, multiple channels

Parameters
owavetable, created by new_aubio_wavetable()
inputinput of the wavetable, to be added to the output
outputoutput of the wavetable

This function adds the new samples from the playing wavetable to the output.

If input is not NULL and different from output, then the samples from input are added to the output.

◆ aubio_wavetable_get_amp()

smpl_t aubio_wavetable_get_amp ( const aubio_wavetable_t o)

get wavetable amplitude

Parameters
owavetable, created by new_aubio_wavetable()
Returns
current amplitude

◆ aubio_wavetable_get_freq()

smpl_t aubio_wavetable_get_freq ( const aubio_wavetable_t o)

get wavetable frequency

Parameters
owavetable, created by new_aubio_wavetable()
Returns
current frequency, in Hz

◆ aubio_wavetable_get_playing()

uint_t aubio_wavetable_get_playing ( const aubio_wavetable_t o)

get current playing state

Parameters
owavetable, created by new_aubio_wavetable()
Returns
0 if not playing, 1 if playing

◆ aubio_wavetable_load()

uint_t aubio_wavetable_load ( aubio_wavetable_t o,
const char_t uri 
)

load source in wavetable

TODO: This function is not implemented yet. See new_aubio_sampler() instead.

Parameters
owavetable, created by new_aubio_wavetable()
urithe uri of the source to load
Returns
0 if successful, non-zero otherwise

◆ aubio_wavetable_play()

uint_t aubio_wavetable_play ( aubio_wavetable_t o)

play sample from start

Parameters
owavetable, created by new_aubio_wavetable()
Returns
0 if successful, 1 otherwise
Examples
examples/aubioonset.c, examples/aubiopitch.c, examples/aubiotrack.c, and synth/test-wavetable.c.

◆ aubio_wavetable_set_amp()

uint_t aubio_wavetable_set_amp ( aubio_wavetable_t o,
smpl_t  amp 
)

set wavetable amplitude

Parameters
owavetable, created by new_aubio_wavetable()
ampnew amplitude value for the wavetable
Returns
0 if successful, 1 otherwise
Examples
examples/aubiopitch.c.

◆ aubio_wavetable_set_freq()

uint_t aubio_wavetable_set_freq ( aubio_wavetable_t o,
smpl_t  freq 
)

set wavetable frequency

Parameters
owavetable, created by new_aubio_wavetable()
freqnew frequency value for the wavetable
Returns
0 if successful, 1 otherwise
Examples
examples/aubioonset.c, examples/aubiopitch.c, examples/aubiotrack.c, and synth/test-wavetable.c.

◆ aubio_wavetable_set_playing()

uint_t aubio_wavetable_set_playing ( aubio_wavetable_t o,
uint_t  playing 
)

set current playing state

Parameters
owavetable, created by new_aubio_wavetable()
playing0 for not playing, 1 for playing
Returns
0 if successful, 1 otherwise

◆ aubio_wavetable_stop()

uint_t aubio_wavetable_stop ( aubio_wavetable_t o)

stop wavetable

Parameters
owavetable, created by new_aubio_wavetable()
Returns
0 if successful, 1 otherwise
Examples
examples/aubioonset.c, examples/aubiotrack.c, and synth/test-wavetable.c.

◆ del_aubio_wavetable()

void del_aubio_wavetable ( aubio_wavetable_t o)

destroy aubio_wavetable_t object

Parameters
owavetable, created by new_aubio_wavetable()
Examples
examples/aubioonset.c, examples/aubiopitch.c, examples/aubiotrack.c, and synth/test-wavetable.c.

◆ new_aubio_wavetable()

aubio_wavetable_t * new_aubio_wavetable ( uint_t  samplerate,
uint_t  hop_size 
)

create new wavetable object

Parameters
sampleratethe sampling rate of the new wavetable
hop_sizethe block size of the new wavetable
Returns
the newly created aubio_wavetable_t
Examples
examples/aubioonset.c, examples/aubiopitch.c, examples/aubiotrack.c, and synth/test-wavetable.c.