PitchShifting
JavaScript is disabled on your browser.
br.usp.ime.dspbenchmarking.algorithms
Class PitchShifting
- java.lang.Object
-
- br.usp.ime.dspbenchmarking.algorithms.DspAlgorithm
-
- br.usp.ime.dspbenchmarking.algorithms.PitchShifting
-
public class PitchShifting extends DspAlgorithm
ATTENTION: This class is currently not used. This is on of the reasons why is is not properly documented.
-
-
Field Summary
-
Fields inherited from class br.usp.ime.dspbenchmarking.algorithms.DspAlgorithm
blockSize, parameter1, sampleRate
-
-
Constructor Summary
Constructors Constructor and Description PitchShifting(int sRate, int bSize)
-
Method Summary
Methods Modifier and Type Method and Description java.lang.String
getAlgorithmName()
private int
getIndexOfMax(short[] a)
Returns the (first) index of the maximum value of an array.void
perform(double[] buffer)
Shifts the pitch of the incoming signal.private short[]
xcorr(short[] x1, short[] x2)
Calculates the correlation between two vectors.-
Methods inherited from class br.usp.ime.dspbenchmarking.algorithms.DspAlgorithm
getBlockSize, getParameter1, getSampleRate, setBlockSize, setParams
-
-
-
-
Method Detail
-
perform
public void perform(double[] buffer)
Shifts the pitch of the incoming signal.- Specified by:
perform
in classDspAlgorithm
-
xcorr
private short[] xcorr(short[] x1, short[] x2)
Calculates the correlation between two vectors.- Parameters:
x1
-x2
-- Returns:
-
getIndexOfMax
private int getIndexOfMax(short[] a)
Returns the (first) index of the maximum value of an array.- Parameters:
a
-- Returns:
-
getAlgorithmName
public java.lang.String getAlgorithmName()
- Specified by:
getAlgorithmName
in classDspAlgorithm
- Returns:
- The name of the algorithm.
-
-