|
||||||||||
| 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.ContainerOfChoirsAndContours
net.charlesames.music.ensemble.Ensemble
public class Ensemble
Every ensemble starts at the top with an instance of the Ensemble class.
Ensemble objects exist in relation to Score objects. Multiple Scores can share the same Ensemble.
A score's Ensemble provides the mapping information that allows score data to be exported into MIDI, MusicXML, and note-list note lists.
ScoreVoice ties back to an Ensemble EnsembleVoice.
ScoreInstrument ties back to an ensemble EnsembleInstrument
ScoreContour ties back to an ensemble EnsembleContour.
The Ensemble object itself has properties bearing on all three formats listed above.
Mapping data is also available from these other components:
EnsembleInstrument, EnsembleVoice and MidiControl components.
NoteListOpcode, EnsembleInstrument and NoteListParameter components.
MusicXmlPart, EnsembleCredit, EnsembleInstrument and EnsembleVoice components.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.charlesames.music.ensemble.EnsembleEntity |
|---|
EnsembleEntity.AttributeTable |
| Field Summary | |
|---|---|
static java.lang.String |
TEMPO_CONTOUR_NAME
Standard name for tempo contour. |
static java.lang.String |
VELOCITY_CONTOUR_NAME
Standard name for velocity contour. |
static java.lang.String |
XML_SCHEMA_LOCATION
XML schema location |
| Constructor Summary | |
|---|---|
Ensemble()
Constructor for Ensemble instances. |
|
| Method Summary | |
|---|---|
boolean |
check(HtmlBuilder htmlBuilder)
Check this component for errors and inconsistencies |
void |
checkMidiPitchBendRange(int value)
Check that the indicated value is a suitable MIDI pitch-bend range. |
void |
checkMidiTicksPerTimeUnit(int value)
Check if the indicated value is suitable as the MIDI ticks per time unit. |
void |
checkMusicXmlStaffDistance(int value)
Check if the indicated value is suitable as a MusicXML staff distance. |
void |
checkNewContourID(int id)
Check if the indicated id is usable for a new EnsembleContour. |
void |
checkNewContourIndex(int index)
Check if the indicated index is usable for a new EnsembleContour. |
void |
checkNewContourName(java.lang.String name)
Check if the indicated name is usable for a new EnsembleContour. |
void |
checkNewCreditID(int id)
Check if the indicated id is suitable for a new EnsembleCredit. |
void |
checkNewInstrumentID(int id)
Check if the indicated ID is usable for a new EnsembleInstrument. |
void |
checkNewInstrumentName(java.lang.String name)
Check if the indicated name is usable for a new EnsembleInstrument. |
void |
checkNewMusicXmlPartID(int id)
Check if the indicated id is suitable for a new MusicXmlPart instance. |
void |
checkNewMusicXmlPartName(java.lang.String name)
Check if the indicated name is suitable for a new MusicXmlPart instance. |
void |
checkNewNoteListInstrumentID(int id)
Check if the indicated ID is usable for a new NoteListInstrument. |
void |
checkNewNoteListInstrumentName(java.lang.String name)
Check if the indicated name is usable for a new NoteListInstrument. |
void |
checkNewVoiceID(int id)
Check if the indicated ID is usable for a new EnsembleVoice. |
void |
checkNewVoiceName(java.lang.String name)
Check if the indicated name is usable for a new EnsembleVoice. |
void |
checkNoteListSampleRate(int value)
Check if the indicated value is suitable as a sample rate. |
void |
checkNoteListTuningFrequency(double value)
Check if the indicated value is suitable as a note-list tuning frequency. |
void |
clear()
Clear the contents of this ensemble. |
void |
clearOpcodes()
Clear existing note-list NoteListOpcode definitions |
EnsembleCredit |
createCredit(java.lang.String name,
int id)
Create a new EnsembleCredit instance. |
EnsembleInstrument |
createInstrument(java.lang.String name)
Create an EnsembleInstrument instance. |
EnsembleInstrument |
createInstrument(java.lang.String name,
int id)
Create an EnsembleInstrument instance. |
NoteListInstrument |
createNoteListInstrument(int id,
java.lang.String name)
Create an NoteListInstrument instance with the indicated id and name. |
NoteListOpcode |
createOpcode(TypeOfOpcode opcodeType,
java.lang.String defaultValue)
Create a new note-list NoteListOpcode. |
void |
createTuningMap(TuningMap.Type tuningMapType)
Create a tuning map of the indicated type. |
static XmlSpec |
createXmlSpec()
Create an XML specification for the Ensemble class. |
boolean |
equals(EnsembleEntity other)
Check if this entity has the same class and content as another entity. |
EnsembleVoice |
getAnyVoice()
Searches for any voice specification defined under this Ensemble or Choir, or from any sub-choir. |
int |
getCentsFromMiddleC(Pitch pitch)
Calculate the cents displacement from middle C to the indicated Pitch instance. |
java.util.List<java.lang.String> |
getChoirPaths()
Get a collection of choir paths. |
EnsembleContour |
getContour(int index)
|
java.util.SortedMap<java.lang.Integer,EnsembleContour> |
getContoursByIndex()
|
java.util.SortedMap<java.lang.Integer,EnsembleCredit> |
getCreditsByID()
|
int |
getDefaultContourIndex()
Get the first unused global contour index. |
int |
getDefaultCreditID()
Get the next unused credit id. |
java.lang.Integer |
getDefaultInstrumentID()
Get the first id that is unused by any existing EnsembleInstrument. |
KeySignature |
getDefaultKeySignature()
Get the initial key signature for MusicXML and MIDI export. |
int |
getDefaultMusicXmlPartID()
Generate the next usable MusicXmlPart part id. |
java.lang.Integer |
getDefaultNoteListInstrumentID()
Get the first id that is unused by any existing NoteListInstrument. |
TimeSignature |
getDefaultTimeSignature()
Get the initial time signature for MusicXML and MIDI export. |
java.lang.Integer |
getDefaultVoiceID()
Get the first id that is unused by any existing EnsembleVoice. |
Ensemble |
getEnsemble()
Get the Ensemble which sits on top of the current object hierarchy. |
EnsembleEntity |
getEntity(long entityID)
Use an entity's unique user-session id to dereference the entity. |
java.util.List<XmlNodeError> |
getErrors()
Get the collection of errors generated during the most recent file load. |
java.io.File |
getFile()
Get the file where this document's data persists. |
double |
getFrequency(Pitch pitch)
Calculate the frequency for the indicated Pitch in cycles per second. |
EnsembleInstrument |
getInstrument(int id)
Get an EnsembleInstrument instance with the indicated id. |
EnsembleInstrument |
getInstrument(java.lang.String name)
Get an EnsembleInstrument instance with the indicated name. |
java.util.SortedMap<java.lang.Integer,EnsembleInstrument> |
getInstrumentsByID()
|
java.util.SortedMap<java.lang.String,EnsembleInstrument> |
getInstrumentsByName()
|
java.util.Date |
getLoadDate()
Get the file load date. |
double |
getMiddleCFrequency()
Get the frequency for middle C. |
MidiChannelMode |
getMidiChannelMode()
Get the MIDI channel mode, which controls whether channels are selected statically or dynamically when score data is exported to a MIDI file. |
java.util.Set<java.lang.String> |
getMidiDeviceNames()
|
int |
getMidiFileType()
Get the format for MIDI file export. |
int |
getMidiPitchBendRange()
Get the MIDI pitch bend range. |
int |
getMidiTicksPerTimeUnit()
Get the MidiTicksPerTimeUnit. |
MusicXmlPart |
getMusicXmlPart(int id)
Get the MusicXmlPart with the indicated id. |
MusicXmlPart |
getMusicXmlPart(java.lang.String name)
Get the MusicXmlPart with the indicated name. |
java.util.SortedMap<java.lang.Integer,MusicXmlPart> |
getMusicXmlPartsByID()
Get the ensemble-wide collection of MusicXmlPart instances. |
java.util.SortedMap<java.lang.String,MusicXmlPart> |
getMusicXmlPartsByName()
Get the ensemble-wide collection of MusicXmlPart instances. |
Neume |
getMusicXmlShortestNeume()
Get the shortest neume for MusicXML export. |
int |
getMusicXmlStaffDistance()
Get the staff distance for MusicXML export. |
NoteListFormat |
getNoteListFormat()
Get the note-list format. |
NoteListInstrument |
getNoteListInstrument(int id)
Get an NoteListInstrument instance with the indicated id. |
NoteListInstrument |
getNoteListInstrument(java.lang.String name)
Get an NoteListInstrument instance with the indicated name. |
java.util.SortedMap<java.lang.Integer,NoteListInstrument> |
getNoteListInstrumentsByID()
|
java.util.SortedMap<java.lang.String,NoteListInstrument> |
getNoteListInstrumentsByName()
|
NoteListLineTerminator |
getNoteListLineTerminator()
Get the note-list line terminator. |
int |
getNoteListSampleBits()
Get the note-list sample bits. |
int |
getNoteListSampleRate()
Get the note-list sample rate. |
double |
getNoteListTuningFrequency()
Get the frequency for A above middle C. |
NoteListOpcode |
getOpcode(java.lang.String name)
Get the NoteListOpcode with the indicated name. |
java.util.SortedMap<java.lang.String,NoteListOpcode> |
getOpcodes()
|
java.lang.String |
getOpcodeValue(TypeOfOpcode opcodeType)
Get the value of the NoteListOpcode with the indicated opcode type. |
java.io.File |
getOrchestraFile()
Get the SOUND orchestra file. |
java.lang.String |
getPath()
Return a description of this entity and its containers. |
EnsembleContour |
getTempoContour()
|
TuningMap |
getTuningMap()
Get the tuning map. |
TuningMap.Type |
getTuningMapType()
Discover what TuningMap type is in effect. |
java.io.File |
getUserDirectory()
|
EnsembleVoice |
getVoice(int id)
Get the EnsembleVoice instance with the indicated id. |
EnsembleVoice |
getVoice(java.lang.String name)
Get the EnsembleVoice instance with the indicated name. |
java.util.SortedMap<java.lang.Integer,EnsembleVoice> |
getVoicesByID()
|
java.util.SortedMap<java.lang.String,EnsembleVoice> |
getVoicesByName()
|
java.lang.String |
getXmlDefaultNamespace()
Get the XML default namespace. |
java.lang.String |
getXmlSchemaLocation()
Get the schema location. |
boolean |
hasVoiceID(int id)
Test if a voice id is already used. |
boolean |
hasVoiceName(java.lang.String name)
Test if a voice name is already used. |
boolean |
isDirty()
Test if the document or any of its components has experienced a change which justifies saving to file. |
boolean |
isGeneralMidi()
Mapping information for MIDI programs is defined in EnsembleInstrument instances. |
boolean |
isMidiFileCapable()
Test if this ensemble contains the mapping data necessary to export associated scores to MIDI files. |
boolean |
isMusicXmlCapable()
Test if this ensemble contains the mapping data necessary to export associated scores to MusicXML files. |
boolean |
isNativeFileCapable()
Test if this ensemble is enabled to save scores in the native score file format. |
boolean |
isNoteListCapable()
Test if this ensemble contains the mapping data necessary to export associated scores to note-list note lists. |
boolean |
isNoteListNormalize()
Get the note-list normalize flag. |
boolean |
isNoteListTrace()
Get the note-list trace flag. |
void |
load()
Load this document from the path indicated using the FileDocument.setFile(File) method. |
void |
logError(org.w3c.dom.Node node,
java.lang.String message)
Handle an error encountered while loading this document. |
void |
makeDirty()
Signal that the document has experienced a change which should be saved to the associated file. |
int |
pitchBendFromCents(int cents)
Calculate pitch bend value required to achieve the indicated cents deviation. |
void |
removeCredit(int id)
Remove an existing EnsembleCredit instance. |
void |
removeInstrument(int id)
Remove the EnsembleInstrument with the indicated id. |
void |
removeInstrument(java.lang.String name)
Remove the EnsembleInstrument with the indicated name. |
void |
removeMusicXmlPart(MusicXmlPart part)
Remove a MusicXmlPart instance from its parent EnsembleChoir and from this ensemble. |
void |
removeNoteListInstrument(int id)
Remove the NoteListInstrument with the indicated id. |
void |
resequenceInstruments()
Rebuild the sequence of instrument id's so that the first id is 1 and the sequence proceeds without gaps. |
void |
resequenceNoteListInstruments()
Rebuild the sequence of note-list instrument id's so that the first id is 1 and the sequence proceeds without gaps. |
void |
resequenceParts()
Rebuild the sequence of MusicXmlPart id's so that the first id is 1 and the sequence proceeds without gaps. |
void |
resequenceVoices()
Rebuild the sequence of voice id's so that the first id is 1 and the sequence proceeds without gaps. |
void |
save()
Save this document to the path indicated using the FileDocument.setFile(File) method. |
void |
setDefaultKeySignature(KeySignature defaultKeySignature)
Set the initial key signature for MusicXML and MIDI export. |
void |
setDefaultTimeSignature(TimeSignature defaultTimeSignature)
Set the initial time signature for MusicXML and MIDI export. |
void |
setFile(java.io.File file)
Set the file where this document's data will persist. |
void |
setGeneralMidi(boolean generalMidi)
Mapping information for MIDI programs is defined in EnsembleInstrument instances. |
void |
setMidiChannelMode(MidiChannelMode midiChannelMode)
Set the MIDI channel mode, which controls whether channels are selected statically or dynamically when score data is exported to a MIDI file. |
void |
setMidiFileCapable(boolean midiFileCapable)
Set the true/false value of the MIDI enabled flag. |
void |
setMidiFileType(int midiFileType)
Set the format for MIDI file export. |
void |
setMidiPitchBendRange(int midiPitchBendRange)
Set the MIDI pitch bend range. |
void |
setMidiTicksPerTimeUnit(int midiTicksPerTimeUnit)
Set the MidiTicksPerTimeUnit. |
void |
setMusicXmlCapable(boolean musicXmlCapable)
Set the true/false value of the MusicXML enabling flag. |
void |
setMusicXmlShortestNeume(Neume musicXmlShortestNeume)
Set the shortest neume for MusicXML export. |
void |
setMusicXmlStaffDistance(int musicXmlStaffDistance)
Set the staff distance for MusicXML export. |
void |
setNativeFileCapable(boolean nativeFileCapable)
Enable or disable saving in native file format. |
void |
setNoteListCapable(boolean noteListCapable)
Set the true/false value of the note-list note list enabling flag. |
void |
setNoteListFormat(NoteListFormat noteListFormat)
Set the note-list format. |
void |
setNoteListLineTerminator(NoteListLineTerminator lineTerminator)
Set the note-list line terminator. |
void |
setNoteListNormalize(boolean normalize)
Set the note-list normalize flag. |
void |
setNoteListSampleBits(int sampleBits)
Set the note-list sample bits. |
void |
setNoteListSampleRate(int noteListSampleRate)
Set the note-list sample rate. |
void |
setNoteListTrace(boolean trace)
Set the note-list trace flag. |
void |
setNoteListTuningFrequency(double noteListTuningFrequency)
Set the frequency for A above middle C. |
void |
setOpcodeValue(java.lang.String name,
java.lang.String value)
Set the character string that begins a note-list statement. |
void |
setOrchestraFile(java.io.File orchestraFile)
Set the SOUND orchestra file. |
void |
setUserDirectory(java.io.File userDirectory)
|
void |
shiftInstrumentDown(int id)
Move a specified EnsembleInstrument down within the collection (i.e. |
void |
shiftInstrumentsDown(int id,
int increment)
|
void |
shiftInstrumentUp(int id)
Move a specified EnsembleInstrument up within the collection (i.e. |
void |
shiftNoteListInstrumentDown(int id)
Move a specified EnsembleInstrument down within the collection (i.e. |
void |
shiftNoteListInstrumentsDown(int id,
int increment)
|
void |
shiftNoteListInstrumentUp(int id)
Move a specified EnsembleInstrument up within the collection (i.e. |
void |
shiftPartDown(int id)
Move a specified MusicXmlPart down within the collection (i.e. |
void |
shiftPartsDown(int id,
int increment)
Move a block of MusicXmlParts down within the collection. |
void |
shiftPartUp(int id)
Move a specified MusicXmlPart up within the collection (i.e. |
void |
shiftVoiceDown(int id)
Move a specified EnsembleVoice down within the collection (i.e. |
void |
shiftVoicesDown(int id,
int increment)
Move a block of EnsembleVoices down within the collection. |
void |
shiftVoiceUp(int id)
Move a specified EnsembleVoice up within the collection (i.e. |
void |
wipe()
Clear all data in this Entity instance. |
| Methods inherited from class net.charlesames.music.ensemble.ContainerOfChoirsAndContours |
|---|
checkNewChoirID, checkNewChoirName, createChoir, getChoir, getChoirsByID, getChoirsByName, getContainer, getDefaultChoirID, getDefaultVoiceName, hasChoirName, removeChoir, resequenceChoirs, resolve, shiftChoirDown, shiftChoirsDown, shiftChoirUp |
| Methods inherited from class net.charlesames.music.ensemble.EnsembleEntity |
|---|
buildDescription, copyToClipboard, createIndentCell, createXmlSpec, describeFeature, logError, predecessor, toString |
| Methods inherited from class net.charlesames.utility.entity.WriteableEntity |
|---|
clearXmlSpecs, createXmlSpec, getTagName, getXmlData, getXmlSpec, getXmlSpec, initializeXsd, isPersistent, logError, putXmlData, save, setID, setName, 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 |
| Methods inherited from interface net.charlesames.utility.io.FileDocument |
|---|
dispose |
| Field Detail |
|---|
public static final java.lang.String XML_SCHEMA_LOCATION
public static final java.lang.String TEMPO_CONTOUR_NAME
public static final java.lang.String VELOCITY_CONTOUR_NAME
| Constructor Detail |
|---|
public Ensemble()
Ensemble instances.
| Method Detail |
|---|
public void checkNoteListTuningFrequency(double value)
value - The indicated value.public void setNoteListTuningFrequency(double noteListTuningFrequency)
noteListTuningFrequency - The intended tuning frequency.public double getNoteListTuningFrequency()
public double getMiddleCFrequency()
public double getFrequency(Pitch pitch)
Pitch in cycles per second.
This value is useful for export to MUSIC-N note lists.
pitch - The indicated Pitch instance.
public int getCentsFromMiddleC(Pitch pitch)
Pitch instance.
pitch - The indicated Pitch instance
public java.util.SortedMap<java.lang.Integer,EnsembleCredit> getCreditsByID()
EnsembleCredit objects, indexed by credit id.public int getDefaultCreditID()
public void checkNewCreditID(int id)
EnsembleCredit.
id - The indicated id.
public EnsembleCredit createCredit(java.lang.String name,
int id)
EnsembleCredit instance.
name - The credit name. Must be unique.id - The credit id. Must be unique.
EnsembleCredit instance.
java.lang.IllegalArgumentException - when a EnsembleCredit already exists with the indicated id.public void removeCredit(int id)
EnsembleCredit instance.
id - The entity to remove.
java.lang.IllegalArgumentException - when no credit exists with the indicated id.public TuningMap.Type getTuningMapType()
TuningMap type is in effect.
TuningMap type is in effect.public void createTuningMap(TuningMap.Type tuningMapType)
tuningMapType - The indicated type.public TuningMap getTuningMap()
public java.util.SortedMap<java.lang.Integer,EnsembleContour> getContoursByIndex()
EnsembleContour instances, indexed by contour index.public int getDefaultContourIndex()
public EnsembleContour getContour(int index)
index - The unique contour identifier. This is different from the contour id, which is only unique to a particular branch of the component hierarchy.
EnsembleContour with the indicated index (null if not found).public void checkNewContourName(java.lang.String name)
ContainerOfChoirsAndContoursEnsembleContour.
checkNewContourName in class ContainerOfChoirsAndContoursname - The indicated name.public void checkNewContourID(int id)
ContainerOfChoirsAndContoursEnsembleContour.
checkNewContourID in class ContainerOfChoirsAndContoursid - The indicated id.public void checkNewContourIndex(int index)
ContainerOfChoirsAndContoursEnsembleContour.
checkNewContourIndex in class ContainerOfChoirsAndContoursindex - The indicated index.public java.util.List<XmlNodeError> getErrors()
XmlFileDocument
getErrors in interface XmlFileDocumentpublic Ensemble getEnsemble()
EnsembleEntityEnsemble which sits on top of the current object hierarchy.
getEnsemble in class ContainerOfChoirsAndContourspublic EnsembleEntity getEntity(long entityID)
entityID - An identifier which uniquely identifies an ensemble component during a user editing session.
java.lang.RuntimeException - If the returned entity does not belong to this ensemble.public EnsembleContour getTempoContour()
public java.lang.String getPath()
Entity
getPath in interface EntityContainergetPath in class Entitypublic java.io.File getUserDirectory()
public void setUserDirectory(java.io.File userDirectory)
userDirectory - The user directory.public java.io.File getFile()
FileDocument
getFile in interface FileDocumentpublic java.util.Date getLoadDate()
FileDocument
getLoadDate in interface FileDocumentpublic void setFile(java.io.File file)
FileDocument
setFile in interface FileDocumentfile - The file where this Ensemble's data is kept.public java.lang.String getXmlDefaultNamespace()
XmlFileDocument
getXmlDefaultNamespace in interface XmlFileDocumentpublic java.lang.String getXmlSchemaLocation()
XmlFileDocument
getXmlSchemaLocation in interface XmlFileDocumentpublic boolean isNativeFileCapable()
public void setNativeFileCapable(boolean nativeFileCapable)
nativeFileCapable - True to direct the user environment to save the file natively; false otherwise.public boolean isMidiFileCapable()
public void setMidiFileCapable(boolean midiFileCapable)
midiFileCapable - True if the ensemble should be MIDI enabled; false otherwise.public int getMidiFileType()
public void setMidiFileType(int midiFileType)
midiFileType - 0 - Single Track; 1 - Multiple Tracks, Synchronous; 2 - Multiple Tracks, Asynchronous.
java.lang.IllegalArgumentException - if the midiFileType is not 0 or 1.public boolean isGeneralMidi()
EnsembleInstrument instances.
The GeneralMidi property of the Ensemble object indicates for the record whether or not
these programs conform to the General MIDI standard.
public void setGeneralMidi(boolean generalMidi)
EnsembleInstrument instances.
generalMidi - True if MIDI programs conform to the General MIDI standard; false otherwise.public int getMidiPitchBendRange()
public void checkMidiPitchBendRange(int value)
value - The indicated value.
java.lang.IllegalArgumentException - when the value is outside the range from 1 to 64.public void setMidiPitchBendRange(int midiPitchBendRange)
midiPitchBendRange - Number of semitones from center to full deflection. Ranges from 1 to 64.
java.lang.IllegalArgumentException - when midiPitchBendRange is outside the range from 1 to 64.public int pitchBendFromCents(int cents)
cents -
public MidiChannelMode getMidiChannelMode()
public void setMidiChannelMode(MidiChannelMode midiChannelMode)
midiChannelMode - The desired MIDI channel mode.public int getMidiTicksPerTimeUnit()
MidiTicksPerTimeUnit.
MidiTicksPerTimeUnit value.public void checkMidiTicksPerTimeUnit(int value)
value - The indicated value.
java.lang.IllegalArgumentException - when the value is not positive.public void setMidiTicksPerTimeUnit(int midiTicksPerTimeUnit)
MidiTicksPerTimeUnit.
midiTicksPerTimeUnit - The intended MidiTicksPerTimeUnit value.
java.lang.IllegalArgumentException - when the value is not positive.public boolean isNoteListCapable()
public void setNoteListCapable(boolean noteListCapable)
noteListCapable - True if the ensemble should be note-list note list enabled; false otherwise.public NoteListFormat getNoteListFormat()
public void setNoteListFormat(NoteListFormat noteListFormat)
noteListFormat - The intended note-list format.public java.io.File getOrchestraFile()
File instance referencing the orchestra file.public void setOrchestraFile(java.io.File orchestraFile)
orchestraFile - A File instance referencing the orchestra file.public void setNoteListSampleRate(int noteListSampleRate)
noteListSampleRate - Number of samples per second per channel.public void checkNoteListSampleRate(int value)
value - The indicated value.
java.lang.IllegalArgumentException - when the value is negative.public int getNoteListSampleRate()
public void setNoteListSampleBits(int sampleBits)
sampleBits - The intended number of bits per sample (16 or 32).
java.lang.IllegalArgumentException - when the number of bits per sample is neither 16 nor 32.public int getNoteListSampleBits()
public void setNoteListNormalize(boolean normalize)
normalize - The intended note-list normalize flag.public boolean isNoteListNormalize()
public void setNoteListTrace(boolean trace)
trace - The intended note-list trace flag.public boolean isNoteListTrace()
public void setNoteListLineTerminator(NoteListLineTerminator lineTerminator)
lineTerminator - Newline or semicolon.public NoteListLineTerminator getNoteListLineTerminator()
public void clearOpcodes()
NoteListOpcode definitions
public NoteListOpcode createOpcode(TypeOfOpcode opcodeType,
java.lang.String defaultValue)
NoteListOpcode.
opcodeType - The opcode type. Must be unique under the Ensemble.defaultValue - The character string that begins a note-list statement.
NoteListOpcode instance.
public void setOpcodeValue(java.lang.String name,
java.lang.String value)
name - The Opcode name.value - The character string that begins a note-list statement.public java.util.SortedMap<java.lang.String,NoteListOpcode> getOpcodes()
NoteListOpcode instances, indexed by name.public NoteListOpcode getOpcode(java.lang.String name)
NoteListOpcode with the indicated name.
name - The indicated name.
NoteListOpcode with the indicated name.
java.lang.IllegalArgumentException - when the name is undefined.public java.lang.String getOpcodeValue(TypeOfOpcode opcodeType)
NoteListOpcode with the indicated opcode type.
opcodeType - The indicated opcode type.
public boolean isMusicXmlCapable()
public void setMusicXmlCapable(boolean musicXmlCapable)
musicXmlCapable - True if the ensemble should be MusicXML enabled; false otherwise.public TimeSignature getDefaultTimeSignature()
public void setDefaultTimeSignature(TimeSignature defaultTimeSignature)
defaultTimeSignature - The desired initial time signature.public KeySignature getDefaultKeySignature()
public void setDefaultKeySignature(KeySignature defaultKeySignature)
defaultKeySignature - The desired initial key signature.public int getMusicXmlStaffDistance()
public void checkMusicXmlStaffDistance(int value)
value - The indicated value.
java.lang.IllegalArgumentException - when the value is negative.public void setMusicXmlStaffDistance(int musicXmlStaffDistance)
musicXmlStaffDistance - The current staff distance.
java.lang.IllegalArgumentException - when the value is negative.public Neume getMusicXmlShortestNeume()
public void setMusicXmlShortestNeume(Neume musicXmlShortestNeume)
musicXmlShortestNeume - The desired shortest neume.public java.util.SortedMap<java.lang.String,EnsembleVoice> getVoicesByName()
EnsembleVoice instances, indexed by name.public java.util.SortedMap<java.lang.Integer,EnsembleVoice> getVoicesByID()
EnsembleVoice instances, indexed by id.public boolean hasVoiceName(java.lang.String name)
name - The indicated name.
public void checkNewVoiceName(java.lang.String name)
EnsembleVoice.
name - The indicated name.public boolean hasVoiceID(int id)
id - The indicated id.
public void checkNewVoiceID(int id)
EnsembleVoice.
id - The indicated IDpublic EnsembleVoice getVoice(java.lang.String name)
EnsembleVoice instance with the indicated name.
name - The indicated name.
EnsembleVoice instance with the indicated name (null if not found).public EnsembleVoice getVoice(int id)
EnsembleVoice instance with the indicated id.
id - The indicated id.
EnsembleVoice instance with the indicated id (null if not found).public EnsembleVoice getAnyVoice()
ContainerOfChoirsAndContours
getAnyVoice in class ContainerOfChoirsAndContourspublic void makeDirty()
WriteableEntity
makeDirty in interface FileDocumentmakeDirty in class WriteableEntitypublic boolean isDirty()
FileDocument
isDirty in interface FileDocumentpublic java.util.SortedMap<java.lang.String,EnsembleInstrument> getInstrumentsByName()
EnsembleInstrument instances, indexed by name.public java.util.SortedMap<java.lang.Integer,EnsembleInstrument> getInstrumentsByID()
EnsembleInstrument instances, indexed by id.public java.lang.Integer getDefaultInstrumentID()
EnsembleInstrument.
public void checkNewInstrumentID(int id)
EnsembleInstrument.
id - The indicated ID.public void checkNewInstrumentName(java.lang.String name)
EnsembleInstrument.
name - The indicated name.
public EnsembleInstrument createInstrument(java.lang.String name,
int id)
EnsembleInstrument instance.
name - The new instrument name.id - The new instrument id
EnsembleInstrument instance.
java.lang.IllegalArgumentException - If the ensemble already has an instrument with the indicated id or name.public EnsembleInstrument createInstrument(java.lang.String name)
EnsembleInstrument instance. The next available id is used.
name - The new instrument name.
EnsembleInstrument instance.public void removeInstrument(java.lang.String name)
EnsembleInstrument with the indicated name.
name - The indicated name
java.lang.IllegalArgumentException - If the ensemble has no instrument with the indicated name.public void removeInstrument(int id)
EnsembleInstrument with the indicated id.
id - The indicated id.
java.lang.IllegalArgumentException - If the ensemble has no instrument with the indicated id.public EnsembleInstrument getInstrument(java.lang.String name)
EnsembleInstrument instance with the indicated name.
name - The indicated name.
EnsembleInstrument instance with the indicated name (null if not found).public EnsembleInstrument getInstrument(int id)
EnsembleInstrument instance with the indicated id.
id - The indicated id.
EnsembleInstrument instance with the indicated id (null if not found).public java.util.SortedMap<java.lang.Integer,NoteListInstrument> getNoteListInstrumentsByID()
NoteListInstrument instances, indexed by id.public java.util.SortedMap<java.lang.String,NoteListInstrument> getNoteListInstrumentsByName()
NoteListInstrument instances, indexed by name.public java.lang.Integer getDefaultNoteListInstrumentID()
NoteListInstrument.
public void checkNewNoteListInstrumentID(int id)
NoteListInstrument.
id - The indicated ID.public void checkNewNoteListInstrumentName(java.lang.String name)
NoteListInstrument.
name - The indicated name.
public NoteListInstrument createNoteListInstrument(int id,
java.lang.String name)
NoteListInstrument instance with the indicated id and name.
id - The new instrument id.name - The new instrument name.
NoteListInstrument instance.
java.lang.IllegalArgumentException - If the ensemble already has an instrument with the indicated id or name.public void removeNoteListInstrument(int id)
NoteListInstrument with the indicated id.
id - The indicated id.
java.lang.IllegalArgumentException - If the ensemble has no instrument with the indicated id.public NoteListInstrument getNoteListInstrument(int id)
NoteListInstrument instance with the indicated id.
id - The indicated id.
NoteListInstrument instance with the indicated id (null if not found).public NoteListInstrument getNoteListInstrument(java.lang.String name)
NoteListInstrument instance with the indicated name.
name - The indicated name.
NoteListInstrument instance with the indicated name (null if not found).public java.util.SortedMap<java.lang.String,MusicXmlPart> getMusicXmlPartsByName()
MusicXmlPart instances.
MusicXmlPart instances indexed by name.public java.util.SortedMap<java.lang.Integer,MusicXmlPart> getMusicXmlPartsByID()
MusicXmlPart instances.
MusicXmlPart instances indexed by id.public void checkNewMusicXmlPartName(java.lang.String name)
MusicXmlPart instance.
name - The indicated name.public int getDefaultMusicXmlPartID()
MusicXmlPart part id.
MusicXmlPart id.public void checkNewMusicXmlPartID(int id)
MusicXmlPart instance.
id - public void removeMusicXmlPart(MusicXmlPart part)
MusicXmlPart instance from its parent EnsembleChoir and from this ensemble.
part - The MusicXmlPart instance to remove.public MusicXmlPart getMusicXmlPart(java.lang.String name)
MusicXmlPart with the indicated name.
name - The indicated name.
MusicXmlPart with the indicated name (null if not found).public MusicXmlPart getMusicXmlPart(int id)
MusicXmlPart with the indicated id.
id - The indicated id.
MusicXmlPart with the indicated id (null if not found).public boolean check(HtmlBuilder htmlBuilder)
WriteableEntity
check in class ContainerOfChoirsAndContourshtmlBuilder - Accumulates an HTML formatted record of each error or inconsistency found.
public void save()
FileDocumentFileDocument.setFile(File) method.
throws RuntimeException If a file already exists with the indicated path and existing file was modified before this instance's load date.
save in interface FileDocumentpublic void load()
FileDocumentFileDocument.setFile(File) method.
load in interface FileDocument
public void logError(org.w3c.dom.Node node,
java.lang.String message)
WriteableEntity
logError in interface XmlFileDocumentlogError in class WriteableEntitynode - The XML node where this error was detected.message - A text string describing the error.public void resequenceInstruments()
public void shiftInstrumentUp(int id)
EnsembleInstrument up within the collection (i.e. decrement its id).
id - The current instrument idpublic void shiftInstrumentDown(int id)
EnsembleInstrument down within the collection (i.e. increment its id).
id - The current instrument id
public void shiftInstrumentsDown(int id,
int increment)
id - increment - public void resequenceNoteListInstruments()
public void shiftNoteListInstrumentUp(int id)
EnsembleInstrument up within the collection (i.e. decrement its id).
id - The current instrument idpublic void shiftNoteListInstrumentDown(int id)
EnsembleInstrument down within the collection (i.e. increment its id).
id - The current instrument id
public void shiftNoteListInstrumentsDown(int id,
int increment)
id - increment - public void resequenceParts()
MusicXmlPart id's so that the first id is 1 and the sequence proceeds without gaps.
public void shiftPartUp(int id)
MusicXmlPart up within the collection (i.e. decrement its id).
id - The current part idpublic void shiftPartDown(int id)
MusicXmlPart down within the collection (i.e. increment its id).
id - The current instrument id
public void shiftPartsDown(int id,
int increment)
MusicXmlParts down within the collection.
id - All MusicXmlParts in the collection with id's greater than or equal to the startingID will be shifted down.increment - Number of positions to shift.public void resequenceVoices()
public void shiftVoiceUp(int id)
EnsembleVoice up within the collection (i.e. decrement its id).
id - The current part idpublic void shiftVoiceDown(int id)
EnsembleVoice down within the collection (i.e. increment its id).
id - The current instrument id
public void shiftVoicesDown(int id,
int increment)
EnsembleVoices down within the collection.
id - All MusicXmlParts in the collection with id's greater than or equal to the startingID will be shifted down.increment - Number of positions to shift.public java.util.List<java.lang.String> getChoirPaths()
public void clear()
clear in class ContainerOfChoirsAndContourspublic void wipe()
EntityEntity instance.
wipe in class ContainerOfChoirsAndContourspublic java.lang.Integer getDefaultVoiceID()
EnsembleVoice.
public java.util.Set<java.lang.String> getMidiDeviceNames()
public static XmlSpec createXmlSpec()
Ensemble class.
XmlSpec instance.
java.lang.RuntimeException - when an XmlSpec instance already exists for the Ensemble class.public boolean equals(EnsembleEntity other)
EnsembleEntity
equals in class ContainerOfChoirsAndContoursother - The other entity.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||