Package at.ofai.music.util
Class EventList
- java.lang.Object
-
- at.ofai.music.util.EventList
-
- All Implemented Interfaces:
- java.io.Serializable
public class EventList extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description protected static int
clockRate
protected static int
clockUnits
protected static at.ofai.music.util.Flags
flags
java.util.LinkedList<Event>
l
protected static double
metricalLevel
protected static boolean
noMelody
protected static boolean
onlyMelody
protected static boolean
timingCorrection
protected static double
timingDisplacement
static double
UNKNOWN
-
Constructor Summary
Constructors Constructor and Description EventList()
EventList(Event[] e)
EventList(EventList e)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
add(Event e)
void
add(EventList ev)
static java.lang.String
getAudioFileFromWormFile(java.lang.String wormFile)
static double
getTrackLevelFromWormFile(java.lang.String wormFile)
static java.lang.String
getWormFileAttribute(java.lang.String wormFile, java.lang.String attr)
void
insert(Event newEvent, boolean uniqueTimes)
java.util.Iterator<Event>
iterator()
java.util.ListIterator<Event>
listIterator()
static void
main(java.lang.String[] args)
void
print()
static EventList
readBeatsAsText(java.lang.String fileName)
static EventList
readBeatTrackFile(java.lang.String fileName)
static EventList
readBinary(java.lang.String fileName)
static EventList
readLabelFile(java.lang.String fileName)
Reads a file containing time,String pairs into an EventList.static EventList
readMatchFile(java.lang.String fileName)
static EventList
readMidiFile(java.lang.String fileName)
static EventList
readMidiFile(java.lang.String fileName, int skipTrackFlag)
static EventList
readWormFile(java.lang.String fileName)
static void
setTimingCorrection(double corr)
int
size()
Event[]
toArray()
Event[]
toArray(int match)
javax.sound.midi.Sequence
toMIDI(EventList pedal)
double[]
toOnsetArray()
void
writeBeatsAsText(java.lang.String fileName)
void
writeBeatTrackFile(java.lang.String fileName)
void
writeBinary(java.lang.String fileName)
void
writeLabelFile(java.lang.String fileName)
void
writeMIDI(java.lang.String fileName)
void
writeMIDI(java.lang.String fileName, EventList pedal)
-
-
-
Field Detail
-
clockRate
protected static int clockRate
-
clockUnits
protected static int clockUnits
-
flags
protected static at.ofai.music.util.Flags flags
-
l
public java.util.LinkedList<Event> l
-
metricalLevel
protected static double metricalLevel
-
noMelody
protected static boolean noMelody
-
onlyMelody
protected static boolean onlyMelody
-
timingCorrection
protected static boolean timingCorrection
-
timingDisplacement
protected static double timingDisplacement
-
UNKNOWN
public static final double UNKNOWN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EventList
public EventList()
-
EventList
public EventList(Event[] e)
-
EventList
public EventList(EventList e)
-
-
Method Detail
-
add
public void add(Event e)
-
add
public void add(EventList ev)
-
insert
public void insert(Event newEvent, boolean uniqueTimes)
-
listIterator
public java.util.ListIterator<Event> listIterator()
-
iterator
public java.util.Iterator<Event> iterator()
-
size
public int size()
-
toArray
public Event[] toArray()
-
toOnsetArray
public double[] toOnsetArray()
-
toArray
public Event[] toArray(int match)
-
writeBinary
public void writeBinary(java.lang.String fileName)
-
readBinary
public static EventList readBinary(java.lang.String fileName)
-
writeMIDI
public void writeMIDI(java.lang.String fileName)
-
writeMIDI
public void writeMIDI(java.lang.String fileName, EventList pedal)
-
toMIDI
public javax.sound.midi.Sequence toMIDI(EventList pedal) throws javax.sound.midi.InvalidMidiDataException
- Throws:
javax.sound.midi.InvalidMidiDataException
-
readMidiFile
public static EventList readMidiFile(java.lang.String fileName)
-
readMidiFile
public static EventList readMidiFile(java.lang.String fileName, int skipTrackFlag)
-
print
public void print()
-
setTimingCorrection
public static void setTimingCorrection(double corr)
-
readBeatsAsText
public static EventList readBeatsAsText(java.lang.String fileName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
readBeatTrackFile
public static EventList readBeatTrackFile(java.lang.String fileName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
writeBeatsAsText
public void writeBeatsAsText(java.lang.String fileName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
writeBeatTrackFile
public void writeBeatTrackFile(java.lang.String fileName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
readLabelFile
public static EventList readLabelFile(java.lang.String fileName) throws java.lang.Exception
Reads a file containing time,String pairs into an EventList.- Throws:
java.lang.Exception
-
writeLabelFile
public void writeLabelFile(java.lang.String fileName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
readWormFile
public static EventList readWormFile(java.lang.String fileName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getAudioFileFromWormFile
public static java.lang.String getAudioFileFromWormFile(java.lang.String wormFile)
-
getTrackLevelFromWormFile
public static double getTrackLevelFromWormFile(java.lang.String wormFile)
-
getWormFileAttribute
public static java.lang.String getWormFileAttribute(java.lang.String wormFile, java.lang.String attr)
-
readMatchFile
public static EventList readMatchFile(java.lang.String fileName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-