|
||||||||||
| 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.ContainerOfInstrumentLinks
net.charlesames.music.ensemble.EnsembleInstrument
public class EnsembleInstrument
The {link EnsembleInstrument} class holds attributes that determine the timbre of a note.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.charlesames.music.ensemble.EnsembleEntity |
|---|
EnsembleEntity.AttributeTable |
| Method Summary | |
|---|---|
EnsembleInstrumentVoice |
addCapableVoice(EnsembleVoice voice)
Add the indicated voice specification to the list of voices capable of playing this instrument. |
boolean |
check(HtmlBuilder builder)
Check this component for errors and inconsistencies |
void |
checkMidiBank(int value)
Check if the indicated value is suitable as a MIDI bank number. |
void |
checkMidiProgram(int value)
Check if the indicated value is suitable as a MIDI program. |
void |
checkNewUnpitchedSoundText(java.lang.String text)
Check if the indicated text parses into a Pitch which can be used to identify an UnpitchedSound. |
UnpitchedSound |
createUnpitchedSound(Pitch pitch)
Create a new UnpitchedSound instance and add it to this EnsembleInstrument. |
static XmlSpec |
createXmlSpec()
Create an XML specification for the EnsembleInstrument class. |
boolean |
equals(EnsembleEntity other)
Check if this entity has the same class and content as another entity. |
static EnsembleInstrument |
fromXmlNode(org.w3c.dom.Element element,
Ensemble ensemble)
Create a new EnsembleInstrument instance and fill it with loaded data. |
java.util.SortedMap<java.lang.Integer,EnsembleInstrumentVoice> |
getCapableVoices()
|
Ensemble |
getContainer()
Getter for the Container property. |
EnsembleInstrument |
getInstrument()
Getter for the EnsembleInstrument which either this is or this is contained by. |
int |
getMidiBank()
Getter for the MidiBank property. |
int |
getMidiElevation()
Getter for the MidiElevation property. |
int |
getMidiPan()
Getter for the MidiPan property. |
int |
getMidiProgram()
Getter for the MidiProgram property. |
int |
getMidiVolume()
Getter for the MidiVolume property. |
java.lang.String |
getMusicXmlDirection()
Setter for the MusicXmlDirection property. |
Placement |
getMusicXmlPlacement()
Setter for the MusicXmlPlacement property. |
java.lang.String |
getPath()
Return a description of this entity and its containers. |
UnpitchedSound |
getUnpitchedSound(Pitch pitch)
Get the UnpitchedSound instance associated with the specified pitch. |
java.util.SortedMap<java.lang.Integer,UnpitchedSound> |
getUnpitchedSounds()
Get all UnpitchedSound instances. |
java.util.List<EnsembleVoice> |
getUnusedVoices()
Get the EnsembleVoice instances which are NOT presently among this instrument's capable voices. |
boolean |
isCapableVoice(EnsembleVoice voice)
Test if the indicated voice is capable of playing this instrument. |
boolean |
isGeneralMidi()
Mapping information for MIDI key numbers is defined in UnpitchedSound instances. |
void |
removeCapableVoice(int voiceID)
Remove the indicated voice specification from the list of voices capable of playing this instrument. |
void |
removeUnpitchedSound(Pitch pitch)
Remove the UnpitchedSound instance associated with the specified pitch. |
void |
setGeneralMidi(boolean generalMidi)
Mapping information for MIDI key numbers is defined in UnpitchedSound instances. |
boolean |
setID(int id)
Setter for the ID property. |
void |
setMidiBank(int midiBank)
Setter for the MidiBank property. |
void |
setMidiElevation(int degrees)
Setter for the MidiElevation property. |
void |
setMidiPan(int degrees)
Setter for the MidiPan property. |
void |
setMidiProgram(int midiProgram)
Setter for the MidiProgram property. |
void |
setMidiVolume(int midiVolume)
Setter for the MidiVolume property. |
void |
setMusicXmlDirection(java.lang.String musicXmlDirection)
Getter for the MusicXmlDirection property. |
void |
setMusicXmlPlacement(Placement musicXmlPlacement)
Setter for the MusicXmlPlacement property. |
boolean |
setName(java.lang.String name)
Setter for the Name property. |
void |
setUnpitched(boolean value)
Setter for the Unpitched property. |
java.lang.String |
toString()
|
void |
wipe()
Clear all data in this Entity instance. |
| Methods inherited from class net.charlesames.music.ensemble.ContainerOfInstrumentLinks |
|---|
addInstrumentLink, checkNewInstrumentLinkID, getDefaultInstrumentLinkID, getInstrumentLinks, isUnpitched, removeInstrumentLink, resequenceInstrumentLinks, shiftInstrumentLinkDown, shiftInstrumentLinksDown, shiftInstrumentLinkUp |
| 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 Ensemble getContainer()
EntityContainer property.
getContainer in class EnsembleEntityContainer value.public EnsembleInstrument getInstrument()
ContainerOfInstrumentLinksEnsembleInstrument which either this is or this is contained by.
getInstrument in class ContainerOfInstrumentLinksEnsembleInstrument which either this is or this is contained by.public java.lang.String getPath()
Entity
getPath in interface EntityContainergetPath in class Entitypublic java.util.SortedMap<java.lang.Integer,EnsembleInstrumentVoice> getCapableVoices()
EnsembleVoice instances representing voices which are capable of using this instrument.public java.util.List<EnsembleVoice> getUnusedVoices()
EnsembleVoice instances which are NOT presently among this instrument's capable voices.
EnsembleVoice instances.public int getMidiProgram()
MidiProgram property.
In the MIDI world, the MIDI program (possibly in conjunction with the MIDI bank) determines what sound will be used to play a note.
MIDI programs range from 1 to 128, with 0 indicating no program.
public void checkMidiProgram(int value)
value - The indicated value.
java.lang.IllegalArgumentException - when the value falls outside the range from 0 (disabled) 1 to 128.public void setMidiProgram(int midiProgram)
MidiProgram property.
In the MIDI world, the MIDI program (possibly in conjunction with the MIDI bank) determines what sound will be used to play a note.
MIDI programs range from 1 to 128, with 0 indicating no program.
midiProgram - The intended MIDI program.public int getMidiVolume()
MidiVolume property.
In the MIDI world, the MIDI volume controls the loudness across all channels.
MIDI volumes range from 0 to 127.
public void setMidiVolume(int midiVolume)
MidiVolume property.
In the MIDI world, the MIDI volume controls the loudness across all channels.
MIDI volumes range from 0 to 127.
midiVolume - The intended MIDI volume.public int getMidiPan()
MidiPan property.
In the MIDI world, the MIDI pan controls the left-right position of the sound.
MIDI pan values range from -180 (full left) to 180 (full right).
Use this property to set the left-right position of MusicXML instruments. For actual
MIDI file generation the pan can be controlled dynamically using a MidiControl.
public void setMidiPan(int degrees)
MidiPan property.
In the MIDI world, the MIDI pan controls the left-right position of the sound.
MIDI pan values range from -180 (full left) to 180 (full right).
Use this property to set the left-right position of MusicXML instruments. For actual
MIDI file generation the pan can be controlled dynamically using a MidiControl.
degrees - The intended MIDI pan.public int getMidiElevation()
MidiElevation property.
In the MIDI world, the MIDI elevation controls the bottom-top position of the sound.
MIDI elevation values range from -180 (full bottom) to 180 (full top).
Use this property to set the bottom-top position of MusicXML instruments. For actual
MIDI file generation the elevation can be controlled dynamically using a MidiControl.
public void setMidiElevation(int degrees)
MidiElevation property.
In the MIDI world, the MIDI elevation controls the bottom-top position of the sound.
MIDI elevation values range from -180 (full bottom) to 180 (full top).
Use this property to set the bottom-top position of MusicXML instruments. For actual
MIDI file generation the elevation can be controlled dynamically using a MidiControl.
degrees - The intended MIDI elevation.public int getMidiBank()
MidiBank property.
In the MIDI world, the MIDI bank and MIDI program together determine what sound will be used to play a note.
public void checkMidiBank(int value)
value - The indicated value.
java.lang.IllegalArgumentException - when the value falls outside the range from 0 (disabled) to 128public void setMidiBank(int midiBank)
MidiBank property.
In the MIDI world, the MIDI bank and MIDI program together determine what sound will be used to play a note.
midiBank - The intended MIDI bank.
java.lang.IllegalArgumentException - when the value falls outside the range from 0 (disabled) to 128public boolean isGeneralMidi()
UnpitchedSound instances.
The GeneralMidi property of the EnsembleInstrument object indicates whether or not
these key numbers conform to the General MIDI standard.
public void setGeneralMidi(boolean generalMidi)
UnpitchedSound instances.
generalMidi - True if unpitched MIDI key numbers conform to the General MIDI standard; false otherwise.public java.lang.String getMusicXmlDirection()
MusicXmlDirection property.
This property is used when a single player (voice) uses several instruments and the player needs to be told when to
switch from one to the other. Examples include "arco" versus "pizzicato" or "flute" versus "piccolo".
public void setMusicXmlDirection(java.lang.String musicXmlDirection)
MusicXmlDirection property.
This property is used when a single player (voice) uses several instruments and the player needs to be told when to
switch from one to the other. Examples include "arco" versus "pizzicato" or "flute" versus "piccolo".
musicXmlDirection - The current MusicXML direction.public Placement getMusicXmlPlacement()
MusicXmlPlacement property.
This property controls whether MusicXML directions are placed above or below the staff.
public void setMusicXmlPlacement(Placement musicXmlPlacement)
MusicXmlPlacement property.
This property controls whether MusicXML directions are placed above or below the staff.
musicXmlPlacement - The intended MusicXML placement.public boolean setID(int id)
EntityID property.
setID in class WriteableEntityid - The intended ID value.
ID change actually happened; false otherwise.public boolean setName(java.lang.String name)
EntityName property.
setName in class WriteableEntityname - The intended Name value.
Name change actually happened; false otherwise.public void setUnpitched(boolean value)
ContainerOfInstrumentLinksUnpitched property.
value - True if the instrument should be unpitched; false otherwise.public boolean isCapableVoice(EnsembleVoice voice)
voice - The indicated voice.
public EnsembleInstrumentVoice addCapableVoice(EnsembleVoice voice)
voice - The indicated voice.
EnsembleInstrumentVoice instance cross referencing the instrument with the voice.public void removeCapableVoice(int voiceID)
voiceID - The indicated voice id.public java.util.SortedMap<java.lang.Integer,UnpitchedSound> getUnpitchedSounds()
UnpitchedSound instances.
UnpitchedSound instances, indexed by chroma.
java.lang.IllegalArgumentException - when the EnsembleInstrument is not unpitched.public UnpitchedSound createUnpitchedSound(Pitch pitch)
UnpitchedSound instance and add it to this EnsembleInstrument.
pitch - The mapped-from pitch.
An IllegalArgumentException is throw if this pitch, or any enharmonic equivalent, is already mapped.
UnpitchedSound instance.public UnpitchedSound getUnpitchedSound(Pitch pitch)
UnpitchedSound instance associated with the specified pitch.
pitch - The specified pitch.
UnpitchedSound instance associated with the specified pitch.public void removeUnpitchedSound(Pitch pitch)
UnpitchedSound instance associated with the specified pitch.
pitch - The specified pitch.public boolean check(HtmlBuilder builder)
check in class ContainerOfInstrumentLinksbuilder - Accumulates an HTML formatted record of each error or inconsistency found.
public java.lang.String toString()
toString in class EnsembleEntitypublic void wipe()
EntityEntity instance.
wipe in class ContainerOfInstrumentLinks
public static EnsembleInstrument fromXmlNode(org.w3c.dom.Element element,
Ensemble ensemble)
EnsembleInstrument instance and fill it with loaded data.
element - The XML element that provides the EnsembleInstrument dataensemble - The Ensemble which will contain the new EnsembleInstrument.
EnsembleInstrument instance.public static XmlSpec createXmlSpec()
EnsembleInstrument class.
XmlSpec instance.
java.lang.RuntimeException - when an XmlSpec instance already exists for the EnsembleInstrument class.public void checkNewUnpitchedSoundText(java.lang.String text)
Pitch which can be used to identify an UnpitchedSound.
text - The indicated text.public boolean equals(EnsembleEntity other)
EnsembleEntity
equals in class ContainerOfInstrumentLinksother - The other entity.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||