|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmckay.utilities.sound.midi.MIDIMethods
public class MIDIMethods
A holder class for static methods relating to MIDI.
| Constructor Summary | |
|---|---|
MIDIMethods()
|
|
| Method Summary | |
|---|---|
static javax.sound.midi.Sequence[] |
breakSequenceIntoWindows(javax.sound.midi.Sequence original_sequence,
double window_duration,
double window_overlap_offset)
IMPORTANT: THIS METHOD IS NOT YET FINISHED. |
static java.lang.String |
getMIDIFileFormatData(java.io.File file)
Returns information regarding a given MIDI file. |
static double[] |
getSecondsPerTick(javax.sound.midi.Sequence sequence)
Returns an array with an entry for each MIDI tick in the given MIDI sequence. |
static javax.sound.midi.Sequencer |
playMIDISequence(javax.sound.midi.Sequence midi_sequence)
Plays the given MIDI Sequence and returns the Sequencer that is playing it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MIDIMethods()
| Method Detail |
|---|
public static javax.sound.midi.Sequencer playMIDISequence(javax.sound.midi.Sequence midi_sequence)
throws java.lang.Exception
midi_sequence - The MIDI sequence to play
java.lang.Exception - Throws an exception if an empty MIDI sequence
is passed as an argument or if cannoth play.
public static java.lang.String getMIDIFileFormatData(java.io.File file)
throws java.lang.Exception
file - The file to return data about.
java.lang.Exception - Throws informative exceptions if the file is
invalid.public static double[] getSecondsPerTick(javax.sound.midi.Sequence sequence)
sequence - The MIDI Sequence from which to extract the tick
durations.
public static javax.sound.midi.Sequence[] breakSequenceIntoWindows(javax.sound.midi.Sequence original_sequence,
double window_duration,
double window_overlap_offset)
throws java.lang.Exception
original_sequence - The MIDI Sequence to break into windows.window_duration - The duration in seconds of each window.window_overlap_offset - The number of seconds that windows are
offset by. A value of zero means that
there is no window overlap.
java.lang.Exception - Throws an informative exception if the
MIDI file uses SMTPE timing instead of
PPQ timing or if it is too large.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||