本文整理匯總了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);
}