aubio  0.4.0
 All Data Structures Files Functions Variables Typedefs Macros
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
 

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, char_t *uri)
 load source in wavetable More...
 
void aubio_wavetable_do (aubio_wavetable_t *o, fvec_t *input, fvec_t *output)
 process wavetable function More...
 
void aubio_wavetable_do_multi (aubio_wavetable_t *o, fmat_t *input, fmat_t *output)
 process wavetable function, multiple channels More...
 
uint_t aubio_wavetable_get_playing (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 (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 (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.

Function Documentation

void aubio_wavetable_do ( aubio_wavetable_t o,
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.
void aubio_wavetable_do_multi ( aubio_wavetable_t o,
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.

smpl_t aubio_wavetable_get_amp ( aubio_wavetable_t o)

get wavetable amplitude

Parameters
owavetable, created by new_aubio_wavetable()
Returns
current amplitude
smpl_t aubio_wavetable_get_freq ( aubio_wavetable_t o)

get wavetable frequency

Parameters
owavetable, created by new_aubio_wavetable()
Returns
current frequency, in Hz
uint_t aubio_wavetable_get_playing ( aubio_wavetable_t o)

get current playing state

Parameters
owavetable, created by new_aubio_wavetable()
Returns
0 if not playing, 1 if playing
uint_t aubio_wavetable_load ( aubio_wavetable_t o,
char_t uri 
)

load source in wavetable

Parameters
owavetable, created by new_aubio_wavetable()
urithe uri of the source to load
Returns
0 if successful, non-zero otherwise
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.
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.
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.
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
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.
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.
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.