|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.charlesames.utility.common.Disposable
net.charlesames.utility.entity.Entity
net.charlesames.utility.entity.WriteableEntity
net.charlesames.music.ensemble.EnsembleEntity
net.charlesames.music.ensemble.EnsembleVoice
public class EnsembleVoice
The EnsembleVoice class hold properties.
The parent of a EnsembleVoice is always a EnsembleChoir.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.charlesames.music.ensemble.EnsembleEntity |
|---|
EnsembleEntity.AttributeTable |
| Method Summary | |
|---|---|
boolean |
check(HtmlBuilder builder)
Check this component for errors and inconsistencies |
void |
checkMidiChannel(int value)
Check if the indicated value is suitable as a MIDI channel. |
void |
checkMusicXmlVoiceNumber(int value)
Check if the indicated value is suitable as a MusicXML voice number. |
static XmlSpec |
createXmlSpec()
Create an XML specification for the EnsembleVoice class. |
boolean |
equals(EnsembleEntity other)
Check if this entity has the same class and content as another entity. |
static EnsembleVoice |
fromXmlNode(org.w3c.dom.Element element,
EnsembleChoir choir)
Create a new EnsembleVoice instance under a Choir and fill it with loaded data. |
java.util.List<EnsembleInstrument> |
getCapableInstruments()
Get the instruments which this voice is capable of playing. |
EnsembleChoir |
getContainer()
Getter for the Container property. |
EnsembleContour |
getContourByID(int id)
Search by id all defined EnsembleContour instances, working down the hierarchy from the Ensemble itself
through each EnsembleChoir and sub-choir that contains this EnsembleVoice. |
EnsembleContour |
getContourByName(java.lang.String name)
Search by name all defined EnsembleContour instances, working down the hierarchy from the Ensemble itself
through each EnsembleChoir and sub-choir that contains this EnsembleVoice. |
java.util.SortedMap<java.lang.Integer,EnsembleContour> |
getContoursByID()
List all defined EnsembleContour instances, working down the hierarchy from the Ensemble itself
through each EnsembleChoir and sub-choir that contains this EnsembleVoice. |
EnsembleInstrument |
getDefaultInstrument()
Getter for the DefaultInstrument property. |
java.lang.String |
getDefaultMidiInstrumentName()
Get the name of the default instrument. |
int |
getMidiChannel()
Getter for the MidiChannel property. |
java.lang.String |
getMidiChannelKey()
Get a colon-delimited string combining the MIDI track name, device name, and channel number. |
java.util.SortedMap<java.lang.String,MidiControl> |
getMidiControls()
List all defined MidiControl instances, working down the hierarchy from the Ensemble itself
through each EnsembleChoir and sub-choir that contains this EnsembleVoice. |
java.lang.String |
getMidiDeviceName()
Setter for the MidiDeviceName property. |
java.lang.String |
getMidiTrackName()
Setter for the MidiTrackName property. |
Placement |
getMusicXmlPlacement()
Getter for the MusicXmlPlacement property. |
MusicXmlStaff |
getMusicXmlStaff()
Getter for the MusicXmlStaff property. |
int |
getMusicXmlVoiceNumber()
Getter for the MusicXmlVoiceNumber property. |
java.lang.String |
getPath()
Return a description of this entity and its containers. |
void |
resolve()
Resolve object references |
void |
setChoir(EnsembleChoir choir)
Move a EnsembleVoice from its current parent EnsembleChoir to a different EnsembleChoir. |
void |
setDefaultInstrument(EnsembleInstrument defaultInstrument)
Setter for the DefaultInstrument property. |
boolean |
setID(int id)
Setter for the ID property. |
void |
setMidiChannel(int midiChannel)
Setter for the MidiChannel property. |
void |
setMidiDeviceName(java.lang.String midiDeviceName)
Setter for the MidiDeviceName property. |
void |
setMidiTrackName(java.lang.String midiTrackName)
Getter for the MidiTrackName property. |
void |
setMusicXmlPlacement(Placement placement)
Setter for the MusicXmlPlacement property. |
void |
setMusicXmlStaff(MusicXmlStaff staff)
Setter for the MusicXmlStaff property. |
void |
setMusicXmlVoiceNumber(int musicXmlVoiceNumber)
Setter for the MusicXmlVoiceNumber property. |
boolean |
setName(java.lang.String name)
Setter for the Name property. |
java.lang.String |
toString()
|
void |
wipe()
Clear all data in this Entity instance. |
| Methods inherited from class net.charlesames.music.ensemble.EnsembleEntity |
|---|
buildDescription, copyToClipboard, createIndentCell, createXmlSpec, describeFeature, getEnsemble, logError, predecessor |
| Methods inherited from class net.charlesames.utility.entity.WriteableEntity |
|---|
clearXmlSpecs, createXmlSpec, getTagName, getXmlData, getXmlSpec, getXmlSpec, initializeXsd, isPersistent, logError, logError, makeDirty, putXmlData, save, setPersistent, setStatus, toXmlNode |
| Methods inherited from class net.charlesames.utility.entity.Entity |
|---|
decrementReferenceCount, dereferenceHandle, dispose, equals, getHandle, getID, getName, getReferenceCount, getStatus, getText, hasContainer, incrementReferenceCount, isModifiable, methodHasOverride, predecessor, resequenceEntities, setContainer, setModifiable, shiftEntitiesDown, shiftEntityDown, shiftEntityUp, successor |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public EnsembleChoir getContainer()
EntityContainer property.
getContainer in class EnsembleEntityContainer value.public EnsembleInstrument getDefaultInstrument()
EnsembleInstrument.public java.util.List<EnsembleInstrument> getCapableInstruments()
EnsembleInstrument instances.public void setDefaultInstrument(EnsembleInstrument defaultInstrument)
defaultInstrument - The intended default EnsembleInstrument. The current voice must already be
capable of using this instrument.public void setChoir(EnsembleChoir choir)
EnsembleVoice from its current parent EnsembleChoir to a different EnsembleChoir.
choir - The destination {link Choir} instance.public boolean setName(java.lang.String name)
EntityName property.
setName in class WriteableEntityname - The intended Name value.
Name change actually happened; false otherwise.public boolean setID(int id)
EntityID property.
setID in class WriteableEntityid - The intended ID value.
ID change actually happened; false otherwise.public java.lang.String getMidiChannelKey()
public int getMidiChannel()
MidiChannel property.
If an Ensemble is MIDI-capable but not MusicXML capable, then each voice in the
ensemble must have a unique MidiChannel value. If the Ensemble is both MIDI-capable and MusicXML capable,
Then the combination of MidiChannel and MusicXmlVoiceNumber must be unique in each voice
public void checkMidiChannel(int value)
value - The indicated value.
java.lang.IllegalArgumentException - when the value falls outside the range from 1 to 16.public void setMidiChannel(int midiChannel)
Ensemble is MIDI-capable but not MusicXML capable, then each voice in the
ensemble must have a unique MidiChannel value. If the Ensemble is both MIDI-capable and MusicXML capable,
Then the combination of MidiChannel and MusicXmlVoiceNumber must be unique in each voice
midiChannel - The intended MIDI channel. Ranges from 1 to 16.
java.lang.IllegalArgumentException - when the value falls outside the range from 1 to 16.public java.lang.String getMidiTrackName()
public void setMidiTrackName(java.lang.String midiTrackName)
midiTrackName - The intended MIDI track name.public java.lang.String getMidiDeviceName()
public void setMidiDeviceName(java.lang.String midiDeviceName)
midiDeviceName - The current MIDI device name.public MusicXmlStaff getMusicXmlStaff()
Ensemble to MusicXML, you must
therefore fill in three EnsembleVoice properties: MusicXmlStaff,
MusicXmlVoiceNumber, and MusicXmlPlacement. Each voice in a MusicXML-capable Ensemble must
have a unique combination of part, staff id, and voice id.
public void setMusicXmlStaff(MusicXmlStaff staff)
Ensemble to MusicXML, you must
therefore fill in three EnsembleVoice properties: MusicXmlStaff,
MusicXmlVoiceNumber, and MusicXmlPlacement. Each voice in a MusicXML-capable Ensemble must
have a unique combination of part, staff id, and voice id.
staff - The intended MusicXML staff.public int getMusicXmlVoiceNumber()
MusicXmlVoiceNumber property.
In MusicXML, a "part" can comprise one or more staves (consider a grand staff), and each
staff can accommodate one or two voices. To map from an Ensemble to MusicXML, you must
therefore fill in five EnsembleVoice properties: MusicXmlPart, MusicXmlStaffID, DefaultClef,
MusicXmlVoiceNumber, and MusicXmlPlacement. Each voice in a MusicXML-capable Ensemble must
have a unique combination of part, staff id, and voice number.
public void setMusicXmlVoiceNumber(int musicXmlVoiceNumber)
MusicXmlVoiceNumber property.
In MusicXML, a "part" can comprise one or more staves (consider a grand staff), and each
staff can accommodate one or two voices. To map from an Ensemble to MusicXML, you must
therefore fill in five EnsembleVoice properties: MusicXmlPart, MusicXmlStaffID, DefaultClef,
MusicXmlVoiceNumber, and MusicXmlPlacement. Each voice in a MusicXML-capable Ensemble must
have a unique combination of part, staff id, and voice id.
Call this method after you have set the MusicXmlPart, since the range of allowable voice id's is determined by the part.
musicXmlVoiceNumber - The intended MusicXML voice id.public void checkMusicXmlVoiceNumber(int value)
value - public Placement getMusicXmlPlacement()
Ensemble to MusicXML, you must
therefore fill in five EnsembleVoice properties: MusicXmlPart, MusicXmlStaffID, DefaultClef,
MusicXmlVoiceNumber, and MusicXmlPlacement. Each voice in a MusicXML-capable Ensemble must
have a unique combination of part, staff id, and voice id.
public void setMusicXmlPlacement(Placement placement)
Ensemble to MusicXML, you must
therefore fill in five EnsembleVoice properties: MusicXmlPart, MusicXmlStaffID, DefaultClef,
MusicXmlVoiceNumber, and MusicXmlPlacement. Each voice in a MusicXML-capable Ensemble must
have a unique combination of part, staff id, and voice id.
When two Ensemble voices occupy the same MusicXML staff, the
placement - The current MusicXML placement (above or below).public java.util.SortedMap<java.lang.String,MidiControl> getMidiControls()
MidiControl instances, working down the hierarchy from the Ensemble itself
through each EnsembleChoir and sub-choir that contains this EnsembleVoice.
MidiControl instances, indexed by control name.public java.util.SortedMap<java.lang.Integer,EnsembleContour> getContoursByID()
EnsembleContour instances, working down the hierarchy from the Ensemble itself
through each EnsembleChoir and sub-choir that contains this EnsembleVoice.
EnsembleContour instances, indexed by contour id.public java.lang.String getPath()
Entity
getPath in interface EntityContainergetPath in class Entitypublic EnsembleContour getContourByName(java.lang.String name)
EnsembleContour instances, working down the hierarchy from the Ensemble itself
through each EnsembleChoir and sub-choir that contains this EnsembleVoice.
name - The indicated name.
EnsembleContour instance with the indicated name (null if not found).public EnsembleContour getContourByID(int id)
EnsembleContour instances, working down the hierarchy from the Ensemble itself
through each EnsembleChoir and sub-choir that contains this EnsembleVoice.
id - The indicated id.
EnsembleContour instance with the indicated id (null if not found).public java.lang.String getDefaultMidiInstrumentName()
public void resolve()
public boolean check(HtmlBuilder builder)
check in class WriteableEntitybuilder - Accumulates an HTML formatted record of each error or inconsistency found.
public void wipe()
EntityEntity instance.
wipe in class Entity
public static EnsembleVoice fromXmlNode(org.w3c.dom.Element element,
EnsembleChoir choir)
EnsembleVoice instance under a Choir and fill it with loaded data.
element - The XML element that provides the EnsembleVoice datachoir - The Choir which will contain the new EnsembleVoice.
EnsembleVoice instance.public static XmlSpec createXmlSpec()
EnsembleVoice class.
XmlSpec instance.
java.lang.RuntimeException - when an XmlSpec instance already exists for the EnsembleVoice class.public boolean equals(EnsembleEntity other)
EnsembleEntity
equals in class EnsembleEntityother - The other entity.
public java.lang.String toString()
toString in class EnsembleEntity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||