Class MidiManager

java.lang.Object
ucar.unidata.util.MidiManager

public class MidiManager extends Object
Class MidiManager provides a wrapper around the java sound midi api. This was originally taken from the javasound demo
Version:
$Revision: 1.6 $
Author:
IDV Development Team
  • Constructor Details

    • MidiManager

      public MidiManager()
      Create a new MidiManager with defaults
    • MidiManager

      public MidiManager(MidiProperties props)
      Construct with the specified properties and open it.
      Parameters:
      props - properties
  • Method Details

    • close

      public void close()
      todo
    • open

      public void open()
      Open up the midi system
    • setInstrument

      public void setInstrument(int index)
      Set the current instrument
      Parameters:
      index - index into the instruments
    • setInstrument

      public void setInstrument(String instrumentName)
      Set the current instrument
      Parameters:
      instrumentName - name of the instrument
    • setInstrument

      public void setInstrument(Instrument instrument)
      Set the instrument to use
      Parameters:
      instrument - the instrument
    • getInstrumentList

      public static Instrument[] getInstrumentList()
      Get the list of instruments
      Returns:
      an array of instruments
    • play

      public void play(int key, long milliseconds)
      Play.
      Parameters:
      key - key to play in
      milliseconds - length of time
    • turnOffInABit

      public void turnOffInABit(int key, MidiChannel channel, int timeStamp, long milliseconds)
      Turn off in a thread
      Parameters:
      key - key to play in
      channel - channel to play
      timeStamp - timestamp
      milliseconds - length of time