aubio  0.4.1
Typedefs | Functions
synth/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
uint_t aubio_wavetable_load (aubio_wavetable_t *o, char_t *uri)
 load source in wavetable
void aubio_wavetable_do (aubio_wavetable_t *o, fvec_t *input, fvec_t *output)
 process wavetable function
void aubio_wavetable_do_multi (aubio_wavetable_t *o, fmat_t *input, fmat_t *output)
 process wavetable function, multiple channels
uint_t aubio_wavetable_get_playing (aubio_wavetable_t *o)
 get current playing state
uint_t aubio_wavetable_set_playing (aubio_wavetable_t *o, uint_t playing)
 set current playing state
uint_t aubio_wavetable_play (aubio_wavetable_t *o)
 play sample from start
uint_t aubio_wavetable_stop (aubio_wavetable_t *o)
 stop wavetable
uint_t aubio_wavetable_set_freq (aubio_wavetable_t *o, smpl_t freq)
 set wavetable frequency
smpl_t aubio_wavetable_get_freq (aubio_wavetable_t *o)
 get wavetable frequency
uint_t aubio_wavetable_set_amp (aubio_wavetable_t *o, smpl_t amp)
 set wavetable amplitude
smpl_t aubio_wavetable_get_amp (aubio_wavetable_t *o)
 get wavetable amplitude
void del_aubio_wavetable (aubio_wavetable_t *o)
 destroy aubio_wavetable_t object

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.

get wavetable amplitude

Parameters:
owavetable, created by new_aubio_wavetable()
Returns:
current amplitude

get wavetable frequency

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

get current playing state

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

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

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.

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.

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.

set current playing state

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

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.

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.
 All Data Structures Files Functions Variables Typedefs Defines