org.jfugue
Class DeviceThatWillTransmitMidi

java.lang.Object
  extended by org.jfugue.DeviceThatWillTransmitMidi

public class DeviceThatWillTransmitMidi
extends java.lang.Object

Represents an attached MIDI device, such as a keyboard. This class uses javax.sound.MidiDevice, but is not derived from javax.sound.MidiDevice.

Version:
3.0
Author:
David Koelle

Constructor Summary
DeviceThatWillTransmitMidi()
          Creates a new DeviceThatWillTransmitMidi using JFugue's Intelligent Device Resolver to pick the most likely device to open.
DeviceThatWillTransmitMidi(javax.sound.midi.MidiDevice.Info info)
           
 
Method Summary
 void addParserListener(ParserListener listener)
           
 void close()
           
 Pattern getPatternFromListening()
           
 javax.sound.midi.Sequence getSequenceFromListening()
           
 javax.sound.midi.Transmitter getTransmitter()
           
 void listenForMillis(long millis)
           
 void removeParserListener(ParserListener listener)
           
 void startListening()
          Reads a pattern from the external device - use this to record the keys you're pressing on the keyboard! This method will return a JFugue Pattern, which you can then manipulate to your heart's content.
 void stopListening()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeviceThatWillTransmitMidi

public DeviceThatWillTransmitMidi()
                           throws javax.sound.midi.MidiUnavailableException
Creates a new DeviceThatWillTransmitMidi using JFugue's Intelligent Device Resolver to pick the most likely device to open.

Throws:
javax.sound.midi.MidiUnavailableException

DeviceThatWillTransmitMidi

public DeviceThatWillTransmitMidi(javax.sound.midi.MidiDevice.Info info)
                           throws javax.sound.midi.MidiUnavailableException
Throws:
javax.sound.midi.MidiUnavailableException
Method Detail

getTransmitter

public javax.sound.midi.Transmitter getTransmitter()

addParserListener

public void addParserListener(ParserListener listener)

removeParserListener

public void removeParserListener(ParserListener listener)

startListening

public void startListening()
Reads a pattern from the external device - use this to record the keys you're pressing on the keyboard! This method will return a JFugue Pattern, which you can then manipulate to your heart's content.


stopListening

public void stopListening()

listenForMillis

public void listenForMillis(long millis)
                     throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

getPatternFromListening

public Pattern getPatternFromListening()

getSequenceFromListening

public javax.sound.midi.Sequence getSequenceFromListening()

close

public void close()