public class EditableInstrument extends java.lang.Object implements Disposable, IEditableInstrument
DEFAULT_PIPESTOPGROUPNAME| Constructor and Description |
|---|
EditableInstrument() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(InstrumentDescriptionListener listener) |
void |
addListener(ScaleListener listener)
Add a scale listener ...
|
void |
addListener(SoundSampleListListener listener)
Add sound sample list listener
|
void |
addScript(InstrumentScript script)
Add a script into the instrument
|
void |
addSoundSample(SoundSample ss,
java.lang.String pipeStopGroup) |
void |
clearDirty()
clear instrument modified status
|
void |
dispose()
Dispose the resources associated to an object
|
InstrumentScript |
findScript(java.lang.String name)
Find a script associated to the instrument
|
InstrumentScript[] |
findScriptsByType(InstrumentScript.InstrumentScriptType type)
Find all the script of a specified type
|
java.lang.String |
getInstrumentDescription()
Get the instrument description
|
java.awt.Image |
getInstrumentPicture()
Get the instrument picture
|
java.lang.String |
getName()
Get the instrument name
|
SoundSample |
getPercussionSoundSample(PercussionDef pd)
Get the sample associated to a percussion sample
|
java.lang.String[] |
getPipeStopGroupsAndRegisterName()
Get the list of pipestop groups in the instrument
|
SampleMapping |
getSampleMapping(java.lang.String pipeStopGroupAndRegister,
SoundSample sample)
Get the mapping associated with a pipestopgroup
|
Scale |
getScale()
Get the scale of the instrument
|
InstrumentScript[] |
getScripts()
get all the importer scripts asssociated to the instrument
|
java.util.List<SoundSample> |
getSoundSampleList(java.lang.String pipeStopGroup)
Get the sound sample List ...
|
boolean |
isDirty()
is the object has been modified since last clear ?
|
void |
removeListener(InstrumentDescriptionListener listener) |
void |
removeListener(ScaleListener listener)
Remove a scale listener
|
void |
removeListener(SoundSampleListListener listener)
Remove sound sample list listener
|
void |
removeSampleMapping(java.lang.String pipeStopGroup,
SoundSample sample)
Remove a sound sample associated to a pipestopgroup
|
void |
removeScript(java.lang.String name)
Remove a script from the instrument
|
void |
removeSoundSample(SoundSample ss,
java.lang.String pipeStopGroup) |
void |
setInstrumentDescription(java.lang.String instrumentDescription)
Define the instrument description
|
void |
setInstrumentPicture(java.awt.Image instrumentPicture)
Define the instrument picture
|
void |
setName(java.lang.String name)
Define the name of the instrument
|
void |
setPercussionSoundSample(PercussionDef pd,
SoundSample ss)
define a sample associated to a percussion
|
SampleMapping |
setSampleMapping(java.lang.String pipeStopGroup,
SoundSample sample,
int first,
int end)
Define a sound sample for a pipestopgroup
|
void |
setScale(Scale scale)
Define a new Scale associated to the instrument
|
protected void |
toggleDirty()
signal instrument is dirty
|
public void setScale(Scale scale)
IEditableInstrumentsetScale in interface IEditableInstrumentpublic Scale getScale()
IEditableInstrumentgetScale in interface IEditableInstrumentpublic void setName(java.lang.String name)
IEditableInstrumentsetName in interface IEditableInstrumentpublic java.lang.String getName()
IEditableInstrumentgetName in interface IEditableInstrumentpublic java.lang.String[] getPipeStopGroupsAndRegisterName()
IEditableInstrumentgetPipeStopGroupsAndRegisterName in interface IEditableInstrumentpublic void addListener(ScaleListener listener)
IEditableInstrumentaddListener in interface IEditableInstrumentpublic void removeListener(ScaleListener listener)
IEditableInstrumentremoveListener in interface IEditableInstrumentpublic void addListener(SoundSampleListListener listener)
IEditableInstrumentaddListener in interface IEditableInstrumentpublic void removeListener(SoundSampleListListener listener)
IEditableInstrumentremoveListener in interface IEditableInstrumentpublic void addListener(InstrumentDescriptionListener listener)
addListener in interface IEditableInstrumentpublic void removeListener(InstrumentDescriptionListener listener)
removeListener in interface IEditableInstrumentpublic java.util.List<SoundSample> getSoundSampleList(java.lang.String pipeStopGroup)
IEditableInstrumentgetSoundSampleList in interface IEditableInstrumentpublic void addSoundSample(SoundSample ss, java.lang.String pipeStopGroup)
addSoundSample in interface IEditableInstrumentpublic void removeSoundSample(SoundSample ss, java.lang.String pipeStopGroup)
removeSoundSample in interface IEditableInstrumentpublic SampleMapping getSampleMapping(java.lang.String pipeStopGroupAndRegister, SoundSample sample)
IEditableInstrumentgetSampleMapping in interface IEditableInstrumentpublic SampleMapping setSampleMapping(java.lang.String pipeStopGroup, SoundSample sample, int first, int end)
IEditableInstrumentsetSampleMapping in interface IEditableInstrumentpipeStopGroup - the pipestopgroupsample - the samplefirst - the first note of the sample associationend - the last note of the sample associationpublic void removeSampleMapping(java.lang.String pipeStopGroup,
SoundSample sample)
IEditableInstrumentremoveSampleMapping in interface IEditableInstrumentpublic java.lang.String getInstrumentDescription()
IEditableInstrumentgetInstrumentDescription in interface IEditableInstrumentpublic void setInstrumentDescription(java.lang.String instrumentDescription)
IEditableInstrumentsetInstrumentDescription in interface IEditableInstrumentpublic void setInstrumentPicture(java.awt.Image instrumentPicture)
IEditableInstrumentsetInstrumentPicture in interface IEditableInstrumentpublic java.awt.Image getInstrumentPicture()
IEditableInstrumentgetInstrumentPicture in interface IEditableInstrumentpublic void dispose()
Disposabledispose in interface IEditableInstrumentdispose in interface Disposablepublic boolean isDirty()
isDirty in interface IEditableInstrumentpublic void clearDirty()
clearDirty in interface IEditableInstrumentprotected void toggleDirty()
public void addScript(InstrumentScript script)
addScript in interface IEditableInstrumentscript - public void removeScript(java.lang.String name)
removeScript in interface IEditableInstrumentname - public InstrumentScript findScript(java.lang.String name)
findScript in interface IEditableInstrumentname - public InstrumentScript[] findScriptsByType(InstrumentScript.InstrumentScriptType type)
IEditableInstrumentfindScriptsByType in interface IEditableInstrumentpublic InstrumentScript[] getScripts()
getScripts in interface IEditableInstrumentpublic void setPercussionSoundSample(PercussionDef pd, SoundSample ss)
IEditableInstrumentsetPercussionSoundSample in interface IEditableInstrumentpublic SoundSample getPercussionSoundSample(PercussionDef pd)
IEditableInstrumentgetPercussionSoundSample in interface IEditableInstrument