ddf.minim.ugens
Class DefaultInstrument

java.lang.Object
  extended by ddf.minim.ugens.DefaultInstrument
All Implemented Interfaces:
Instrument

public class DefaultInstrument
extends java.lang.Object
implements Instrument

You can use this default instrument to make sound if you don't want to write your own instrument. It's a good way to start playing around with the playNote method of AudioOutput. The default instrument makes a fuzzy triangle wave sound.

Author:
Anderson Mills

Constructor Summary
DefaultInstrument(float frequency, AudioOutput output)
          Construct a default instrument that will play a note at the given frequency on the given output.
 
Method Summary
 void noteOff()
          Turn off the default instrument.
 void noteOn(float dur)
          Turn on the default instrument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultInstrument

public DefaultInstrument(float frequency,
                         AudioOutput output)
Construct a default instrument that will play a note at the given frequency on the given output.

Parameters:
frequency - the frequency of the note
output - the output to play the note on when noteOn is called
Method Detail

noteOn

public void noteOn(float dur)
Turn on the default instrument

Specified by:
noteOn in interface Instrument
Parameters:
dur - The duration of the note.

noteOff

public void noteOff()
Turn off the default instrument.

Specified by:
noteOff in interface Instrument