org.jfugue
Class TimeFactor
java.lang.Object
org.jfugue.TimeFactor
public final class TimeFactor
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
equals, 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 final double getTimeFactor(javax.sound.midi.Sequence sequence,
double bpm)
parseMicrosecondsPerBeat
public static final int parseMicrosecondsPerBeat(javax.sound.midi.MetaMessage message,
long timestamp)
convertMicrosecondsPerBeatToBPM
public static final double convertMicrosecondsPerBeatToBPM(double value)
- Converts microseconds per beat to BPM -- and vice versa
convertBPMToMicrosecondsPerBeat
public static final double convertBPMToMicrosecondsPerBeat(int bpm)
- Converts microseconds per beat to BPM -- and vice versa
sortAndDeliverMidiMessages
public static final 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