Xeno-rat
Loading...
Searching...
No Matches
NAudio.Dsp.SmbPitchShifter Class Reference

SMB Pitch Shifter. More...

Collaboration diagram for NAudio.Dsp.SmbPitchShifter:

Public Member Functions

void PitchShift (float pitchShift, long numSampsToProcess, float sampleRate, float[] indata)
 Performs pitch shifting on the input audio data.
 
void PitchShift (float pitchShift, long numSampsToProcess, long fftFrameSize, long osamp, float sampleRate, float[] indata)
 Pitch Shift.
 
void ShortTimeFourierTransform (float[] fftBuffer, long fftFrameSize, long sign)
 Performs the Short Time Fourier Transform on the input FFT buffer.
 

Private Attributes

float[] gInFIFO = new float[MAX_FRAME_LENGTH]
 
float[] gOutFIFO = new float[MAX_FRAME_LENGTH]
 
float[] gFFTworksp = new float[2*MAX_FRAME_LENGTH]
 
float[] gLastPhase = new float[MAX_FRAME_LENGTH/2 + 1]
 
float[] gSumPhase = new float[MAX_FRAME_LENGTH/2 + 1]
 
float[] gOutputAccum = new float[2*MAX_FRAME_LENGTH]
 
float[] gAnaFreq = new float[MAX_FRAME_LENGTH]
 
float[] gAnaMagn = new float[MAX_FRAME_LENGTH]
 
float[] gSynFreq = new float[MAX_FRAME_LENGTH]
 
float[] gSynMagn = new float[MAX_FRAME_LENGTH]
 
long gRover
 

Static Private Attributes

static int MAX_FRAME_LENGTH = 16000
 

Detailed Description

SMB Pitch Shifter.

Member Function Documentation

◆ PitchShift() [1/2]

void NAudio.Dsp.SmbPitchShifter.PitchShift ( float pitchShift,
long numSampsToProcess,
float sampleRate,
float[] indata )
inline

Performs pitch shifting on the input audio data.

Parameters
pitchShiftThe amount of pitch shift to be applied.
numSampsToProcessThe number of samples to process.
fftFrameSizeThe size of the FFT frame.
osampThe oversampling factor.
sampleRateThe sample rate of the input audio data.
indataThe input audio data to be processed.

This method performs pitch shifting on the input audio data using the Phase Vocoder algorithm. It processes the input audio data in frames of size fftFrameSize using the Short-Time Fourier Transform (STFT) technique. The pitch shift amount is specified by pitchShift and the oversampling factor is specified by osamp . The processed output is stored in the indata array.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PitchShift() [2/2]

void NAudio.Dsp.SmbPitchShifter.PitchShift ( float pitchShift,
long numSampsToProcess,
long fftFrameSize,
long osamp,
float sampleRate,
float[] indata )
inline

Pitch Shift.

Here is the call graph for this function:

◆ ShortTimeFourierTransform()

void NAudio.Dsp.SmbPitchShifter.ShortTimeFourierTransform ( float[] fftBuffer,
long fftFrameSize,
long sign )
inline

Performs the Short Time Fourier Transform on the input FFT buffer.

Parameters
fftBufferThe input buffer containing the data to be transformed.
fftFrameSizeThe size of the FFT frame.
signThe sign of the transform, usually 1 for forward transform and -1 for inverse transform.

This method performs the Short Time Fourier Transform (STFT) on the input FFT buffer. It rearranges the elements of the buffer and applies the STFT algorithm to transform the data. The method modifies the original FFT buffer in place.

Here is the caller graph for this function:

Member Data Documentation

◆ gAnaFreq

float [] NAudio.Dsp.SmbPitchShifter.gAnaFreq = new float[MAX_FRAME_LENGTH]
private

◆ gAnaMagn

float [] NAudio.Dsp.SmbPitchShifter.gAnaMagn = new float[MAX_FRAME_LENGTH]
private

◆ gFFTworksp

float [] NAudio.Dsp.SmbPitchShifter.gFFTworksp = new float[2*MAX_FRAME_LENGTH]
private

◆ gInFIFO

float [] NAudio.Dsp.SmbPitchShifter.gInFIFO = new float[MAX_FRAME_LENGTH]
private

◆ gLastPhase

float [] NAudio.Dsp.SmbPitchShifter.gLastPhase = new float[MAX_FRAME_LENGTH/2 + 1]
private

◆ gOutFIFO

float [] NAudio.Dsp.SmbPitchShifter.gOutFIFO = new float[MAX_FRAME_LENGTH]
private

◆ gOutputAccum

float [] NAudio.Dsp.SmbPitchShifter.gOutputAccum = new float[2*MAX_FRAME_LENGTH]
private

◆ gRover

long NAudio.Dsp.SmbPitchShifter.gRover
private

◆ gSumPhase

float [] NAudio.Dsp.SmbPitchShifter.gSumPhase = new float[MAX_FRAME_LENGTH/2 + 1]
private

◆ gSynFreq

float [] NAudio.Dsp.SmbPitchShifter.gSynFreq = new float[MAX_FRAME_LENGTH]
private

◆ gSynMagn

float [] NAudio.Dsp.SmbPitchShifter.gSynMagn = new float[MAX_FRAME_LENGTH]
private

◆ MAX_FRAME_LENGTH

int NAudio.Dsp.SmbPitchShifter.MAX_FRAME_LENGTH = 16000
staticprivate

The documentation for this class was generated from the following file: