org.jfugue
Class TimeFactor
java.lang.Object
org.jfugue.TimeFactor
public class TimeFactor
- extends java.lang.Object
Method Summary |
static double |
getTimeFactor(javax.sound.midi.Sequence sequence,
double bpm)
|
static int |
parseTempo(javax.sound.midi.MetaMessage message,
long timestamp)
|
static void |
sortAndDeliverMidiMessages(javax.sound.midi.Sequence sequence,
MidiMessageRecipient recipient)
Takes all of the MIDI events in the given Sequence, sorts them according to
when they are to be played, and sends the events to the MidiMessageRecipient
when the each event is ready to be played. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_BPM
public static double DEFAULT_BPM
QUARTER_DURATIONS_IN_WHOLE
public static int QUARTER_DURATIONS_IN_WHOLE
TimeFactor
public TimeFactor()
getTimeFactor
public static double getTimeFactor(javax.sound.midi.Sequence sequence,
double bpm)
parseTempo
public static int parseTempo(javax.sound.midi.MetaMessage message,
long timestamp)
sortAndDeliverMidiMessages
public static void sortAndDeliverMidiMessages(javax.sound.midi.Sequence sequence,
MidiMessageRecipient recipient)
- Takes all of the MIDI events in the given Sequence, sorts them according to
when they are to be played, and sends the events to the MidiMessageRecipient
when the each event is ready to be played.
- Parameters:
sequence
- The Sequence with messages to sort and deliverrecipient
- the handler of the delivered message