Package com.softsynth.jmsl.score
Class ScoreCollection
java.lang.Object
com.softsynth.jmsl.MusicJob
com.softsynth.jmsl.ParallelCollection
com.softsynth.jmsl.SequentialCollection
com.softsynth.jmsl.score.ScoreCollection
- All Implemented Interfaces:
Composable,Playable,java.lang.Runnable
public class ScoreCollection extends SequentialCollection
ScoreCollection contains the playable structure of a Score. It is a
SequentialCollection of Measure. Measure is a ParallelCollection of Staff.
Staff is a ParallelCollection of Track. Track is a PlayableList of Note. Note
implements Playable.
- Author:
- Nick Didkovsky, copyright 2000 Nick Didkovsky, all rights reserved
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringcopyrightFields inherited from class com.softsynth.jmsl.MusicJob
repeatCount -
Constructor Summary
Constructors Constructor Description ScoreCollection(Score parent, int numStaffs) -
Method Summary
Modifier and Type Method Description NoteaddInterval(DimensionNameSpace dimensionNameSpace, double[] data)add an interval.MeasureaddMeasure()MeasureaddMeasure(int tsNumer, int tsDenom)NoteaddNote(double[] data)NoteaddNote(double dur, double midipitch, double vel, double hold)NoteaddNote(DimensionNameSpace dimensionNameSpace, double[] data)NoteaddNote(Note note)Add Note to current Track of current Staff of current Measure.NoteaddNote(Note n, int measureNum, int staffNum, int trackNum)voidclearLastAddedNote()voiddeleteMeasure(Measure measure)intgetCurrentMeasureNumber()intgetCurrentStaffNumber()intgetCurrentTrackNumber()NotegetLastAddedNote()MeasuregetMeasure(int n)MeasureinsertMeasure(Measure measure)MeasureinsertMeasure(Measure measure, int insertionIndex)voidprintStopPlayables()voidresetAllRepeats()voidsetCurrentMeasureNumber(int m)set measure number for adding/editingvoidsetCurrentStaffNumber(int s)set staff number for adding/editingvoidsetCurrentTrackNumber(int t)set track number for adding/editingvoidsetLastAddedMeasure(Measure lastAddedMeasure)doublestart(double playTime)Setup method called once when run() begins.Methods inherited from class com.softsynth.jmsl.SequentialCollection
getBehavior, internalRepeat, main, print, setBehaviorMethods inherited from class com.softsynth.jmsl.ParallelCollection
get, halt, printHierarchy, setMethods inherited from class com.softsynth.jmsl.MusicJob
add, addPlayLurker, addRepeatPlayable, addStartPlayable, addStopPlayable, advanceCurrentTime, contains, elements, finish, finishAll, getChild, getChildren, getCurrentTime, getDataTranslator, getDuration, getInstrument, getName, getParent, getPlayLurkers, getRepeatCount, getRepeatPause, getRepeatPlayables, getRepeats, getStartDelay, getStartPause, getStartPlayables, getStartTime, getStopDelay, getStopPlayables, getTimeStretch, getTransposition, indexOf, insert, isRunning, launch, launch, play, play, printHierarchy, remove, remove, removeAll, removeAllPlayLurkers, removeAllRepeatPlayables, removeAllStartPlayables, removeAllStopPlayables, removePlayLurker, removeRepeatPlayable, removeStartPlayable, removeStopPlayable, repeat, run, setCurrentTime, setDataTranslator, setDuration, setInstrument, setName, setParent, setRepeatPause, setRepeats, setStartDelay, setStartPause, setStartTime, setStopDelay, setTimeStretch, setTransposition, size, stop, timeStretch, transposition, waitForDoneMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
copyright
public static final java.lang.String copyright- See Also:
- Constant Field Values
-
-
Constructor Details
-
ScoreCollection
-
-
Method Details
-
resetAllRepeats
public void resetAllRepeats() -
start
public double start(double playTime)Description copied from class:MusicJobSetup method called once when run() begins. Override this for custom setup.- Specified by:
startin interfaceComposable- Overrides:
startin classMusicJob- Returns:
- endTime
-
addNote
-
addNote
-
addNote
-
addNote
-
addInterval
add an interval.- Returns:
- Note for interval added, or null if interval could not be added (either a duplicate or a rest)
-
addNote
Add Note to current Track of current Staff of current Measure. If there is no more room in the Track, see if there is room on the next Measure's Track. If there is, update the currentMeasureNum and add it there. If there is none, insert a new Measure there. -
getLastAddedNote
-
clearLastAddedNote
public void clearLastAddedNote() -
addMeasure
-
addMeasure
-
setLastAddedMeasure
- Parameters:
lastAddedMeasure- the lastAddedMeasure to set
-
getMeasure
-
setCurrentMeasureNumber
public void setCurrentMeasureNumber(int m)set measure number for adding/editing -
getCurrentMeasureNumber
public int getCurrentMeasureNumber()- Returns:
- current measure number (entry point for adding notes, editing, etc)
-
setCurrentStaffNumber
public void setCurrentStaffNumber(int s)set staff number for adding/editing -
getCurrentStaffNumber
public int getCurrentStaffNumber() -
setCurrentTrackNumber
public void setCurrentTrackNumber(int t)set track number for adding/editing -
getCurrentTrackNumber
public int getCurrentTrackNumber()- Returns:
- Returns the currentTrackNum.
-
deleteMeasure
-
insertMeasure
-
insertMeasure
-
printStopPlayables
public void printStopPlayables()
-