本文整理汇总了Java中com.jsyn.unitgen.ImpulseOscillatorBL类的典型用法代码示例。如果您正苦于以下问题:Java ImpulseOscillatorBL类的具体用法?Java ImpulseOscillatorBL怎么用?Java ImpulseOscillatorBL使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ImpulseOscillatorBL类属于com.jsyn.unitgen包,在下文中一共展示了ImpulseOscillatorBL类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: start
import com.jsyn.unitgen.ImpulseOscillatorBL; //导入依赖的package包/类
@Override
public void start()
{
synth = JSyn.createSynthesizer();
// Use a multiplier for gain control and so we can hook up to the scope
// from a single unit.
synth.add( oscGain = new Multiply() );
oscGain.inputB.setup( 0.02, 0.5, 1.0 );
oscGain.inputB.setName( "Amplitude" );
synth.add( freqRamp = new LinearRamp() );
freqRamp.input.setup( 50.0, 300.0, 20000.0 );
freqRamp.input.setName( "Frequency" );
freqRamp.time.set( 0.1 );
// Add an output so we can hear the oscillators.
synth.add( lineOut = new LineOut() );
oscGain.output.connect( lineOut.input );
setupGUI();
buttonGroup = new ButtonGroup();
addOscillator( new SineOscillator(), "Sine" );
addOscillator( new TriangleOscillator(), "Triangle" );
addOscillator( new SawtoothOscillator(), "Sawtooth" );
addOscillator( new SawtoothOscillatorBL(), "SawBL" );
addOscillator( new SawtoothOscillatorDPW(), "SawDPW" );
addOscillator( new RedNoise(), "RedNoise" );
addOscillator( new SquareOscillator(), "Square" );
addOscillator( new SquareOscillatorBL(), "SquareBL" );
addOscillator( new PulseOscillator(), "Pulse" );
addOscillator( new PulseOscillatorBL(), "PulseBL" );
addOscillator( new ImpulseOscillator(), "Impulse" );
addOscillator( new ImpulseOscillatorBL(), "ImpulseBL" );
// 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();
}
示例2: start
import com.jsyn.unitgen.ImpulseOscillatorBL; //导入依赖的package包/类
@Override
public void start() {
synth = JSyn.createSynthesizer();
// Use a multiplier for gain control and so we can hook up to the scope
// from a single unit.
synth.add(oscGain = new Multiply());
oscGain.inputB.setup(0.02, 0.5, 1.0);
oscGain.inputB.setName("Amplitude");
synth.add(freqRamp = new LinearRamp());
freqRamp.input.setup(50.0, 300.0, 20000.0);
freqRamp.input.setName("Frequency");
freqRamp.time.set(0.1);
synth.add(widthRamp = new LinearRamp());
widthRamp.input.setup(-1.0, 0.0, 1.0);
widthRamp.input.setName("Width");
widthRamp.time.set(0.1);
synth.add(shapeRamp = new LinearRamp());
shapeRamp.input.setup(-1.0, 0.0, 1.0);
shapeRamp.input.setName("Shape");
shapeRamp.time.set(0.1);
// Add an output so we can hear the oscillators.
synth.add(lineOut = new LineOut());
oscGain.output.connect(0, lineOut.input, 0);
oscGain.output.connect(0, lineOut.input, 1);
setupGUI();
buttonGroup = new ButtonGroup();
addOscillator(new SineOscillator(), "Sine");
addOscillator(new TriangleOscillator(), "Triangle");
addOscillator(new SawtoothOscillator(), "Sawtooth");
addOscillator(new SawtoothOscillatorBL(), "SawBL");
addOscillator(new SawtoothOscillatorDPW(), "SawDPW");
addOscillator(new RedNoise(), "RedNoise");
addOscillator(new SquareOscillator(), "Square");
addOscillator(new SquareOscillatorBL(), "SquareBL");
addOscillator(new PulseOscillator(), "Pulse");
addOscillator(new PulseOscillatorBL(), "PulseBL");
addOscillator(new MorphingOscillatorBL(), "MorphBL");
addOscillator(new ImpulseOscillator(), "Impulse");
addOscillator(new ImpulseOscillatorBL(), "ImpulseBL");
// 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();
}