ufg.processing
Class MidiPlayer

java.lang.Object
  extended by java.lang.Thread
      extended by ufg.processing.MidiPlayer
All Implemented Interfaces:
java.lang.Runnable, java.util.EventListener, javax.sound.midi.MetaEventListener

public class MidiPlayer
extends java.lang.Thread
implements javax.sound.midi.MetaEventListener


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MidiPlayer(java.lang.String filePath)
           
 
Method Summary
 void destroy()
           
 boolean isDone()
           
 void loop()
           
 void meta(javax.sound.midi.MetaMessage event)
           
static void playNote(int note)
           
static void playNote(int channel, int note, int velocity, int duration)
           
 void start()
           
static void startNote(int note)
           
static void startNote(int channel, int note, int velocity)
           
static void stopNote(int note)
           
static void stopNote(int channel, int note)
           
 void stopp()
           
 void waitUntilFinished()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MidiPlayer

public MidiPlayer(java.lang.String filePath)
Method Detail

loop

public void loop()

start

public void start()
Overrides:
start in class java.lang.Thread

stopp

public void stopp()

destroy

public void destroy()
Overrides:
destroy in class java.lang.Thread

isDone

public boolean isDone()

waitUntilFinished

public void waitUntilFinished()

meta

public void meta(javax.sound.midi.MetaMessage event)
Specified by:
meta in interface javax.sound.midi.MetaEventListener

playNote

public static void playNote(int note)

playNote

public static void playNote(int channel,
                            int note,
                            int velocity,
                            int duration)

startNote

public static void startNote(int note)

startNote

public static void startNote(int channel,
                             int note,
                             int velocity)

stopNote

public static void stopNote(int note)

stopNote

public static void stopNote(int channel,
                            int note)