com.frinika.tootX.midi
Class MidiEventRouter

java.lang.Object
  extended by com.frinika.tootX.midi.MidiEventRouter
All Implemented Interfaces:
MidiFilter

public class MidiEventRouter
extends java.lang.Object
implements MidiFilter

Implements a MidiFilter. A Controls are associated with events using a hastable. Usage: MidiEventRouter router = midiDeviceRouter.getROuter(dev.getDeviceInfo()); router.setLearning(control); // use midi controller See for example MidiLearnFrame.

Author:
pjl

Method Summary
 void assignMapper()
          called when last message was the type you want to do the control.
 void assignMapping(java.lang.Long midiHash, uk.org.toot.control.Control contrl)
           
 void close()
           
 boolean consume(javax.sound.midi.MidiMessage mess, long stamp)
          implements MidiFilter
 void setLearning(uk.org.toot.control.Control focus)
          set mode to learning listen to midi event You then call assignMapper()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

close

public void close()

setLearning

public void setLearning(uk.org.toot.control.Control focus)
set mode to learning listen to midi event You then call assignMapper()

Parameters:
focus - (control to be manipulated)

consume

public boolean consume(javax.sound.midi.MidiMessage mess,
                       long stamp)
implements MidiFilter

Specified by:
consume in interface MidiFilter
Parameters:
mess - midimessage
stamp - time stamp
Returns:
true if the event was found in the map and used

assignMapper

public void assignMapper()
called when last message was the type you want to do the control.


assignMapping

public void assignMapping(java.lang.Long midiHash,
                          uk.org.toot.control.Control contrl)