net.charlesames.music.ensemble
Class Ensemble

java.lang.Object
  extended by net.charlesames.utility.common.Disposable
      extended by net.charlesames.utility.entity.Entity
          extended by net.charlesames.utility.entity.WriteableEntity
              extended by net.charlesames.music.ensemble.EnsembleEntity
                  extended by net.charlesames.music.ensemble.ContainerOfChoirsAndContours
                      extended by net.charlesames.music.ensemble.Ensemble
All Implemented Interfaces:
EntityContainer, FileDocument, XmlFileDocument

public class Ensemble
extends ContainerOfChoirsAndContours
implements XmlFileDocument

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.

Three entities that bind Scores to Ensembles:
Each Score ScoreVoice ties back to an Ensemble EnsembleVoice.
Each Score ScoreInstrument ties back to an ensemble EnsembleInstrument
Each Score 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:
Mapping data for MIDI files is present in the EnsembleInstrument, EnsembleVoice and MidiControl components.
Mapping data for note-list note lists is present in the NoteListOpcode, EnsembleInstrument and NoteListParameter components.
Mapping data for MusicXML files is present in the MusicXmlPart, EnsembleCredit, EnsembleInstrument and EnsembleVoice components.

Author:
Charles Ames

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

XML_SCHEMA_LOCATION

public static final java.lang.String XML_SCHEMA_LOCATION
XML schema location

See Also:
Constant Field Values

TEMPO_CONTOUR_NAME

public static final java.lang.String TEMPO_CONTOUR_NAME
Standard name for tempo contour.

See Also:
Constant Field Values

VELOCITY_CONTOUR_NAME

public static final java.lang.String VELOCITY_CONTOUR_NAME
Standard name for velocity contour.

See Also:
Constant Field Values
Constructor Detail

Ensemble

public Ensemble()
Constructor for Ensemble instances.

Method Detail

checkNoteListTuningFrequency

public void checkNoteListTuningFrequency(double value)
Check if the indicated value is suitable as a note-list tuning frequency.

Parameters:
value - The indicated value.

setNoteListTuningFrequency

public void setNoteListTuningFrequency(double noteListTuningFrequency)
Set the frequency for A above middle C.

Parameters:
noteListTuningFrequency - The intended tuning frequency.

getNoteListTuningFrequency

public double getNoteListTuningFrequency()
Get the frequency for A above middle C.

Returns:
The assigned frequency for A above middle C.

getMiddleCFrequency

public double getMiddleCFrequency()
Get the frequency for middle C.

Returns:
The assigned frequency for middle C.

getFrequency

public double getFrequency(Pitch pitch)
Calculate the frequency for the indicated Pitch in cycles per second. This value is useful for export to MUSIC-N note lists.

Parameters:
pitch - The indicated Pitch instance.
Returns:
The frequency in cycles per second.

getCentsFromMiddleC

public int getCentsFromMiddleC(Pitch pitch)
Calculate the cents displacement from middle C to the indicated Pitch instance.

Parameters:
pitch - The indicated Pitch instance
Returns:
The cents displacement from middle C.

getCreditsByID

public java.util.SortedMap<java.lang.Integer,EnsembleCredit> getCreditsByID()
Returns:
The collection of EnsembleCredit objects, indexed by credit id.

getDefaultCreditID

public int getDefaultCreditID()
Get the next unused credit id.

Returns:
The next unused credit id.

checkNewCreditID

public void checkNewCreditID(int id)
Check if the indicated id is suitable for a new EnsembleCredit.

Parameters:
id - The indicated id.

createCredit

public EnsembleCredit createCredit(java.lang.String name,
                                   int id)
Create a new EnsembleCredit instance.

Parameters:
name - The credit name. Must be unique.
id - The credit id. Must be unique.
Returns:
The newly created EnsembleCredit instance.
Throws:
java.lang.IllegalArgumentException - when a EnsembleCredit already exists with the indicated id.

removeCredit

public void removeCredit(int id)
Remove an existing EnsembleCredit instance.

Parameters:
id - The entity to remove.
Throws:
java.lang.IllegalArgumentException - when no credit exists with the indicated id.

getTuningMapType

public TuningMap.Type getTuningMapType()
Discover what TuningMap type is in effect.

Returns:
What TuningMap type is in effect.

