public class Evaluation
extends java.lang.Object
Evaluation
can be used to perform global evaluation on some output file.Constructor and Description |
---|
Evaluation() |
Modifier and Type | Method and Description |
---|---|
private static void |
argumentError(java.lang.String message)
Some argument error occurred.
|
private static void |
evaluateLpcfg()
Evaluate the input lpcfg results.
|
private static void |
evaluateTemperley(java.io.File file)
Evaluate a Temperley file output (from std in) based on the gold standard meter parsed
from the given MIDI or **kern file.
|
static java.lang.String |
getAccuracyString(Measure correctMeasure,
int correctSubBeatLength,
int correctAnacrusisLength,
Measure hypothesisMeasure,
int hypothesisSubBeatLength,
int hypothesisAnacrusisLength)
Get the accuracy String for a metrical hypothesis.
|
private static java.util.List<TimeSignature> |
getAllMeters(java.io.File file)
Get a List of all of the meters of the given song, excluding the initial dummy one.
|
private static int |
getMatch(int length,
int offset,
Measure correctMeasure,
int correctSubBeatLength,
int correctAnacrusisLength)
Get the match type of a grouping of the given length and offset given the correct measure,
anacrusis length, and sub beat length.
|
private static TimeSignature |
getMeter(java.io.File file)
Get the meter at the beginning of the given file.
|
private static java.lang.String |
getNoteFileString(java.io.File file)
Convert the given input file out into a note file.
|
private static int |
getNumLevels(java.lang.String line)
Return the number of levels on the given line of Temperley output.
|
static void |
main(java.lang.String[] args) |
public static void main(java.lang.String[] args) throws java.io.IOException, javax.sound.midi.InvalidMidiDataException
java.io.IOException
javax.sound.midi.InvalidMidiDataException
private static java.util.List<TimeSignature> getAllMeters(java.io.File file) throws java.io.IOException, javax.sound.midi.InvalidMidiDataException
file
- The file whose meters we want.java.lang.InterruptedException
javax.sound.midi.InvalidMidiDataException
java.io.IOException
private static TimeSignature getMeter(java.io.File file) throws java.io.IOException, javax.sound.midi.InvalidMidiDataException
file
- The file whose meter we want.java.lang.InterruptedException
javax.sound.midi.InvalidMidiDataException
java.io.IOException
private static void evaluateTemperley(java.io.File file) throws java.io.IOException, javax.sound.midi.InvalidMidiDataException
file
- The MIDI or **kern file which contains the gold standard meter.java.lang.InterruptedException
javax.sound.midi.InvalidMidiDataException
java.io.IOException
private static int getNumLevels(java.lang.String line)
line
- The line we are searching.public static java.lang.String getAccuracyString(Measure correctMeasure, int correctSubBeatLength, int correctAnacrusisLength, Measure hypothesisMeasure, int hypothesisSubBeatLength, int hypothesisAnacrusisLength)
correctMeasure
- The correct measure.correctSubBeatLength
- The correct sub beat length, in ticks.correctAnacrusisLength
- The correct anacrusis length, in ticks.hypothesisMeasure
- The hypothesis measure.hypothesisSubBeatLength
- The hypothesis sub beat length, in ticks.hypothesisAnacrusisLength
- The hypothesis anacrusis length, in ticks.private static int getMatch(int length, int offset, Measure correctMeasure, int correctSubBeatLength, int correctAnacrusisLength)
length
- The length of the grouping we want to check.offset
- The offset of the grouping we want to check.correctMeasure
- The correct measure of this song.correctSubBeatLength
- The correct sub beat length.correctAnacrusisLength
- The correct anacrusis length, measured in tacti.private static java.lang.String getNoteFileString(java.io.File file)
file
- The input file to be converted into a note file.private static void evaluateLpcfg()
private static void argumentError(java.lang.String message)
message
- The message to print to std err.