public class ParsedSequence extends Object
| Modifier and Type | Method and Description |
|---|---|
static ParsedSequence |
createEmpty()
Returns an empty parsed sequence containing nothing.
|
Collection<ParsedTrack> |
getActiveTracks()
Gets the active tracks stored by this parsed MIDI sequence.
|
Optional<File> |
getFile()
Gets the file that this sequence was originally created from.
|
Collection<ParsedTrack> |
getInactiveTracks()
Gets the inactive tracks stored by this parsed MIDI sequence.
|
Sequence |
getSequence()
Gets the original MIDI sequence used to create this parsed MIDI sequence.
|
List<ParsedTrack> |
getTracks()
Gets all tracks stored by this parsed MIDI sequence.
|
static ParsedSequence |
parseByTracks(Sequence sequence)
Parses a MIDI sequence, arranging it by tracks
|
void |
setFile(Optional<File> file)
Sets the file that this sequence was originally created from.
|
void |
setTrackActive(ParsedTrack track,
boolean active)
Sets the specified track as active.
|
public Optional<File> getFile()
If the returned file is not empty, subsequent calls to this function are guaranteed to return the same value.
public void setFile(Optional<File> file)
This setter may only be called once per sequence. Subsequent calls will throw an exception.
file - the file for this sequenceIllegalStateException - if the file has already been set.public List<ParsedTrack> getTracks()
public Collection<ParsedTrack> getActiveTracks()
Active tracks are those selected by the user for practice.
public Collection<ParsedTrack> getInactiveTracks()
Inactive tracks are those not selected by the user for practice.
public void setTrackActive(ParsedTrack track, boolean active)
If the track is already active, no changes occur.
track - the parsed track in this sequence to modifyactive - true if the track should be active, otherwise falseIllegalArgumentException - if the track is not contained in this sequencepublic Sequence getSequence()
Sequencepublic static ParsedSequence createEmpty()
ParsedSequencepublic static ParsedSequence parseByTracks(Sequence sequence)
sequence - the sequence to parseParsedSequenceCopyright © 2015 Kreatious LLC. All rights reserved.