• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java LineOut类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.jsyn.unitgen.LineOut的典型用法代码示例。如果您正苦于以下问题:Java LineOut类的具体用法?Java LineOut怎么用?Java LineOut使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LineOut类属于com.jsyn.unitgen包,在下文中一共展示了LineOut类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setUp

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
public void setUp() throws Exception {

        // Create a synthesizer
        synth = JSyn.createSynthesizer();

        passThrough = new PassThrough();

        // Prepare a SineOscillator (its amplitude will be modulated by the envelope)
        sineOsc = new SineOscillator();
        sineOsc.amplitude.set(1.0);
        sineOsc.frequency.set(320.0);

        // LineOut
        out1 = new LineOut();
        out2 = new LineOut();
        out3 = new LineOut();

        synth.add(out1);
        synth.add(out2);
        synth.add(out3);
        synth.add(passThrough);
        synth.add(sineOsc);
    }
 
开发者ID:StephaneMangin,项目名称:Synth,代码行数:24,代码来源:PassThroughTesting.java


示例2: setUp

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
public void setUp() throws Exception {

        // Create a synthesizer
        synth = JSyn.createSynthesizer();

        // Prepare a squareOscillator (it produce a binary signal !)
        // Needed for an envelope generator
        squareOsc = new SquareOscillator();
        squareOsc.amplitude.set(1.0);
        squareOsc.frequency.set(80.0);

        // Prepare a SineOscillator (its amplitude will be modulated by the envelope)
        sineOsc = new SineOscillator();
        sineOsc.amplitude.set(1.0);
        sineOsc.frequency.set(320.0);

        // LineOut
        out = new LineOut();

        synth.add(squareOsc);
        synth.add(out);
        synth.add(sineOsc);
    }
 
开发者ID:StephaneMangin,项目名称:Synth,代码行数:24,代码来源:EnvelopeGeneratorTest.java


示例3: JSynSynchronizeTesting

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
public JSynSynchronizeTesting() throws InterruptedException {
    synth = JSyn.createSynthesizer();

    sin = new SineOscillator();
    sin.amplitude.set(1.0);
    sin.frequency.set(320.0);

    synth.add(sin);

    out = new LineOut();
    synth.add(out);

    sin.output.connect(out.getInput());

    synth.start();
    out.start();

    ThreadUpdater tu = new ThreadUpdater(sin);
    Thread t = new Thread(tu);
    t.start();

    synth.sleepFor(10000.0);
}
 
开发者ID:StephaneMangin,项目名称:Synth,代码行数:24,代码来源:JSynSynchronizeTesting.java


示例4: JsynMultiply

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
public JsynMultiply() throws InterruptedException {

        synth = JSyn.createSynthesizer();
        lineOut = new LineOut();
        sine = new SineOscillator();
        multiply = new Multiply();

        synth.add(lineOut);
        synth.add(sine);
        synth.add(multiply);

        sine.frequency.set(320.0);
        sine.amplitude.set(1.0);

        sine.output.connect(multiply.inputA);
        multiply.inputB.set(0.0);

        multiply.output.connect(lineOut.input);

        lineOut.start();
        multiply.start();
        synth.start();

        synth.sleepFor(5.0);

    }
 
开发者ID:StephaneMangin,项目名称:Synth,代码行数:27,代码来源:JsynMultiply.java


示例5: init

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
public void init()
{
	setLayout( new BorderLayout() );

	synth = JSyn.createSynthesizer();
	synth.add( lineOut = new LineOut() );

	unitSource = createUnitSource();
	synth.add( unitSource.getUnitGenerator() );
	
	// Connect the source to both left and right speakers.
	unitSource.getOutput().connect( 0, lineOut.input, 0 );
	unitSource.getOutput().connect( 0, lineOut.input, 1 );

	tweaker = new SoundTweaker( synth, unitSource.getUnitGenerator().getClass().getName(), unitSource );
	add( tweaker, BorderLayout.CENTER );

	// Use a scope to see the output.
	scope = new AudioScope( synth );
	scope.addProbe( unitSource.getOutput() );
	scope.setTriggerMode( AudioScope.TriggerMode.NORMAL );
	scope.getView().setControlsVisible( false );
	add( BorderLayout.SOUTH, scope.getView() );
	
	validate();
}
 
