aubio 0.5.0-alpha
Loading...
Searching...
No Matches
pitchshift.h File Reference

Pitch shifting object. More...

Go to the source code of this file.

Typedefs

typedef struct _aubio_pitchshift_t aubio_pitchshift_t
 pitch shifting object

Functions

void aubio_pitchshift_do (aubio_pitchshift_t *o, const fvec_t *in, fvec_t *out)
 execute pitch shifting on an input signal frame
void del_aubio_pitchshift (aubio_pitchshift_t *o)
 deletion of the pitch shifting object
aubio_pitchshift_tnew_aubio_pitchshift (const char_t *method, smpl_t transpose, uint_t hop_size, uint_t samplerate)
 creation of the pitch shifting object
uint_t aubio_pitchshift_get_latency (aubio_pitchshift_t *o)
 get the latency of the pitch shifting object, in samples
uint_t aubio_pitchshift_set_pitchscale (aubio_pitchshift_t *o, smpl_t pitchscale)
 set the pitch scale of the pitch shifting object
smpl_t aubio_pitchshift_get_pitchscale (aubio_pitchshift_t *o)
 get the pitchscale of the pitch shifting object
uint_t aubio_pitchshift_set_transpose (aubio_pitchshift_t *o, smpl_t transpose)
 set the transposition of the pitch shifting object, in semitones
smpl_t aubio_pitchshift_get_transpose (aubio_pitchshift_t *o)
 get the transposition of the pitch shifting object, in semitones

Detailed Description

Pitch shifting object.

aubio_pitchshift_t can be used to transpose a stream of blocks of frames.

Definition in file pitchshift.h.

Typedef Documentation

◆ aubio_pitchshift_t

typedef struct _aubio_pitchshift_t aubio_pitchshift_t

pitch shifting object

Examples
effects/test-pitchshift.c.

Definition at line 39 of file pitchshift.h.

Function Documentation

◆ aubio_pitchshift_do()

void aubio_pitchshift_do ( aubio_pitchshift_t * o,
const fvec_t * in,
fvec_t * out )

execute pitch shifting on an input signal frame

Parameters
opitch shifting object as returned by new_aubio_pitchshift()
ininput signal of size [hop_size]
outoutput pitch candidates of size [1]
Examples
effects/test-pitchshift.c.

◆ aubio_pitchshift_get_latency()

uint_t aubio_pitchshift_get_latency ( aubio_pitchshift_t * o)

get the latency of the pitch shifting object, in samples

Parameters
opitch shifting object as returned by new_aubio_pitchshift()
Returns
latency of the pitch shifting object in samples
Examples
effects/test-pitchshift.c.

◆ aubio_pitchshift_get_pitchscale()

smpl_t aubio_pitchshift_get_pitchscale ( aubio_pitchshift_t * o)

get the pitchscale of the pitch shifting object

Parameters
opitch shifting object as returned by new_aubio_pitchshift()
Returns
pitchscale of the pitch shifting object

◆ aubio_pitchshift_get_transpose()

smpl_t aubio_pitchshift_get_transpose ( aubio_pitchshift_t * o)

get the transposition of the pitch shifting object, in semitones

Parameters
opitch shifting object as returned by new_aubio_pitchshift()
Returns
transposition of the pitch shifting object, in semitones

◆ aubio_pitchshift_set_pitchscale()

uint_t aubio_pitchshift_set_pitchscale ( aubio_pitchshift_t * o,
smpl_t pitchscale )

set the pitch scale of the pitch shifting object

Parameters
opitch shifting object as returned by new_aubio_pitchshift()
pitchscalenew pitch scale of the pitch shifting object

pitchscale is a frequency ratio. It should be in the range [0.25, 4].

Returns
0 if successfull, non-zero otherwise
Examples
effects/test-pitchshift.c.

◆ aubio_pitchshift_set_transpose()

uint_t aubio_pitchshift_set_transpose ( aubio_pitchshift_t * o,
smpl_t transpose )

set the transposition of the pitch shifting object, in semitones

Parameters
opitch shifting object as returned by new_aubio_pitchshift()
transposenew pitch transposition of the pitch shifting object, expressed in semitones (should be in the range [-24;+24])
Returns
0 if successfull, non-zero otherwise
Examples
effects/test-pitchshift.c.

◆ del_aubio_pitchshift()

void del_aubio_pitchshift ( aubio_pitchshift_t * o)

deletion of the pitch shifting object

Parameters
opitch shifting object as returned by new_aubio_pitchshift()
Examples
effects/test-pitchshift.c.

◆ new_aubio_pitchshift()

aubio_pitchshift_t * new_aubio_pitchshift ( const char_t * method,
smpl_t transpose,
uint_t hop_size,
uint_t samplerate )

creation of the pitch shifting object

Parameters
methodset pitch shifting algorithm ("default")
transposeinitial pitch transposition
hop_sizestep size between two consecutive analysis instant
sampleratesampling rate of the signal
Returns
newly created aubio_pitchshift_t
Examples
effects/test-pitchshift.c.