createTuningMap

public void createTuningMap(TuningMap.Type tuningMapType)
Create a tuning map of the indicated type.

Parameters:
tuningMapType - The indicated type.

getTuningMap

public TuningMap getTuningMap()
Get the tuning map.

Returns:
The tuning map, which can be diatonic or chromatic; null means equal temperament.

getContoursByIndex

public java.util.SortedMap<java.lang.Integer,EnsembleContour> getContoursByIndex()
Returns:
The exhaustive collection of EnsembleContour instances, indexed by contour index.

getDefaultContourIndex

public int getDefaultContourIndex()
Get the first unused global contour index.

Returns:
The first unused global contour index.

getContour

public EnsembleContour getContour(int index)
Parameters:
index - The unique contour identifier. This is different from the contour id, which is only unique to a particular branch of the component hierarchy.
Returns:
The EnsembleContour with the indicated index (null if not found).

checkNewContourName

public void checkNewContourName(java.lang.String name)
Description copied from class: ContainerOfChoirsAndContours
Check if the indicated name is usable for a new EnsembleContour.

Specified by:
checkNewContourName in class ContainerOfChoirsAndContours
Parameters:
name - The indicated name.

checkNewContourID

public void checkNewContourID(int id)
Description copied from class: ContainerOfChoirsAndContours
Check if the indicated id is usable for a new EnsembleContour.

Specified by:
checkNewContourID in class ContainerOfChoirsAndContours
Parameters:
id - The indicated id.

checkNewContourIndex

public void checkNewContourIndex(int index)
Description copied from class: ContainerOfChoirsAndContours
Check if the indicated index is usable for a new EnsembleContour.

Specified by:
checkNewContourIndex in class ContainerOfChoirsAndContours
Parameters:
index - The indicated index.

getErrors

public java.util.List<XmlNodeError> getErrors()
Description copied from interface: XmlFileDocument
Get the collection of errors generated during the most recent file load.

Specified by:
getErrors in interface XmlFileDocument
Returns:
The collection of errors generated during the most recent file load.

getEnsemble

public Ensemble getEnsemble()
Description copied from class: EnsembleEntity
Get the Ensemble which sits on top of the current object hierarchy.

Overrides:
getEnsemble in class ContainerOfChoirsAndContours
Returns:
The Ensemble which sits on top of the current object hierarchy.

getEntity

public EnsembleEntity getEntity(long entityID)
Use an entity's unique user-session id to dereference the entity. This method is provided to support web-based ensemble editing.

Parameters:
entityID - An identifier which uniquely identifies an ensemble component during a user editing session.
Returns:
The ensemble component with the indicated entity id (null if not found).
Throws:
java.lang.RuntimeException - If the returned entity does not belong to this ensemble.

getTempoContour

public EnsembleContour getTempoContour()
Returns:
The tempo contour specification.

getPath

public java.lang.String getPath()
Description copied from class: Entity
Return a description of this entity and its containers.

Specified by:
getPath in interface EntityContainer
Overrides:
getPath in class Entity
Returns:
A description of this entity and its containers.

getUserDirectory

public java.io.File getUserDirectory()
Returns:
The user directory.

setUserDirectory

public void setUserDirectory(java.io.File userDirectory)
Parameters:
userDirectory - The user directory.

getFile

public java.io.File getFile()
Description copied from interface: FileDocument
Get the file where this document's data persists.

Specified by:
getFile in interface FileDocument
Returns:
The file where this Ensemble's data is kept.

getLoadDate

public java.util.Date getLoadDate()
Description copied from interface: FileDocument
Get the file load date.

Specified by:
getLoadDate in interface FileDocument
Returns:
The file load date.

setFile

public void setFile(java.io.File file)
Description copied from interface: FileDocument
Set the file where this document's data will persist.

Specified by:
setFile in interface FileDocument
Parameters:
file - The file where this Ensemble's data is kept.

getXmlDefaultNamespace

public java.lang.String getXmlDefaultNamespace()
Description copied from interface: XmlFileDocument
Get the XML default namespace.

Specified by:
getXmlDefaultNamespace in interface XmlFileDocument
Returns:
The XML default namespace.

getXmlSchemaLocation

public java.lang.String getXmlSchemaLocation()
Description copied from interface: XmlFileDocument
Get the schema location.