开发者ID:WiredProgrammers,项目名称:collegeProjects,代码行数:27,代码来源:CircuitTester.java


示例6: init

import com.jsyn.unitgen.LineOut; //导入依赖的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


示例7: wire

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
@Override
public void wire() {
    source = createCircuit();
    whiteNoise = new WhiteNoise();

    synth = JSyn.createSynthesizer();
    synth.add(lineOut = new LineOut());
    synth.add(whiteNoise.getUnitGenerator());
    synth.add(source.getUnitGenerator());

    // circuit
    wireToLineOut(whiteNoise);
    wireToLineOut(source);
    
    synth.add(frequencyRamp = makeFrequencyRamp(getCircuit().frequency()));
    synth.add(amplitudeRamp = makeAmplitudeRamp(getCircuit().amplitude()));
}
 
开发者ID:vocobox,项目名称:vocobox,代码行数:18,代码来源:JsynOcclusiveNoiseSynth.java


示例8: init

import com.jsyn.unitgen.LineOut; //导入依赖的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


示例9: createUnits

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
private void createUnits()
{
	// Add a tone generators.
	synth.add( osc = new SineOscillator() );
	// Add a controller that will sweep the envelope rate up.
	synth.add( envSweeper = new ExponentialRamp() );
	// Add a controller that will sweep the oscillator down.
	synth.add( oscSweeper = new ExponentialRamp() );

	synth.add( latch = new LatchZeroCrossing() );
	// Add an output unit.
	synth.add( lineOut = new LineOut() );

	// Add an envelope player.
	synth.add( envelopePlayer = new VariableRateMonoReader() );
}
 
开发者ID:vocobox,项目名称:vocobox,代码行数:17,代码来源:NotesToTone.java


示例10: start

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
@Override
public void start() {
    synth = JSyn.createSynthesizer();
    synth.add(googleWaveUnit = new GoogleWaveOscillator());
    googleWaveUnit.amplitude.setup(0.02, 0.5, 1.0);
    googleWaveUnit.variance.setup(0.0, 0.0, 1.0);
    googleWaveUnit.frequency.setup(40.0, 200.0, 1000.0);

    // Add an output so we can hear it.
    synth.add(lineOut = new LineOut());

    googleWaveUnit.output.connect(0, lineOut.input, 0);
    googleWaveUnit.output.connect(0, lineOut.input, 1);

    setupGUI();

    // Start synthesizer using default stereo output at 44100 Hz.
    synth.start();
    // Start lineOut so it can pull data from other units.
    lineOut.start();

    // We only need to start the LineOut. It will pull data from the
    // oscillator.
    lineOut.start();

}
 
开发者ID:philburk,项目名称:jsyn,代码行数:27,代码来源:SeeGoogleWave.java


示例11: setupSynth

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
private void setupSynth(VoiceDescription description) {
    synth = JSyn.createSynthesizer();

    // Add an output.
    synth.add(lineOut = new LineOut());

    voiceDescription = description;
    multiSynth = new MultiChannelSynthesizer();
    final int startChannel = 0;
    multiSynth.setup(synth, startChannel, NUM_CHANNELS, VOICES_PER_CHANNEL, voiceDescription);
    midiSynthesizer = new MidiSynthesizer(multiSynth);

    multiSynth.getOutput().connect(0,lineOut.input, 0);
    multiSynth.getOutput().connect(1,lineOut.input, 1);

    // Start synthesizer using default stereo output at 44100 Hz.
    synth.start();
    lineOut.start();
}
 
开发者ID:philburk,项目名称:jsyn,代码行数:20,代码来源:PlayMIDI.java


示例12: init

