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 floatcoefficientprivate intlastIndprotected static doubleTWOPI-
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.StringgetAlgorithmName()voidperform(double[] buffer)The perform method isvoidsetBlockSize(int bSize)Set the block size and update the coefficient.voidsetParams(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:
performin classDspAlgorithm
-
setParams
public void setParams(double param1)
When changing the parameter using the GUI, also update the number of oscillators used in calculation.- Overrides:
setParamsin classDspAlgorithm
-
setBlockSize
public void setBlockSize(int bSize)
Set the block size and update the coefficient.- Overrides:
setBlockSizein classDspAlgorithm- Parameters:
bSize-
-
getAlgorithmName
public java.lang.String getAlgorithmName()
- Specified by:
getAlgorithmNamein classDspAlgorithm- Returns:
- The name of the algorithm.
-
-