org.jfugue
Class TimeFactor

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

public class TimeFactor
extends java.lang.Object


Field Summary
static double DEFAULT_BPM
           
static int QUARTER_DURATIONS_IN_WHOLE
           
 
Constructor Summary
TimeFactor()
           
 
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
 

Field Detail

DEFAULT_BPM

public static double DEFAULT_BPM

QUARTER_DURATIONS_IN_WHOLE

public static int QUARTER_DURATIONS_IN_WHOLE
Constructor Detail

TimeFactor

public TimeFactor()
Method Detail

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 deliver
recipient - the handler of the delivered message