public class Score
extends java.lang.Object
Constructor and Description |
---|
Score()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addPart(Part part,
java.lang.String instrument)
Add a Part to this Score.
|
java.lang.String |
getInstrumentName(Part part)
Get a String representation of the instrument
for a particular Part.
|
java.util.Iterator<Part> |
getParts()
Get the Part objects in this Score.
|
void |
removePart(Part part)
Remove a Part from this Score.
|
void |
render()
Render this Score.
|
void |
setChannel(Part part,
javax.sound.midi.MidiChannel channel)
Set the MidiChannel associated with a Part.
|
void |
setTempo(int millisPerMeasure)
Set the tempo for this Part.
|
void |
setTimeSignature(int numerator,
int denominator)
Set the time signature for this Part.
|
void |
upbeat(Metronome metronome)
Handle an upbeat message.
|
public void addPart(Part part, java.lang.String instrument)
part
- The Part to addpublic java.util.Iterator<Part> getParts()
public java.lang.String getInstrumentName(Part part)
part
- The Part of interestpublic void removePart(Part part)
part
- The Part to removepublic void render()
public void setChannel(Part part, javax.sound.midi.MidiChannel channel)
part
- The Partchannel
- The MidiChannel for that Partpublic void setTempo(int millisPerMeasure)
millisPerMeasure
- The tempo (in milliseconds per measure)public void setTimeSignature(int numerator, int denominator)
numerator
- The numerator of the time signaturedenominator
- The denominator of the time signaturepublic void upbeat(Metronome metronome)
metronome
- The Metronome that the Part objects listen to