aubio 0.5.0-alpha
|
time stretching object More...
Go to the source code of this file.
Typedefs | |
typedef struct _aubio_timestretch_t | aubio_timestretch_t |
time stretching object |
Functions | |
void | aubio_timestretch_do (aubio_timestretch_t *o, fvec_t *out, uint_t *read) |
execute time stretching on an input signal frame | |
void | del_aubio_timestretch (aubio_timestretch_t *o) |
deletion of the time stretching object | |
aubio_timestretch_t * | new_aubio_timestretch (const char_t *method, smpl_t stretch, uint_t hop_size, uint_t samplerate) |
creation of the time stretching object | |
sint_t | aubio_timestretch_push (aubio_timestretch_t *o, fvec_t *in, uint_t length) |
push length samples from in to time stretching object | |
sint_t | aubio_timestretch_get_available (aubio_timestretch_t *o) |
get number of currently available samples from time stretching object | |
uint_t | aubio_timestretch_get_latency (aubio_timestretch_t *o) |
get the latency of the time stretching object, in samples | |
uint_t | aubio_timestretch_get_samplerate (aubio_timestretch_t *o) |
get the samplerate of the time stretching object | |
uint_t | aubio_timestretch_set_stretch (aubio_timestretch_t *o, smpl_t stretch) |
set the stretching ratio of the time stretching object | |
smpl_t | aubio_timestretch_get_stretch (aubio_timestretch_t *o) |
get the transposition of the time stretching object, in semitones | |
uint_t | aubio_timestretch_set_pitchscale (aubio_timestretch_t *o, smpl_t pitchscale) |
set the pitch scale of the time stretching object | |
smpl_t | aubio_timestretch_get_pitchscale (aubio_timestretch_t *o) |
get the pitchscale of the time stretching object | |
uint_t | aubio_timestretch_set_transpose (aubio_timestretch_t *o, smpl_t transpose) |
set the transposition of the time stretching object, in semitones | |
smpl_t | aubio_timestretch_get_transpose (aubio_timestretch_t *o) |
get the transposition of the time stretching object, in semitones | |
uint_t | aubio_timestretch_reset (aubio_timestretch_t *o) |
reset the time stretching object |
time stretching object
aubio_timestretch_t can be used to open a source file, read samples from it, time-stretch them, and write out the modified samples.
The time-stretching factor can be changed at any time using aubio_timestretch_set_stretch().
A transposition can also be applied and changed at any time with aubio_timestretch_set_transpose().
Definition in file timestretch.h.
typedef struct _aubio_timestretch_t aubio_timestretch_t |
time stretching object
Definition at line 46 of file timestretch.h.
void aubio_timestretch_do | ( | aubio_timestretch_t * | o, |
fvec_t * | out, | ||
uint_t * | read ) |
execute time stretching on an input signal frame
o | time stretching object as returned by new_aubio_timestretch() |
out | timestretched output of size [hop_size] |
read | number of frames actually wrote out |
sint_t aubio_timestretch_get_available | ( | aubio_timestretch_t * | o | ) |
get number of currently available samples from time stretching object
o | time stretching object as returned by new_aubio_timestretch() |
uint_t aubio_timestretch_get_latency | ( | aubio_timestretch_t * | o | ) |
get the latency of the time stretching object, in samples
o | time stretching object as returned by new_aubio_timestretch() |
smpl_t aubio_timestretch_get_pitchscale | ( | aubio_timestretch_t * | o | ) |
get the pitchscale of the time stretching object
o | time stretching object as returned by new_aubio_timestretch() |
uint_t aubio_timestretch_get_samplerate | ( | aubio_timestretch_t * | o | ) |
get the samplerate of the time stretching object
Call after new_aubio_timestretch() was called with 0 to match the original samplerate of the input file.
o | time stretching object as returned by new_aubio_timestretch() |
smpl_t aubio_timestretch_get_stretch | ( | aubio_timestretch_t * | o | ) |
get the transposition of the time stretching object, in semitones
o | time stretching object as returned by new_aubio_timestretch() |
smpl_t aubio_timestretch_get_transpose | ( | aubio_timestretch_t * | o | ) |
get the transposition of the time stretching object, in semitones
o | time stretching object as returned by new_aubio_timestretch() |
sint_t aubio_timestretch_push | ( | aubio_timestretch_t * | o, |
fvec_t * | in, | ||
uint_t | length ) |
push length samples from in to time stretching object
o | time stretching object as returned by new_aubio_timestretch() |
in | input vector of new samples to push to time stretching object |
length | number of new samples to push from input vector |
uint_t aubio_timestretch_reset | ( | aubio_timestretch_t * | o | ) |
reset the time stretching object
o | time stretching object as returned by new_aubio_timestretch() |
uint_t aubio_timestretch_set_pitchscale | ( | aubio_timestretch_t * | o, |
smpl_t | pitchscale ) |
set the pitch scale of the time stretching object
o | time stretching object as returned by new_aubio_timestretch() |
pitchscale | new pitch scale of the time stretching object |
pitchscale is a frequency ratio. It should be in the range [0.25, 4].
uint_t aubio_timestretch_set_stretch | ( | aubio_timestretch_t * | o, |
smpl_t | stretch ) |
set the stretching ratio of the time stretching object
o | time stretching object as returned by new_aubio_timestretch() |
stretch | new time stretching ratio of the time stretching object (should be in the range [0.025; 10.]) |
uint_t aubio_timestretch_set_transpose | ( | aubio_timestretch_t * | o, |
smpl_t | transpose ) |
set the transposition of the time stretching object, in semitones
o | time stretching object as returned by new_aubio_timestretch() |
transpose | new pitch transposition of the time stretching object, expressed in semitones (should be in the range [-24;+24]) |
void del_aubio_timestretch | ( | aubio_timestretch_t * | o | ) |
deletion of the time stretching object
o | time stretching object as returned by new_aubio_timestretch() |
aubio_timestretch_t * new_aubio_timestretch | ( | const char_t * | method, |
smpl_t | stretch, | ||
uint_t | hop_size, | ||
uint_t | samplerate ) |
creation of the time stretching object
method | time stretching algorithm ("default") |
stretch | initial time stretching factor |
hop_size | block size at which the frames should be produced |
samplerate | sampling rate of the signal |