本文整理汇总了Java中com.jsyn.unitgen.SineOscillatorPhaseModulated类的典型用法代码示例。如果您正苦于以下问题:Java SineOscillatorPhaseModulated类的具体用法?Java SineOscillatorPhaseModulated怎么用?Java SineOscillatorPhaseModulated使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SineOscillatorPhaseModulated类属于com.jsyn.unitgen包,在下文中一共展示了SineOscillatorPhaseModulated类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import com.jsyn.unitgen.SineOscillatorPhaseModulated; //导入依赖的package包/类
public void init()
{
synth = JSyn.createSynthesizer();
// Add a tone generator.
synth.add( modulator = new SineOscillator() );
// Add a trigger.
synth.add( carrier = new SineOscillatorPhaseModulated() );
// Add an output mixer.
synth.add( lineOut = new LineOut() );
modulator.output.connect( carrier.modulation );
carrier.output.connect( 0, lineOut.input, 0 );
carrier.output.connect( 0, lineOut.input, 1 );
modulator.amplitude.setup( 0.0, 1.0, 10.0 );
carrier.amplitude.setup( 0.0, 1.0, 1.0 );
setupGUI();
}
示例2: init
import com.jsyn.unitgen.SineOscillatorPhaseModulated; //导入依赖的package包/类
@Override
public void init()
{
synth = JSyn.createSynthesizer();
// Add a tone generator.
synth.add( modulator = new SineOscillator() );
// Add a trigger.
synth.add( carrier = new SineOscillatorPhaseModulated() );
// Add an output mixer.
synth.add( lineOut = new LineOut() );
modulator.output.connect( carrier.modulation );
carrier.output.connect( 0, lineOut.input, 0 );
carrier.output.connect( 0, lineOut.input, 1 );
modulator.amplitude.setup( 0.0, 1.0, 10.0 );
carrier.amplitude.setup( 0.0, 1.0, 1.0 );
setupGUI();
}
示例3: init
import com.jsyn.unitgen.SineOscillatorPhaseModulated; //导入依赖的package包/类
@Override
public void init() {
synth = JSyn.createSynthesizer();
// Add a tone generator.
synth.add(modulator = new SineOscillator());
// Add a trigger.
synth.add(carrier = new SineOscillatorPhaseModulated());
// Add an output mixer.
synth.add(lineOut = new LineOut());
modulator.output.connect(carrier.modulation);
carrier.output.connect(0, lineOut.input, 0);
carrier.output.connect(0, lineOut.input, 1);
modulator.amplitude.setup(0.0, 1.0, 10.0);
carrier.amplitude.setup(0.0, 0.25, 1.0);
setupGUI();
}
示例4: DrumWoodFM
import com.jsyn.unitgen.SineOscillatorPhaseModulated; //导入依赖的package包/类
public DrumWoodFM() {
// Create unit generators.
add(carrierOsc = new SineOscillatorPhaseModulated());
add(freqDistributor = new PassThrough());
add(modSummer = new Add());
add(ampEnv = new EnvelopeAttackDecay());
add(modEnv = new EnvelopeAttackDecay());
add(modOsc = new SineOscillator());
add(frequencyMultiplier = new Multiply());
addPort(mcratio = frequencyMultiplier.inputB, "MCRatio");
addPort(index = modSummer.inputA, "Index");
addPort(modRange = modEnv.amplitude, "ModRange");
addPort(frequency = freqDistributor.input, "Frequency");
ampEnv.export(this, "Amp");
modEnv.export(this, "Mod");
freqDistributor.output.connect(carrierOsc.frequency);
freqDistributor.output.connect(frequencyMultiplier.inputA);
carrierOsc.output.connect(ampEnv.amplitude);
modEnv.output.connect(modSummer.inputB);
modSummer.output.connect(modOsc.amplitude);
modOsc.output.connect(carrierOsc.modulation);
frequencyMultiplier.output.connect(modOsc.frequency);
// Make the circuit turn off when the envelope finishes to reduce CPU load.
ampEnv.setupAutoDisable(this);
usePreset(0);
}