public class FromFileMetricalModelState extends MetricalModelState implements java.lang.Comparable<FromFileMetricalModelState>
FromFileHierarchyModelState grabs the correct metrical structure from the MIDI file and
uses that to construct the proper meter.| Modifier and Type | Field and Description |
|---|---|
private Measure |
measure
The Measure of this metrical structure.
|
private long |
mostRecentTime
The time of the most recent note onset we've seen so far.
|
beatState, voiceState| Modifier | Constructor and Description |
|---|---|
private |
FromFileMetricalModelState(Measure measure,
long mostRecentTime)
Create a new FromFileHierarchyModelState and initialize the fileds as given.
|
|
FromFileMetricalModelState(TimeTracker tt)
Create a new FromFileBeatHierarchyState based on the given TimeTracker.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.TreeSet<FromFileMetricalModelState> |
close()
Return a TreeSet of all of the possible MidiModelStates which we could tansition into
when the input closes.
|
int |
compareTo(FromFileMetricalModelState o) |
MetricalModelState |
deepCopy()
Create a deep copy of this HierarchyModelState.
|
Measure |
getMetricalMeasure()
Gets the Measure which is contained by this state currently.
|
double |
getScore()
Get the score of this MidiModelState.
|
java.util.TreeSet<FromFileMetricalModelState> |
handleIncoming(java.util.List<MidiNote> notes)
Return a TreeSet of all of the possible MidiModelStates which we could tansition into
given the List of MidiNotes.
|
getBeatState, getVoiceState, setBeatState, setVoiceState, toStringprivate Measure measure
private long mostRecentTime
public FromFileMetricalModelState(TimeTracker tt)
tt - The TimeTracker which we will grab the proper meter from.private FromFileMetricalModelState(Measure measure, long mostRecentTime)
handleIncoming(List) method.measure - measuremostRecentTime - mostRecentTimepublic Measure getMetricalMeasure()
MetricalModelStategetMetricalMeasure in class MetricalModelStatepublic java.util.TreeSet<FromFileMetricalModelState> handleIncoming(java.util.List<MidiNote> notes)
MidiModelStatehandleIncoming in class MetricalModelStatenotes - A List of the MidiNotes on which we need to transition.public java.util.TreeSet<FromFileMetricalModelState> close()
MidiModelStateclose in class MetricalModelStatepublic MetricalModelState deepCopy()
MetricalModelStatedeepCopy in class MetricalModelStatepublic double getScore()
MidiModelStategetScore in class MidiModelStatepublic int compareTo(FromFileMetricalModelState o)
compareTo in interface java.lang.Comparable<FromFileMetricalModelState>