public class Runner
extends java.lang.Object
Runner class is the interface which runs all of the different parts
of the beattracking project directly. This is used as an interface between Main,
which interprets the command line arguments, and the actual functionality of this project.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_BEAT_TRACKER
The default beat tracker to use.
|
static java.lang.String |
DEFAULT_HIERARCHY_MODEL
The default hierarchy model to use.
|
static java.lang.String |
DEFAULT_VOICE_SPLITTER
The default voice splitter to use.
|
| Constructor and Description |
|---|
Runner() |
| Modifier and Type | Method and Description |
|---|---|
static EventParser |
parseFile(java.io.File file,
NoteEventParser parser,
TimeTracker tt)
Parse the given file with the given objects.
|
static EventParser |
parseFile(java.io.File file,
NoteEventParser parser,
TimeTracker tt,
boolean useChannel)
Parse the given file with the given objects.
|
static KernEventParser |
parseKernFile(java.io.File file,
NoteEventParser parser,
TimeTracker tt)
Parse the given **kern file using the given objects.
|
static MidiEventParser |
parseMidiFile(java.io.File file,
NoteEventParser parser,
TimeTracker tt,
boolean useChannel)
Parse the given MIDI file using the given objects.
|
static void |
performInference(MidiModel model,
NoteListGenerator nlg)
Perform inference on the given model.
|
public static final java.lang.String DEFAULT_VOICE_SPLITTER
public static final java.lang.String DEFAULT_BEAT_TRACKER
public static final java.lang.String DEFAULT_HIERARCHY_MODEL
public static EventParser parseFile(java.io.File file, NoteEventParser parser, TimeTracker tt) throws java.io.IOException, javax.sound.midi.InvalidMidiDataException
parseFile(File, NoteEventParser, TimeTracker, boolean), with useChannel set to the
default value (true).
parseKernFile(File, NoteEventParser, TimeTracker)
(for **kern files) or parseMidiFile(File, NoteEventParser, TimeTracker, boolean)
(for MIDI files).file - The file to parse.parser - The NoteEventParser to pass note events to.tt - The TimeTracker to pass time events to.javax.sound.midi.InvalidMidiDataException - If there was invalid MIDI data in the given File (And parsing
as a **kern file didn't work).java.io.IOException - If there was some I/O error when parsing as MIDI, or some syntax error when parsing
as **kern (and neither worked).public static EventParser parseFile(java.io.File file, NoteEventParser parser, TimeTracker tt, boolean useChannel) throws java.io.IOException, javax.sound.midi.InvalidMidiDataException
parseFile(File, NoteEventParser, TimeTracker), as it simply passes the arguments through
to this method, using the default value for useChannel.
parseKernFile(File, NoteEventParser, TimeTracker)
(for **kern files) or parseMidiFile(File, NoteEventParser, TimeTracker, boolean)
(for MIDI files).file - The file to parse.parser - The NoteEventParser to pass note events to.tt - The TimeTracker to pass time events to.java.io.IOException - The File was unable to be parsed for some reason.javax.sound.midi.InvalidMidiDataException - The File contained invalid MIDI data.public static MidiEventParser parseMidiFile(java.io.File file, NoteEventParser parser, TimeTracker tt, boolean useChannel) throws javax.sound.midi.InvalidMidiDataException, java.io.IOException
file - The MIDI File we wish to parse.parser - The NoteEventParser we want our EventParser to pass note events to.tt - The TimeTracker we want our EventParser to pass time events to.useChannel - Whether we want to use channels as a gold standard voice (TRUE), or tracks (FALSE),
when parsing midi.javax.sound.midi.InvalidMidiDataException - If the File contains invalid MIDI data.java.io.IOException - If there was an error reading the File.public static KernEventParser parseKernFile(java.io.File file, NoteEventParser parser, TimeTracker tt) throws java.io.IOException
file - The **kern File we wish to parse.parser - The NoteEventParser we want our EventParser to pass note events to.tt - The TimeTracker we want our EventParser to pass time events to.java.io.IOException - If there was some error reading or parsing the file.public static void performInference(MidiModel model, NoteListGenerator nlg)
model - The model on which we want to perform inference.nlg - The NoteListGenerator which will give us the incoming note lists.