dguitar.adaptors.song.impl
Class SongImpl
java.lang.Object
dguitar.adaptors.song.impl.SongPhraseListImpl
dguitar.adaptors.song.impl.SongImpl
- All Implemented Interfaces:
- Song, SongPhrase, SongPhraseList
- public class SongImpl
- extends SongPhraseListImpl
- implements Song
Implementation of Song
- Author:
- crnash
Field Summary |
(package private) int |
ppq
|
(package private) Tempo |
tempo
|
(package private) java.util.List |
tracks
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ppq
int ppq
tempo
Tempo tempo
tracks
java.util.List tracks
SongImpl
public SongImpl(int ppq,
Tempo tempo)
getSongScoreMeasure
public SongMeasure getSongScoreMeasure(int measure)
- Description copied from interface:
Song
- This is a convenience method to return the given measure from the score in
musicians' notation (measure 1 is the first measure printed, not 0)
- Specified by:
getSongScoreMeasure
in interface Song
- Parameters:
measure
- the measure to return from the score (1-based)
- Returns:
- SongMeasure
- See Also:
getScoreMeasure
getResolution
public int getResolution()
- Specified by:
getResolution
in interface Song
- Returns:
- the resolution of this song, in pulses per quarter note (PPQ)
getSongPerformanceMeasure
public SongMeasure getSongPerformanceMeasure(int measure)
- Description copied from interface:
Song
- This is a convenience method to return the given measure from the score in
musicians' notation (measure 1 is the first measure printed, not 0)
- Specified by:
getSongPerformanceMeasure
in interface Song
- Parameters:
measure
- the measure index (1-based)
- Returns:
- the measure
- See Also:
getPerformanceMeasure
addTrack
public void addTrack(SongTrack track)
- Specified by:
addTrack
in interface Song
- Parameters:
track
-
getTrackCount
public int getTrackCount()
- Specified by:
getTrackCount
in interface Song
- Returns:
- the track count
getTrack
public SongTrack getTrack(int t)
- Specified by:
getTrack
in interface Song
- Parameters:
t
-
- Returns:
- SongTrack
getTempo
public Tempo getTempo()
- Specified by:
getTempo
in interface Song
- Returns:
- the default tempo of this song