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)
IEditableInstrument
setScale
in interface IEditableInstrument
public Scale getScale()
IEditableInstrument
getScale
in interface IEditableInstrument
public void setName(java.lang.String name)
IEditableInstrument
setName
in interface IEditableInstrument
public java.lang.String getName()
IEditableInstrument
getName
in interface IEditableInstrument
public java.lang.String[] getPipeStopGroupsAndRegisterName()
IEditableInstrument
getPipeStopGroupsAndRegisterName
in interface IEditableInstrument
public void addListener(ScaleListener listener)
IEditableInstrument
addListener
in interface IEditableInstrument
public void removeListener(ScaleListener listener)
IEditableInstrument
removeListener
in interface IEditableInstrument
public void addListener(SoundSampleListListener listener)
IEditableInstrument
addListener
in interface IEditableInstrument
public void removeListener(SoundSampleListListener listener)
IEditableInstrument
removeListener
in interface IEditableInstrument
public void addListener(InstrumentDescriptionListener listener)
addListener
in interface IEditableInstrument
public void removeListener(InstrumentDescriptionListener listener)
removeListener
in interface IEditableInstrument
public java.util.List<SoundSample> getSoundSampleList(java.lang.String pipeStopGroup)
IEditableInstrument
getSoundSampleList
in interface IEditableInstrument
public void addSoundSample(SoundSample ss, java.lang.String pipeStopGroup)
addSoundSample
in interface IEditableInstrument
public void removeSoundSample(SoundSample ss, java.lang.String pipeStopGroup)
removeSoundSample
in interface IEditableInstrument
public SampleMapping getSampleMapping(java.lang.String pipeStopGroupAndRegister, SoundSample sample)
IEditableInstrument
getSampleMapping
in interface IEditableInstrument
public SampleMapping setSampleMapping(java.lang.String pipeStopGroup, SoundSample sample, int first, int end)
IEditableInstrument
setSampleMapping
in interface IEditableInstrument
pipeStopGroup
- 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)
IEditableInstrument
removeSampleMapping
in interface IEditableInstrument
public java.lang.String getInstrumentDescription()
IEditableInstrument
getInstrumentDescription
in interface IEditableInstrument
public void setInstrumentDescription(java.lang.String instrumentDescription)
IEditableInstrument
setInstrumentDescription
in interface IEditableInstrument
public void setInstrumentPicture(java.awt.Image instrumentPicture)
IEditableInstrument
setInstrumentPicture
in interface IEditableInstrument
public java.awt.Image getInstrumentPicture()
IEditableInstrument
getInstrumentPicture
in interface IEditableInstrument
public void dispose()
Disposable
dispose
in interface IEditableInstrument
dispose
in interface Disposable
public boolean isDirty()
isDirty
in interface IEditableInstrument
public void clearDirty()
clearDirty
in interface IEditableInstrument
protected void toggleDirty()
public void addScript(InstrumentScript script)
addScript
in interface IEditableInstrument
script
- public void removeScript(java.lang.String name)
removeScript
in interface IEditableInstrument
name
- public InstrumentScript findScript(java.lang.String name)
findScript
in interface IEditableInstrument
name
- public InstrumentScript[] findScriptsByType(InstrumentScript.InstrumentScriptType type)
IEditableInstrument
findScriptsByType
in interface IEditableInstrument
public InstrumentScript[] getScripts()
getScripts
in interface IEditableInstrument
public void setPercussionSoundSample(PercussionDef pd, SoundSample ss)
IEditableInstrument
setPercussionSoundSample
in interface IEditableInstrument
public SoundSample getPercussionSoundSample(PercussionDef pd)
IEditableInstrument
getPercussionSoundSample
in interface IEditableInstrument