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, toString
private 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
- measure
mostRecentTime
- mostRecentTime
public Measure getMetricalMeasure()
MetricalModelState
getMetricalMeasure
in class MetricalModelState
public java.util.TreeSet<FromFileMetricalModelState> handleIncoming(java.util.List<MidiNote> notes)
MidiModelState
handleIncoming
in class MetricalModelState
notes
- A List of the MidiNotes on which we need to transition.public java.util.TreeSet<FromFileMetricalModelState> close()
MidiModelState
close
in class MetricalModelState
public MetricalModelState deepCopy()
MetricalModelState
deepCopy
in class MetricalModelState
public double getScore()
MidiModelState
getScore
in class MidiModelState
public int compareTo(FromFileMetricalModelState o)
compareTo
in interface java.lang.Comparable<FromFileMetricalModelState>