Specified by:
getXmlSchemaLocation in interface XmlFileDocument
Returns:
The schema location.

isNativeFileCapable

public boolean isNativeFileCapable()
Test if this ensemble is enabled to save scores in the native score file format. The NativeFileCapable property is provided for graphic user environments which may not elect to save a score natively, but rather export the score directly to an external format.

Returns:
True if the NativeFileCapable property is true; false otherwise.

setNativeFileCapable

public void setNativeFileCapable(boolean nativeFileCapable)
Enable or disable saving in native file format. The NativeFileCapable property is provided for graphic user environments which may not elect to save a score natively, but rather export the score directly to an external format. Disabling this property has no direct effect on the Score.save() method.

Parameters:
nativeFileCapable - True to direct the user environment to save the file natively; false otherwise.

isMidiFileCapable

public boolean isMidiFileCapable()
Test if this ensemble contains the mapping data necessary to export associated scores to MIDI files.

Returns:
True if the ensemble is MIDI enabled; false otherwise.

setMidiFileCapable

public void setMidiFileCapable(boolean midiFileCapable)
Set the true/false value of the MIDI enabled flag. Setting this flag true does not supply the necessary mapping data. You have to provide that as well.

Parameters:
midiFileCapable - True if the ensemble should be MIDI enabled; false otherwise.

getMidiFileType

public int getMidiFileType()
Get the format for MIDI file export.

Returns:
0 - Single Track; 1 - Multiple Tracks, Synchronous; 2 - Multiple Tracks, Asynchronous.

setMidiFileType

public void setMidiFileType(int midiFileType)
Set the format for MIDI file export.

Parameters:
midiFileType - 0 - Single Track; 1 - Multiple Tracks, Synchronous; 2 - Multiple Tracks, Asynchronous.
Throws:
java.lang.IllegalArgumentException - if the midiFileType is not 0 or 1.

isGeneralMidi

public boolean isGeneralMidi()
Mapping information for MIDI programs is defined in EnsembleInstrument instances. The GeneralMidi property of the Ensemble object indicates for the record whether or not these programs conform to the General MIDI standard.

Returns:
True if MIDI programs conform to the General MIDI standard; false otherwise.

setGeneralMidi

public void setGeneralMidi(boolean generalMidi)
Mapping information for MIDI programs is defined in EnsembleInstrument instances.

Parameters:
generalMidi - True if MIDI programs conform to the General MIDI standard; false otherwise.

getMidiPitchBendRange

public int getMidiPitchBendRange()
Get the MIDI pitch bend range.

Returns:
Number of semitones from center to full deflection. Ranges from 1 to 64.

checkMidiPitchBendRange

public void checkMidiPitchBendRange(int value)
Check that the indicated value is a suitable MIDI pitch-bend range.

Parameters:
value - The indicated value.
Throws:
java.lang.IllegalArgumentException - when the value is outside the range from 1 to 64.

setMidiPitchBendRange

public void setMidiPitchBendRange(int midiPitchBendRange)
Set the MIDI pitch bend range.

Parameters:
midiPitchBendRange - Number of semitones from center to full deflection. Ranges from 1 to 64.
Throws:
java.lang.IllegalArgumentException - when midiPitchBendRange is outside the range from 1 to 64.

pitchBendFromCents

public int pitchBendFromCents(int cents)
Calculate pitch bend value required to achieve the indicated cents deviation. You should first set the MIDI pitch bend range before calling this method.

Parameters:
cents -
Returns:
Pitch bend value.

getMidiChannelMode

public 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.

Returns:
The current MIDI channel mode.

setMidiChannelMode

public 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.

Parameters:
midiChannelMode - The desired MIDI channel mode.

getMidiTicksPerTimeUnit

public int getMidiTicksPerTimeUnit()
Get the MidiTicksPerTimeUnit.

Returns:
The assigned MidiTicksPerTimeUnit value.

checkMidiTicksPerTimeUnit

public void checkMidiTicksPerTimeUnit(int value)
Check if the indicated value is suitable as the MIDI ticks per time unit.

Parameters:
value - The indicated value.
Throws:
java.lang.IllegalArgumentException - when the value is not positive.

setMidiTicksPerTimeUnit

public void setMidiTicksPerTimeUnit(int midiTicksPerTimeUnit)
Set the MidiTicksPerTimeUnit.

Parameters:
midiTicksPerTimeUnit - The intended MidiTicksPerTimeUnit value.
Throws:
java.lang.IllegalArgumentException - when the value is not positive.

isNoteListCapable

public boolean isNoteListCapable()
Test if this ensemble contains the mapping data necessary to export associated scores to note-list note lists.

Returns:
True if the ensemble is MIDI enabled; false otherwise.

setNoteListCapable

public void setNoteListCapable(boolean noteListCapable)
Set the true/false value of the note-list note list enabling flag. Setting this flag true does not supply the necessary mapping data. You have to provide that as well.

Parameters:
noteListCapable - True if the ensemble should be note-list note list enabled; false otherwise.

getNoteListFormat

public NoteListFormat getNoteListFormat()
Get the note-list format.

Returns:
The assigned note-list format.

setNoteListFormat

public void setNoteListFormat(NoteListFormat noteListFormat)
Set the note-list format.

Parameters:
noteListFormat - The intended note-list format.

getOrchestraFile

public java.io.File getOrchestraFile()
Get the SOUND orchestra file. SOUND is a digital sound-synthesis engine created by Charles Ames. Access to the orchestra file is provided so that the ensemble mapping data may be checked against the instruments in the SOUND orchestra.

Returns:
A File instance referencing the orchestra file.

setOrchestraFile

public void setOrchestraFile(java.io.File orchestraFile)
Set the SOUND orchestra file. SOUND is a digital sound-synthesis engine created by Charles Ames. Access to the orchestra file is provided so that the ensemble mapping data may be checked against the instruments in the SOUND orchestra.

Parameters:
orchestraFile - A File instance referencing the orchestra file.

setNoteListSampleRate

public void setNoteListSampleRate(int noteListSampleRate)
Set the note-list sample rate.

Parameters:
noteListSampleRate - Number of samples per second per channel.

checkNoteListSampleRate

public void checkNoteListSampleRate(int value)
Check if the indicated value is suitable as a sample rate.

Parameters:
value - The indicated value.
Throws:
java.lang.IllegalArgumentException - when the value is negative.

getNoteListSampleRate

public int getNoteListSampleRate()
Get the note-list sample rate.

Returns:
sampleRate Number of samples per second per channel.

setNoteListSampleBits

public void setNoteListSampleBits(int sampleBits)
Set the note-list sample bits.

Parameters:
sampleBits - The intended number of bits per sample (16 or 32).
Throws:
java.lang.IllegalArgumentException - when the number of bits per sample is neither 16 nor 32.

getNoteListSampleBits

public int getNoteListSampleBits()
Get the note-list sample bits.

Returns:
sampleRate The assigned number of bits per sample (16 or 32).

setNoteListNormalize

public void setNoteListNormalize(boolean normalize)
Set the note-list normalize flag.

Parameters:
normalize - The intended note-list normalize flag.

isNoteListNormalize

public boolean isNoteListNormalize()
Get the note-list normalize flag.

Returns:
The assigned note-list normalize flag.

setNoteListTrace

public void setNoteListTrace(boolean trace)
Set the note-list trace flag.

Parameters:
trace - The intended note-list trace flag.

isNoteListTrace

public boolean isNoteListTrace()
Get the note-list trace flag.

Returns:
The assigned note-list trace flag.

setNoteListLineTerminator

public void setNoteListLineTerminator(NoteListLineTerminator lineTerminator)
Set the note-list line terminator.

Parameters:
lineTerminator - Newline or semicolon.

getNoteListLineTerminator

public NoteListLineTerminator getNoteListLineTerminator()
Get the note-list line terminator.

Returns:
Newline or semicolon.

clearOpcodes

public void clearOpcodes()
Clear existing note-list NoteListOpcode definitions


createOpcode

public NoteListOpcode createOpcode(TypeOfOpcode opcodeType,
                                   java.lang.String defaultValue)
Create a new note-list NoteListOpcode.

Parameters:
opcodeType - The opcode type. Must be unique under the Ensemble.
defaultValue - The character string that begins a note-list statement.
Returns:
The new NoteListOpcode instance.

setOpcodeValue

public void setOpcodeValue(java.lang.String name,
                           java.lang.String value)
Set the character string that begins a note-list statement. Valid opcode names are "Orchestra", "SampleRate", "Note", "File", "StartTime", and "EndTime";

Parameters:
name - The Opcode name.
value - The character string that begins a note-list statement.

getOpcodes

public java.util.SortedMap<java.lang.String,NoteListOpcode> getOpcodes()
Returns:
The collection of NoteListOpcode instances, indexed by name.

getOpcode

public NoteListOpcode getOpcode(java.lang.String name)
Get the NoteListOpcode with the indicated name.

Parameters:
name - The indicated name.
Returns:
The NoteListOpcode with the indicated name.
Throws:
java.lang.IllegalArgumentException - when the name is undefined.

getOpcodeValue

public java.lang.String getOpcodeValue(TypeOfOpcode opcodeType)
Get the value of the NoteListOpcode with the indicated opcode type.

Parameters:
opcodeType - The indicated opcode type.
Returns:
The character string that begins a note-list statement.

isMusicXmlCapable

public boolean isMusicXmlCapable()
Test if this ensemble contains the mapping data necessary to export associated scores to MusicXML files.

Returns:
True if the ensemble is MusicXML enabled; false otherwise.

setMusicXmlCapable

public void setMusicXmlCapable(boolean musicXmlCapable)
Set the true/false value of the MusicXML enabling flag. Setting this flag true does not supply the necessary mapping data. You have to provide that as well.

Parameters:
musicXmlCapable - True if the ensemble should be MusicXML enabled; false otherwise.

getDefaultTimeSignature

public TimeSignature getDefaultTimeSignature()
Get the initial time signature for MusicXML and MIDI export.

Returns:
The current initial time signature.

setDefaultTimeSignature

public void setDefaultTimeSignature(TimeSignature defaultTimeSignature)
Set the initial time signature for MusicXML and MIDI export.

Parameters:
defaultTimeSignature - The desired initial time signature.

getDefaultKeySignature

public KeySignature getDefaultKeySignature()
Get the initial key signature for MusicXML and MIDI export.

Returns:
The current initial key signature.

setDefaultKeySignature

public void setDefaultKeySignature(KeySignature defaultKeySignature)
Set the initial key signature for MusicXML and MIDI export.

Parameters:
defaultKeySignature - The desired initial key signature.

getMusicXmlStaffDistance

public int getMusicXmlStaffDistance()
Get the staff distance for MusicXML export.

Returns:
The current staff distance.

checkMusicXmlStaffDistance

public void checkMusicXmlStaffDistance(int value)
Check if the indicated value is suitable as a MusicXML staff distance.

Parameters:
value - The indicated value.
Throws:
java.lang.IllegalArgumentException - when the value is negative.

setMusicXmlStaffDistance

public void setMusicXmlStaffDistance(int musicXmlStaffDistance)
Set the staff distance for MusicXML export.

Parameters:
musicXmlStaffDistance - The current staff distance.
Throws:
java.lang.IllegalArgumentException - when the value is negative.

getMusicXmlShortestNeume

public Neume getMusicXmlShortestNeume()
Get the shortest neume for MusicXML export.

Returns:
The current shortest neume.

setMusicXmlShortestNeume

public void setMusicXmlShortestNeume(Neume musicXmlShortestNeume)
Set the shortest neume for MusicXML export.

Parameters:
musicXmlShortestNeume - The desired shortest neume.

getVoicesByName

public java.util.SortedMap<java.lang.String,EnsembleVoice> getVoicesByName()
Returns:
The full collection of EnsembleVoice instances, indexed by name.

getVoicesByID

public java.util.SortedMap<java.lang.Integer,EnsembleVoice> getVoicesByID()
Returns:
The full collection of EnsembleVoice instances, indexed by id.

hasVoiceName

public boolean hasVoiceName(java.lang.String name)
Test if a voice name is already used.

Parameters:
name - The indicated name.
Returns:
True if an existing voice uses the indicated name; false otherwise.

checkNewVoiceName

public void checkNewVoiceName(java.lang.String name)
Check if the indicated name is usable for a new EnsembleVoice.

Parameters:
name - The indicated name.

hasVoiceID

public boolean hasVoiceID(int id)
Test if a voice id is already used.

Parameters:
id - The indicated id.
Returns:
True if an existing voice uses the indicated id; false otherwise.

checkNewVoiceID

public void checkNewVoiceID(int id)
Check if the indicated ID is usable for a new EnsembleVoice.

Parameters:
id - The indicated ID

getVoice

public EnsembleVoice getVoice(java.lang.String name)
Get the EnsembleVoice instance with the indicated name.

Parameters:
name - The indicated name.
Returns:
The EnsembleVoice instance with the indicated name (null if not found).

getVoice

public EnsembleVoice getVoice(int id)
Get the EnsembleVoice instance with the indicated id.

Parameters:
id - The indicated id.
Returns:
The EnsembleVoice instance with the indicated id (null if not found).

getAnyVoice

public EnsembleVoice getAnyVoice()
Description copied from class: ContainerOfChoirsAndContours
Searches for any voice specification defined under this Ensemble or Choir, or from any sub-choir.

Specified by:
getAnyVoice in class ContainerOfChoirsAndContours
Returns:
The first voice specification found.

makeDirty

public void makeDirty()
Description copied from class: WriteableEntity
Signal that the document has experienced a change which should be saved to the associated file.

Specified by:
makeDirty in interface FileDocument
Overrides:
makeDirty in class WriteableEntity

isDirty

public boolean isDirty()
Description copied from interface: FileDocument
Test if the document or any of its components has experienced a change which justifies saving to file.

Specified by:
isDirty in interface FileDocument
Returns:
True if a change has occurred; false otherwise.

getInstrumentsByName

public java.util.SortedMap<java.lang.String,EnsembleInstrument> getInstrumentsByName()
Returns:
The collection of EnsembleInstrument instances, indexed by name.

getInstrumentsByID

public java.util.SortedMap<java.lang.Integer,EnsembleInstrument> getInstrumentsByID()
Returns:
The collection of EnsembleInstrument instances, indexed by id.

getDefaultInstrumentID

public java.lang.Integer getDefaultInstrumentID()
Get the first id that is unused by any existing EnsembleInstrument.

Returns:
The new instrument id.

checkNewInstrumentID

public void checkNewInstrumentID(int id)
Check if the indicated ID is usable for a new EnsembleInstrument.

Parameters:
id - The indicated ID.

checkNewInstrumentName

public void checkNewInstrumentName(java.lang.String name)
Check if the indicated name is usable for a new EnsembleInstrument.

Parameters:
name - The indicated name.

createInstrument

public EnsembleInstrument createInstrument(java.lang.String name,
                                           int id)
Create an EnsembleInstrument instance.

Parameters:
name - The new instrument name.
id - The new instrument id
Returns:
The new EnsembleInstrument instance.
Throws:
java.lang.IllegalArgumentException - If the ensemble already has an instrument with the indicated id or name.

createInstrument

public EnsembleInstrument createInstrument(java.lang.String name)
Create an EnsembleInstrument instance. The next available id is used.

Parameters:
name - The new instrument name.
Returns:
The new EnsembleInstrument instance.

removeInstrument

public void removeInstrument(java.lang.String name)
Remove the EnsembleInstrument with the indicated name.

Parameters:
name - The indicated name
Throws:
java.lang.IllegalArgumentException - If the ensemble has no instrument with the indicated name.

removeInstrument

public void removeInstrument(int id)
Remove the EnsembleInstrument with the indicated id.

Parameters:
id - The indicated id.
Throws:
java.lang.IllegalArgumentException - If the ensemble has no instrument with the indicated id.

getInstrument

public EnsembleInstrument getInstrument(java.lang.String name)
Get an EnsembleInstrument instance with the indicated name.

Parameters:
name - The indicated name.
Returns:
The EnsembleInstrument instance with the indicated name (null if not found).

getInstrument

public EnsembleInstrument getInstrument(int id)
Get an EnsembleInstrument instance with the indicated id.

Parameters:
id - The indicated id.
Returns:
The EnsembleInstrument instance with the indicated id (null if not found).

getNoteListInstrumentsByID

public java.util.SortedMap<java.lang.Integer,NoteListInstrument> getNoteListInstrumentsByID()
Returns:
The collection of NoteListInstrument instances, indexed by id.

getNoteListInstrumentsByName

public java.util.SortedMap<java.lang.String,NoteListInstrument> getNoteListInstrumentsByName()
Returns:
The collection of NoteListInstrument instances, indexed by name.

getDefaultNoteListInstrumentID

public java.lang.Integer getDefaultNoteListInstrumentID()
Get the first id that is unused by any existing NoteListInstrument.

Returns:
The new instrument id.

checkNewNoteListInstrumentID

public void checkNewNoteListInstrumentID(int id)
Check if the indicated ID is usable for a new NoteListInstrument.

Parameters:
id - The indicated ID.

checkNewNoteListInstrumentName

public void checkNewNoteListInstrumentName(java.lang.String name)
Check if the indicated name is usable for a new NoteListInstrument.

Parameters:
name - The indicated name.

createNoteListInstrument

public NoteListInstrument createNoteListInstrument(int id,
                                                   java.lang.String name)
Create an NoteListInstrument instance with the indicated id and name.

Parameters:
id - The new instrument id.
name - The new instrument name.
Returns:
The new NoteListInstrument instance.
Throws:
java.lang.IllegalArgumentException - If the ensemble already has an instrument with the indicated id or name.

removeNoteListInstrument

public void removeNoteListInstrument(int id)
Remove the NoteListInstrument with the indicated id.

Parameters:
id - The indicated id.
Throws:
java.lang.IllegalArgumentException - If the ensemble has no instrument with the indicated id.

getNoteListInstrument

public NoteListInstrument getNoteListInstrument(int id)
Get an NoteListInstrument instance with the indicated id.

Parameters:
id - The indicated id.
Returns:
The NoteListInstrument instance with the indicated id (null if not found).

getNoteListInstrument

public NoteListInstrument getNoteListInstrument(java.lang.String name)
Get an NoteListInstrument instance with the indicated name.

Parameters:
name - The indicated name.
Returns:
The NoteListInstrument instance with the indicated name (null if not found).

getMusicXmlPartsByName

public java.util.SortedMap<java.lang.String,MusicXmlPart> getMusicXmlPartsByName()
Get the ensemble-wide collection of MusicXmlPart instances.

Returns:
A collection of MusicXmlPart instances indexed by name.

getMusicXmlPartsByID

public java.util.SortedMap<java.lang.Integer,MusicXmlPart> getMusicXmlPartsByID()
Get the ensemble-wide collection of MusicXmlPart instances.

Returns:
A collection of MusicXmlPart instances indexed by id.

checkNewMusicXmlPartName

public void checkNewMusicXmlPartName(java.lang.String name)
Check if the indicated name is suitable for a new MusicXmlPart instance.

Parameters:
name - The indicated name.

getDefaultMusicXmlPartID

public int getDefaultMusicXmlPartID()
Generate the next usable MusicXmlPart part id.

Returns:
The next usable MusicXmlPart id.

checkNewMusicXmlPartID

public void checkNewMusicXmlPartID(int id)
Check if the indicated id is suitable for a new MusicXmlPart instance.

Parameters:
id -

removeMusicXmlPart

public void removeMusicXmlPart(MusicXmlPart part)
Remove a MusicXmlPart instance from its parent EnsembleChoir and from this ensemble.

Parameters:
part - The MusicXmlPart instance to remove.

getMusicXmlPart

public MusicXmlPart getMusicXmlPart(java.lang.String name)
Get the MusicXmlPart with the indicated name.

Parameters:
name - The indicated name.
Returns:
The MusicXmlPart with the indicated name (null if not found).

getMusicXmlPart

public MusicXmlPart getMusicXmlPart(int id)
Get the MusicXmlPart with the indicated id.

Parameters:
id - The indicated id.
Returns:
The MusicXmlPart with the indicated id (null if not found).

check

public boolean check(HtmlBuilder htmlBuilder)
Description copied from class: WriteableEntity
Check this component for errors and inconsistencies

Overrides:
check in class ContainerOfChoirsAndContours
Parameters:
htmlBuilder - Accumulates an HTML formatted record of each error or inconsistency found.
Returns:
False if any errors or inconsistencies are found; true otherwise.

save

public void save()
Description copied from interface: FileDocument
Save this document to the path indicated using the FileDocument.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.

Specified by:
save in interface FileDocument

load

public void load()
Description copied from interface: FileDocument
Load this document from the path indicated using the FileDocument.setFile(File) method.

Specified by:
load in interface FileDocument

logError

public void logError(org.w3c.dom.Node node,
                     java.lang.String message)
Description copied from class: WriteableEntity
Handle an error encountered while loading this document.

Specified by:
logError in interface XmlFileDocument
Overrides:
logError in class WriteableEntity
Parameters:
node - The XML node where this error was detected.
message - A text string describing the error.

resequenceInstruments

public void resequenceInstruments()
Rebuild the sequence of instrument id's so that the first id is 1 and the sequence proceeds without gaps.


shiftInstrumentUp

public void shiftInstrumentUp(int id)
Move a specified EnsembleInstrument up within the collection (i.e. decrement its id).

Parameters:
id - The current instrument id

shiftInstrumentDown

public void shiftInstrumentDown(int id)
Move a specified EnsembleInstrument down within the collection (i.e. increment its id).

Parameters:
id - The current instrument id

shiftInstrumentsDown

public void shiftInstrumentsDown(int id,
                                 int increment)
Parameters:
id -
increment -

resequenceNoteListInstruments

public void resequenceNoteListInstruments()
Rebuild the sequence of note-list instrument id's so that the first id is 1 and the sequence proceeds without gaps.


shiftNoteListInstrumentUp

public void shiftNoteListInstrumentUp(int id)
Move a specified EnsembleInstrument up within the collection (i.e. decrement its id).

Parameters:
id - The current instrument id

shiftNoteListInstrumentDown

public void shiftNoteListInstrumentDown(int id)
Move a specified EnsembleInstrument down within the collection (i.e. increment its id).

Parameters:
id - The current instrument id

shiftNoteListInstrumentsDown

public void shiftNoteListInstrumentsDown(int id,
                                         int increment)
Parameters:
id -
increment -

resequenceParts

public void resequenceParts()
Rebuild the sequence of MusicXmlPart id's so that the first id is 1 and the sequence proceeds without gaps.


shiftPartUp

public void shiftPartUp(int id)
Move a specified MusicXmlPart up within the collection (i.e. decrement its id).

Parameters:
id - The current part id

shiftPartDown

public void shiftPartDown(int id)
Move a specified MusicXmlPart down within the collection (i.e. increment its id).

Parameters:
id - The current instrument id

shiftPartsDown

public void shiftPartsDown(int id,
                           int increment)
Move a block of MusicXmlParts down within the collection.

Parameters:
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.

resequenceVoices

public void resequenceVoices()
Rebuild the sequence of voice id's so that the first id is 1 and the sequence proceeds without gaps.


shiftVoiceUp

public void shiftVoiceUp(int id)
Move a specified EnsembleVoice up within the collection (i.e. decrement its id).

Parameters:
id - The current part id

shiftVoiceDown

public void shiftVoiceDown(int id)
Move a specified EnsembleVoice down within the collection (i.e. increment its id).

Parameters:
id - The current instrument id

shiftVoicesDown

public void shiftVoicesDown(int id,
                            int increment)
Move a block of EnsembleVoices down within the collection.

Parameters:
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.

getChoirPaths

public java.util.List<java.lang.String> getChoirPaths()
Get a collection of choir paths.

Returns:
A list of choir paths.

clear

public void clear()
Clear the contents of this ensemble.

Overrides:
clear in class ContainerOfChoirsAndContours

wipe

public void wipe()
Description copied from class: Entity
Clear all data in this Entity instance.

Overrides:
wipe in class ContainerOfChoirsAndContours

getDefaultVoiceID

public java.lang.Integer getDefaultVoiceID()
Get the first id that is unused by any existing EnsembleVoice.

Returns:
The new voice id.

getMidiDeviceNames

public java.util.Set<java.lang.String> getMidiDeviceNames()
Returns:
A deduped list of MIDI device names.

createXmlSpec

public static XmlSpec createXmlSpec()
Create an XML specification for the Ensemble class.

Returns:
The newly created XmlSpec instance.
Throws:
java.lang.RuntimeException - when an XmlSpec instance already exists for the Ensemble class.

equals

public boolean equals(EnsembleEntity other)
Description copied from class: EnsembleEntity
Check if this entity has the same class and content as another entity.

Overrides:
equals in class ContainerOfChoirsAndContours
Parameters:
other - The other entity.
Returns:
True if the two entities have the same class and content; false otherwise.