dguitar.adaptors.song.impl
Class SongMeasureImpl
java.lang.Object
dguitar.adaptors.song.impl.SongMeasureImpl
- All Implemented Interfaces:
- SongMeasure, SongPhrase
- public class SongMeasureImpl
- extends java.lang.Object
- implements SongMeasure
Implementation of SongMeasure
- Author:
- crnash
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
length
int length
index
int index
timeSignature
TimeSignature timeSignature
trackMap
java.util.Map trackMap
SongMeasureImpl
public SongMeasureImpl(int index,
int length,
TimeSignature timeSignature)
- Parameters:
index
- length
-
getTimeSignature
public TimeSignature getTimeSignature()
- Specified by:
getTimeSignature
in interface SongMeasure
- Returns:
- Returns the timeSignature.
addTrack
public void addTrack(SongMeasureTrack smt)
- Specified by:
addTrack
in interface SongMeasure
getScoreMeasureCount
public int getScoreMeasureCount()
- Specified by:
getScoreMeasureCount
in interface SongPhrase
- Returns:
- The count of the number of measures in this phrase on a printed score
getScoreMeasure
public SongMeasure getScoreMeasure(int i)
- Specified by:
getScoreMeasure
in interface SongPhrase
- Parameters:
i
- The measure index (0 based)
- Returns:
- the measure at this index when printed on a score
getPerformanceMeasureCount
public int getPerformanceMeasureCount()
- Specified by:
getPerformanceMeasureCount
in interface SongPhrase
- Returns:
- The count of the number of measures in this phrase when it is performed
getPerformanceMeasure
public SongMeasure getPerformanceMeasure(int measure)
- Specified by:
getPerformanceMeasure
in interface SongPhrase
- Parameters:
measure
- the measure index (0 based)
- Returns:
- the measure at this index when performed
getLength
public int getLength()
- Specified by:
getLength
in interface SongMeasure
- Returns:
- the length of this phrase, in resolution units
getIndex
public int getIndex()
- Specified by:
getIndex
in interface SongMeasure
- Returns:
- Returns the index.
getTrack
public SongMeasureTrack getTrack(SongTrack track)
- Description copied from interface:
SongMeasure
- Retrieves the SongMeasureTrack (list of SongEvents) for the given track in
this measure.
- Specified by:
getTrack
in interface SongMeasure
- Returns:
- the song measure track of the score of this measure on this track.