dguitar.adaptors.song.impl
Class SongImpl

java.lang.Object
  extended bydguitar.adaptors.song.impl.SongPhraseListImpl
      extended bydguitar.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
           
 
Fields inherited from class dguitar.adaptors.song.impl.SongPhraseListImpl
 
Constructor Summary
SongImpl(int ppq, Tempo tempo)
           
 
Method Summary
 void addTrack(SongTrack track)
           
 int getResolution()
           
 SongMeasure getSongPerformanceMeasure(int measure)
          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)
 SongMeasure getSongScoreMeasure(int measure)
          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)
 Tempo getTempo()
           
 SongTrack getTrack(int t)
           
 int getTrackCount()
           
 
Methods inherited from class dguitar.adaptors.song.impl.SongPhraseListImpl
addPhrase, getPerformanceMeasure, getPerformanceMeasureCount, getPhrase, getPhraseCount, getScoreMeasure, getScoreMeasureCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface dguitar.adaptors.song.SongPhraseList
addPhrase, getPhrase, getPhraseCount
 
Methods inherited from interface dguitar.adaptors.song.SongPhrase
getPerformanceMeasure, getPerformanceMeasureCount, getScoreMeasure, getScoreMeasureCount
 

Field Detail

ppq

int ppq

tempo

Tempo tempo

tracks

java.util.List tracks
Constructor Detail

SongImpl

public SongImpl(int ppq,
                Tempo tempo)
Method Detail

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