Package wellen.dsp
Class FMSynthesis
java.lang.Object
wellen.dsp.FMSynthesis
- All Implemented Interfaces:
DSPNodeOutput
FM synthesis with two oscillators, carrier ( e.g fundamental or *pitch* ) and modulator.
formula taken from [Anders Øland & Roger B. Dannenberg: FM Synthesis -- Introduction to Computer Music Carnegie Mellon University](http://www.cs.cmu.edu/~music/icm-online/readings/fm-synthesis/fm_synthesis.pdf)
f(t) = A sin(2πCt + D sin(2πMt))
A :: amplitude
Ct :: carrier
Mt :: modulator
D :: modulation depth
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
float
float
output()
returns the output signal.void
set_amplitude
(float pAmplitude) void
set_carrier
(Wavetable pCarrier) void
set_modulation_depth
(float pModulationDepth) void
set_modulator
(Wavetable pModulator)
-
Constructor Details
-
FMSynthesis
-
FMSynthesis
public FMSynthesis()
-
-
Method Details
-
get_modulator
-
set_modulator
-
get_carrier
-
set_carrier
-
get_amplitude
public float get_amplitude() -
set_amplitude
public void set_amplitude(float pAmplitude) -
get_modulation_depth
public float get_modulation_depth() -
set_modulation_depth
public void set_modulation_depth(float pModulationDepth) -
output
public float output()Description copied from interface:DSPNodeOutput
returns the output signal.- Specified by:
output
in interfaceDSPNodeOutput
- Returns:
- output signal
-