AdditiveSynthesisSine
JavaScript is disabled on your browser.
br.usp.ime.dspbenchmarking.algorithms
Class AdditiveSynthesisSine
- java.lang.Object
-
- br.usp.ime.dspbenchmarking.algorithms.DspAlgorithm
-
- br.usp.ime.dspbenchmarking.algorithms.StressAlgorithm
-
- br.usp.ime.dspbenchmarking.algorithms.AdditiveSynthesisSine
-
public class AdditiveSynthesisSine extends StressAlgorithm
Additive Synthesis using Java's Math.sin() method. It uses a number of oscillators equal to the stressParameter.
-
-
Field Summary
Fields Modifier and Type Field and Description private float
coefficient
private int
lastInd
protected static double
TWOPI
-
Fields inherited from class br.usp.ime.dspbenchmarking.algorithms.StressAlgorithm
stressParameter
-
Fields inherited from class br.usp.ime.dspbenchmarking.algorithms.DspAlgorithm
blockSize, parameter1, sampleRate
-
-
Constructor Summary
Constructors Constructor and Description AdditiveSynthesisSine(int sRate, int bSize, int stressParam)
-
Method Summary
Methods Modifier and Type Method and Description java.lang.String
getAlgorithmName()
void
perform(double[] buffer)
The perform method isvoid
setBlockSize(int bSize)
Set the block size and update the coefficient.void
setParams(double param1)
When changing the parameter using the GUI, also update the number of oscillators used in calculation.-
Methods inherited from class br.usp.ime.dspbenchmarking.algorithms.StressAlgorithm
setStressParameter
-
Methods inherited from class br.usp.ime.dspbenchmarking.algorithms.DspAlgorithm
getBlockSize, getParameter1, getSampleRate
-
-
-
-
Field Detail
-
TWOPI
protected static final double TWOPI
- See Also:
- Constant Field Values
-
lastInd
private int lastInd
-
coefficient
private float coefficient
-
-
Constructor Detail
-
AdditiveSynthesisSine
public AdditiveSynthesisSine(int sRate, int bSize, int stressParam)
-
-
Method Detail
-
perform
public void perform(double[] buffer)
The perform method is- Specified by:
perform
in classDspAlgorithm
-
setParams
public void setParams(double param1)
When changing the parameter using the GUI, also update the number of oscillators used in calculation.- Overrides:
setParams
in classDspAlgorithm
-
setBlockSize
public void setBlockSize(int bSize)
Set the block size and update the coefficient.- Overrides:
setBlockSize
in classDspAlgorithm
- Parameters:
bSize
-
-
getAlgorithmName
public java.lang.String getAlgorithmName()
- Specified by:
getAlgorithmName
in classDspAlgorithm
- Returns:
- The name of the algorithm.
-
-