当前位置: 首页>>代码示例>>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;未经允许,请勿转载。