Sound Design Toolkit  078
Physically informed sound synthesis for everyday sounds

Typedefs

typedef struct SDTPitchShift SDTPitchShift
 Opaque data structure for a pitch shifter object.
 
typedef struct SDTPitchShift SDTPitchShift
 Opaque data structure for a pitch shifter object.
 

Functions

SDTPitchShiftSDTPitchShift_new (int size, int oversample)
 Object constructor. More...
 
void SDTPitchShift_free (SDTPitchShift *x)
 Object destructor. More...
 
void SDTPitchShift_setRatio (SDTPitchShift *x, double f)
 Sets the pitch shifting ratio. More...
 
void SDTPitchShift_setOverlap (SDTPitchShift *x, double f)
 Sets the analysis window overlapping ratio. Accepted values go from 0.0 to 1.0, with 0.0 meaning no overlap and 1.0 meaning total overlap. More...
 
double SDTPitchShift_dsp (SDTPitchShift *x, double in)
 Signal processing routine. Call this function at sample rate to compute the pitch shifted signal. More...
 

Detailed Description

Frequency domain pitch shifter, useful to simulate doppler effect or other applications requiring pitch shifting.

Function Documentation

double SDTPitchShift_dsp ( SDTPitchShift x,
double  in 
)

Signal processing routine. Call this function at sample rate to compute the pitch shifted signal.

Parameters
[in]inInput sample
Returns
Output sample
void SDTPitchShift_free ( SDTPitchShift x)

Object destructor.

Parameters
[in]xPointer to the instance to destroy
SDTPitchShift * SDTPitchShift_new ( int  size,
int  oversample 
)

Object constructor.

Parameters
[in]sizeInternal buffer size, in samples
[in]oversampleFFT oversampling rate
Returns
Pointer to the new instance
void SDTPitchShift_setOverlap ( SDTPitchShift x,
double  f 
)

Sets the analysis window overlapping ratio. Accepted values go from 0.0 to 1.0, with 0.0 meaning no overlap and 1.0 meaning total overlap.

Parameters
[in]xPointer to the instance
[in]fOverlap ratio [0.0, 1.0]
void SDTPitchShift_setRatio ( SDTPitchShift x,
double  f 
)

Sets the pitch shifting ratio.

Parameters
[in]fNew pitch / original pitch ratio