|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softsynth.jmsl.MusicJob
com.softsynth.jmsl.MusicList
com.softsynth.jmsl.score.Track
public class Track
Track
A Track is a MusicList of Note objects
JMSL Notation Project
Field Summary | |
---|---|
static java.lang.String |
copyright
|
static double |
TOLERABLE_ERROR
|
Fields inherited from class com.softsynth.jmsl.MusicJob |
---|
repeatCount |
Constructor Summary | |
---|---|
Track(Staff staff,
int num)
|
|
Track(Staff staff,
int num,
Instrument ins)
|
Method Summary | |
---|---|
void |
deleteNote(Note note)
delete a Note from this track If isMonoNote, delete with removeElement() If isInterval, delete it from the chord handle's vector of intervals If isHandle of chord, removeElement, set new handle to first interval and insert that. |
java.awt.Point |
getDrawingAnchor()
|
double |
getDuration()
returns duration, duration is used optionally |
java.lang.String |
getDurationReport()
|
double |
getEndTimeOfNote(Note note)
|
Note |
getFirstNoteAfterTime(double startTime)
|
java.lang.String |
getHierarchy()
|
int |
getInsertionIndexForTime(double startTime)
|
Note |
getLastNoteBeforeTime(double endTime)
|
Note |
getNote(int n)
|
Score |
getScore()
|
Staff |
getStaff()
|
double |
getStartTimeOfNote(Note note)
|
int |
getTrackIndex()
|
boolean |
hasElementsLaterThan(double time)
|
void |
insertNote(Note note)
Insert a note at current insertion index, and increment insertion index so next note comes after |
void |
insertNote(Note note,
int index)
|
boolean |
isEmpty()
|
void |
layoutChildren()
|
void |
render(java.awt.Graphics g,
double zoom)
|
void |
setDrawingAnchor(java.awt.Point p)
drawingAnchor is the (x,y) point at top left of this Track's staff, equal to Note level 132 |
void |
setInsertionIndex(int i)
|
void |
setInstrument(Instrument ins)
Sets Instrument like superclass, also translates DimensionNameSpaces of existing Notes to DimensionNameSpace of Instrument |
int |
size()
You can add children to a MusicJob with the add(Composable) method. |
java.lang.String |
toString()
|
void |
writeXML(java.io.PrintWriter out)
|
Methods inherited from class com.softsynth.jmsl.MusicList |
---|
add, finishAll, get, getChildren, internalRepeat, main, start, stop |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double TOLERABLE_ERROR
public static final java.lang.String copyright
Constructor Detail |
---|
public Track(Staff staff, int num)
public Track(Staff staff, int num, Instrument ins)
Method Detail |
---|
public void setInstrument(Instrument ins)
setInstrument
in class MusicJob
public int getTrackIndex()
public Staff getStaff()
public Score getScore()
public Note getNote(int n)
public void setDrawingAnchor(java.awt.Point p)
public java.awt.Point getDrawingAnchor()
public boolean isEmpty()
public int size()
MusicJob
size
in class MusicJob
public boolean hasElementsLaterThan(double time)
public double getDuration()
MusicJob
getDuration
in class MusicJob
public double getStartTimeOfNote(Note note)
public double getEndTimeOfNote(Note note)
public Note getFirstNoteAfterTime(double startTime)
public int getInsertionIndexForTime(double startTime)
public Note getLastNoteBeforeTime(double endTime)
public java.lang.String getDurationReport()
public void layoutChildren()
public void insertNote(Note note, int index)
public void insertNote(Note note)
public void setInsertionIndex(int i)
public void deleteNote(Note note)
public void render(java.awt.Graphics g, double zoom)
public java.lang.String getHierarchy()
public java.lang.String toString()
toString
in class java.lang.Object
public void writeXML(java.io.PrintWriter out) throws java.io.IOException
writeXML
in interface XMLWritable
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |