當前位置: 首頁>>代碼示例>>Java>>正文


Java SineOscillatorPhaseModulated類代碼示例

本文整理匯總了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();
}
 
開發者ID:WiredProgrammers,項目名稱:collegeProjects,代碼行數:18,代碼來源:HearSinePM.java

示例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();
}
 
開發者ID:vocobox,項目名稱:vocobox,代碼行數:19,代碼來源:HearSinePM.java

示例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();
}
 
開發者ID:philburk,項目名稱:jsyn,代碼行數:18,代碼來源:HearSinePM.java

示例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);
}
 
開發者ID:philburk,項目名稱:jsyn,代碼行數:33,代碼來源:DrumWoodFM.java


注:本文中的com.jsyn.unitgen.SineOscillatorPhaseModulated類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。