import com.jsyn.unitgen.LineOut; //导入依赖的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


示例13: setupSynth

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
private void setupSynth() {
        synth = JSyn.createSynthesizer();

        voiceDescription = DualOscillatorSynthVoice.getVoiceDescription();
//        voiceDescription = SubtractiveSynthVoice.getVoiceDescription();

        multiSynth = new MultiChannelSynthesizer();
        final int startChannel = 0;
        multiSynth.setup(synth, startChannel, NUM_CHANNELS, VOICES_PER_CHANNEL, voiceDescription);
        midiSynthesizer = new MidiSynthesizer(multiSynth);

        // Create a LineOut for the entire synthesizer.
        synth.add(lineOut = new LineOut());
        multiSynth.getOutput().connect(0,lineOut.input, 0);
        multiSynth.getOutput().connect(1,lineOut.input, 1);

        // Start synthesizer using default stereo output at 44100 Hz.
        synth.start();
        lineOut.start();

    }
 
开发者ID:philburk,项目名称:jsyn,代码行数:22,代码来源:UseMidiKeyboard.java


示例14: testMixedAdding

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
public void testMixedAdding() {
    boolean gotCaught = false;
    SynthesisEngine synthesisEngine1 = new SynthesisEngine();
    synthesisEngine1.setRealTime(false);
    synthesisEngine1.setPullDataEnabled(true);
    SynthesisEngine synthesisEngine2 = new SynthesisEngine();
    synthesisEngine2.setRealTime(false);
    synthesisEngine2.setPullDataEnabled(true);

    // Create a sineOscillator but do not add it to the synth!
    SineOscillator sineOscillator = new SineOscillator();
    LineOut lineOut = new LineOut();

    synthesisEngine1.add(lineOut);
    synthesisEngine2.add(sineOscillator);
    try {
        sineOscillator.output.connect(0, lineOut.input, 0);
    } catch (RuntimeException e) {
        gotCaught = true;
        assertTrue("informative MPE message", e.getMessage().contains("different synths"));
    }

    assertTrue("caught NPE caused by forgetting synth.add", gotCaught);
}
 
开发者ID:philburk,项目名称:jsyn,代码行数:25,代码来源:TestEngine.java


示例15: SimpleJsynAudioGenerator

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
public SimpleJsynAudioGenerator(String sonificationType) {
    mAudioManager = new AndroidAudioForJSyn();
    mSynth = JSyn.createSynthesizer(mAudioManager);
    // Add an output mixer.
    mSynth.add(mLineOut = new LineOut());
    setSonificationType(sonificationType);
}
 
开发者ID:google,项目名称:science-journal,代码行数:8,代码来源:SimpleJsynAudioGenerator.java


示例16: testGatePort

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
@Test
public void testGatePort() throws InterruptedException {
    TriangleOscillator oscillator = new TriangleOscillator();
    oscillator.frequency.set(440.0);
    oscillator.amplitude.set(0.9);
    Synthesizer synthesis = Factory.createSynthesizer();
    LineOut lineOut = new LineOut();

    synthesis.add(lineOut);
    synthesis.add(oscillator);

    MyGate gate = new MyGate();

    synthesis.add(gate);

    gate.signal.connect(oscillator.output);
    lineOut.input.connect(gate.output);

    gate.start();
    lineOut.start();
    synthesis.start();
    synthesis.sleepFor(3);
    gate.input.on();
    synthesis.sleepFor(3);
    gate.input.off();
    synthesis.sleepFor(3);
}
 
开发者ID:StephaneMangin,项目名称:Synth,代码行数:28,代码来源:GatePrototype.java


示例17: Chanels

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
public Chanels() {
	synth = JSyn.createSynthesizer();
	
	lineOut = new LineOut();
	synth.add(lineOut);
	
	chanels = new Chanel[CHANELS];
	
	for(int i = 0; i < CHANELS; i++) {
		chanels[i] = new Chanel(this);
	}
	
	synth.start();
	lineOut.start();
}
 
