The PSMVocoder object implements a phase vocoder pitch shifter. Phase locking and peak tracking are optional.
More...
#include <fxobjects.h>
|
PSMVocoderParameters | parameters |
| object parameters
|
|
PhaseVocoder | vocoder |
| vocoder to perform PSM
|
|
double | alphaStretchRatio = 1.0 |
| alpha stretch ratio = hs/ha
|
|
const double | hs = PSM_FFT_LEN / 4 |
| hs = N/4 — 75% overlap
|
|
double | ha = PSM_FFT_LEN / 4 |
| ha = N/4 — 75% overlap
|
|
double | phi [PSM_FFT_LEN] = { 0.0 } |
| array of phase values for classic algorithm
|
|
double | psi [PSM_FFT_LEN] = { 0.0 } |
| array of phase correction values for classic algorithm
|
|
BinData | binData [PSM_FFT_LEN] |
| array of BinData structures for current FFT frame
|
|
BinData | binDataPrevious [PSM_FFT_LEN] |
| array of BinData structures for previous FFT frame
|
|
int | peakBins [PSM_FFT_LEN] = { -1 } |
| array of current peak bin index values (-1 = not peak)
|
|
int | peakBinsPrevious [PSM_FFT_LEN] = { -1 } |
| array of previous peak bin index values (-1 = not peak)
|
|
double * | windowBuff = nullptr |
| buffer for window
|
|
double * | outputBuff = nullptr |
| buffer for resampled output
|
|
double | windowCorrection = 0.0 |
| window correction value
|
|
unsigned int | outputBufferLength = 0 |
| lenght of resampled output array
|
|
The PSMVocoder object implements a phase vocoder pitch shifter. Phase locking and peak tracking are optional.
Audio I/O:
- Processes mono input to mono output.
Control I/F:
- Author
- Will Pirkle http://www.willpirkle.com
- Version
- Revision : 1.0
- Date
- Date : 2018 / 09 / 7
◆ canProcessAudioFrame()
virtual bool PSMVocoder::canProcessAudioFrame |
( |
| ) |
|
|
inlinevirtual |
◆ findPeaksAndRegionsOfInfluence()
void PSMVocoder::findPeaksAndRegionsOfInfluence |
( |
| ) |
|
|
inline |
identify peak bins and tag their respective regions of influence
◆ findPreviousNearestPeak()
int PSMVocoder::findPreviousNearestPeak |
( |
int |
peakIndex | ) |
|
|
inline |
find bin index of nearest peak bin in previous FFT frame
◆ getParameters()
get parameters: note use of custom structure for passing param data
- Returns
- PSMVocoderParameters custom data structure
◆ processAudioSample()
virtual double PSMVocoder::processAudioSample |
( |
double |
input | ) |
|
|
inlinevirtual |
process input sample through PSM vocoder
- Parameters
-
- Returns
- the processed sample
Implements IAudioSignalProcessor.
◆ reset()
virtual bool PSMVocoder::reset |
( |
double |
_sampleRate | ) |
|
|
inlinevirtual |
◆ setParameters()
set parameters: note use of custom structure for passing param data
- Parameters
-
◆ setPitchShift()
void PSMVocoder::setPitchShift |
( |
double |
semitones | ) |
|
|
inline |
set the pitch shift in semitones (note that this can be fractional too)
The documentation for this class was generated from the following file: