36#ifndef __PITCH_SHIFTER_H_INCLUDED__
37#define __PITCH_SHIFTER_H_INCLUDED__
54 PITCH_SHIFTER_FFTSIZE_512 = 1,
55 PITCH_SHIFTER_FFTSIZE_1024,
56 PITCH_SHIFTER_FFTSIZE_2048,
57 PITCH_SHIFTER_FFTSIZE_4096,
58 PITCH_SHIFTER_FFTSIZE_8192,
59 PITCH_SHIFTER_FFTSIZE_16384
64#define PITCH_SHIFTER_NUM_FFTSIZE_OPTIONS ( 6 )
71 PITCH_SHIFTER_OSAMP_2 = 1,
72 PITCH_SHIFTER_OSAMP_4,
73 PITCH_SHIFTER_OSAMP_8,
74 PITCH_SHIFTER_OSAMP_16,
75 PITCH_SHIFTER_OSAMP_32
80#define PITCH_SHIFTER_NUM_OSAMP_OPTIONS ( 5 )
83#define PITCH_SHIFTER_MAX_SHIFT_FACTOR ( 2.0f )
86#define PITCH_SHIFTER_MIN_SHIFT_FACTOR ( 0.5f )
146 const float *
const * inputs,
147 float*
const*
const outputs,
A bunch of things that are common to many of the saf examples.
CODEC_STATUS
Current status of the codec.
void pitch_shifter_setOSampOption(void *const hPS, PITCH_SHIFTER_OSAMP_OPTIONS newOption)
Sets the oversampling factor used by the algorithm (see PITCH_SHIFTER_OSAMP_OPTIONS enum)
void pitch_shifter_setPitchShiftFactor(void *const hPS, float newValue)
Sets the pitch shift factor, 1: no change, 2: up one octave, 0.5: down one octave.
void pitch_shifter_getProgressBarText(void *const hPS, char *text)
(Optional) Returns current intialisation/processing progress text
void pitch_shifter_create(void **const phPS)
Creates an instance of pitch_shifter.
PITCH_SHIFTER_FFTSIZE_OPTIONS
Available FFT size options.
int pitch_shifter_getProcessingDelay(void *const hPS)
Returns the processing delay in samples (may be used for delay compensation features)
float pitch_shifter_getProgressBar0_1(void *const hPS)
(Optional) Returns current intialisation/processing progress, between 0..1
PITCH_SHIFTER_OSAMP_OPTIONS
Available oversampling options.
void pitch_shifter_setFFTSizeOption(void *const hPS, PITCH_SHIFTER_FFTSIZE_OPTIONS newOption)
Sets the FFT size used by the algorithm (see PITCH_SHIFTER_FFTSIZE_OPTIONS enum)
void pitch_shifter_destroy(void **const phPS)
Destroys an instance of pitch_shifter.
void pitch_shifter_initCodec(void *const hPS)
Intialises the codec variables, based on current global/user parameters.
CODEC_STATUS pitch_shifter_getCodecStatus(void *const hPS)
Returns current codec status (see CODEC_STATUS enum)
void pitch_shifter_init(void *const hPS, int samplerate)
Initialises an instance of pitch_shifter with default settings.
int pitch_shifter_getNCHrequired(void *const hPS)
Returns the number of channels required by the current configuration.
float pitch_shifter_getPitchShiftFactor(void *const hPS)
Returns the pitch shift factor, 1: no change, 2: up one octave, 0.5: down one octave.
PITCH_SHIFTER_OSAMP_OPTIONS pitch_shifter_getOSampOption(void *const hPS)
Returns the oversampling factor used by the algorithm (see PITCH_SHIFTER_OSAMP_OPTIONS enum)
PITCH_SHIFTER_FFTSIZE_OPTIONS pitch_shifter_getFFTSizeOption(void *const hPS)
Returns the FFT size used by the algorithm (see PITCH_SHIFTER_FFTSIZE_OPTIONS enum)
void pitch_shifter_process(void *const hPS, const float *const *inputs, float *const *const outputs, int nInputs, int nOutputs, int nSamples)
Pitch shifts the input signals.
int pitch_shifter_getFrameSize(void)
Returns the processing framesize (i.e., number of samples processed with every _process() call )
void pitch_shifter_setNumChannels(void *const hPS, int newValue)
Sets the number channels to pitch shift.
void pitch_shifter_refreshParams(void *const hPS)
Sets all intialisation flags to 1; re-initialising all settings/variables as pitch_shifter is current...