开发者ID:julianmaster,项目名称:ChiptuneTracker,代码行数:16,代码来源:Chanels.java


示例18: init

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
public void init()
{
	synth = JSyn.createSynthesizer();
	// Add a tone generator.
	synth.add( osc = new SineOscillator() );
	// Add a trigger.
	synth.add( gatingOsc = new SquareOscillator() );
	// Use an envelope to control the amplitude.
	synth.add( dahdsr = new EnvelopeDAHDSR() );
	// Add an output mixer.
	synth.add( lineOut = new LineOut() );

	//e/xit1.add();
	gatingOsc.output.connect( dahdsr.input );
	dahdsr.output.connect( osc.amplitude );
	dahdsr.attack.setup( 0.001, 0.01, 2.0 );
	osc.output.connect( 0, lineOut.input, 0 );
	osc.output.connect( 0, lineOut.input, 1 );

	gatingOsc.frequency.setup( 0.001, 0.5, 10.0 );
	gatingOsc.frequency.setName("Rate");

	osc.frequency.setup( 50.0, 440.0, 2000.0 );
	osc.frequency.setName("Freq");
	

	// Arrange the knob in a row.
	setLayout( new GridLayout( 1, 0 ) );

	setupPortKnob( osc.frequency );
	setupPortKnob( gatingOsc.frequency );
	setupPortKnob( dahdsr.attack );
	setupPortKnob( dahdsr.hold );
	setupPortKnob( dahdsr.decay );
	setupPortKnob( dahdsr.sustain );
	setupPortKnob( dahdsr.release );

	validate();
}
 
开发者ID:WiredProgrammers,项目名称:collegeProjects,代码行数:40,代码来源:HearDAHDSR.java


示例19: init

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
public void init()
{
	synth = JSyn.createSynthesizer();
	
	// Add a tone generator. (band limited sawtooth)
	synth.add( osc = new SawtoothOscillatorBL() );
	// Add a lag to smooth out amplitude changes and avoid pops.
	synth.add( lag = new LinearRamp() );
	// Add an output mixer.
	synth.add( lineOut = new LineOut() );
	// Connect the oscillator to both left and right output.
	osc.output.connect( 0, lineOut.input, 0 );
	osc.output.connect( 0, lineOut.input, 1 );
	
	// Set the minimum, current and maximum values for the port.
	lag.output.connect( osc.amplitude );
	lag.input.setup( 0.0, 0.5, 1.0 );
	lag.time.set(  0.2 );

	// Arrange the faders in a stack.
	setLayout( new GridLayout( 0, 1 ) );

	ExponentialRangeModel amplitudeModel = PortModelFactory.createExponentialModel( lag.input );
	RotaryTextController knob = new RotaryTextController( amplitudeModel, 5 );
	JPanel knobPanel = new JPanel();
	knobPanel.add( knob );
	add( knobPanel );

	osc.frequency.setup( 50.0, 300.0, 10000.0 );
	add( PortControllerFactory.createExponentialPortSlider( osc.frequency ) );
	validate();
}
 
开发者ID:WiredProgrammers,项目名称:collegeProjects,代码行数:33,代码来源:SawFaders.java


示例20: initSynthetizer

import com.jsyn.unitgen.LineOut; //导入依赖的package包/类
public void initSynthetizer() {
    synth = JSyn.createSynthesizer();
    synth.add(oscillo = new SineOscillator());
    synth.add(lineOut = new LineOut());
    synth.add(frequencyRamp = makeFrequencyRamp(oscillo.frequency));
    synth.add(amplitudeRamp = makeAmplitudeRamp(oscillo.amplitude));
}
 
开发者ID:vocobox,项目名称:vocobox,代码行数:8,代码来源:JsynMonoscilloRampSynth.java



注:本文中的com.jsyn.unitgen.LineOut类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java R类代码示例发布时间:2022-05-22
下一篇:
Java LocalSessionFactoryBuilder类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap