public class SynchronizedEditableInstrument extends java.lang.Object implements IEditableInstrument
DEFAULT_PIPESTOPGROUPNAME
Constructor and Description |
---|
SynchronizedEditableInstrument(IEditableInstrument wrappedEditableInstrument,
long id,
long version,
java.lang.String status,
java.lang.String referenceName) |
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 an instrument script
|
void |
addSoundSample(SoundSample ss,
java.lang.String pipeStopGroup) |
void |
changeStatus(java.lang.String newStatus) |
void |
clearDirty()
Reset the dirty flag
|
void |
dispose()
Release all the instrument resources used
|
InstrumentScript |
findScript(java.lang.String name)
Find a script by its name
|
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
|
java.lang.String |
getReferenceName() |
java.lang.Long |
getRepositoryInstrumentID() |
SampleMapping |
getSampleMapping(java.lang.String pipeStopGroup,
SoundSample sample)
Get the mapping associated with a pipestopgroup
|
Scale |
getScale()
Get the scale of the instrument
|
InstrumentScript[] |
getScripts()
Get all the scripts associated to an instrument
|
java.util.List<SoundSample> |
getSoundSampleList(java.lang.String pipeStopGroup)
Get the sound sample List ...
|
java.lang.String |
getStatus() |
java.lang.Long |
getVersion() |
boolean |
isDirty()
Ask if the instrument is dirty
|
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 by its name
|
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
|
public SynchronizedEditableInstrument(IEditableInstrument wrappedEditableInstrument, long id, long version, java.lang.String status, java.lang.String referenceName)
public void addListener(ScaleListener listener)
IEditableInstrument
addListener
in interface IEditableInstrument
public void addListener(SoundSampleListListener listener)
IEditableInstrument
addListener
in interface IEditableInstrument
public void addListener(InstrumentDescriptionListener listener)
addListener
in interface IEditableInstrument
public void addSoundSample(SoundSample ss, java.lang.String pipeStopGroup)
addSoundSample
in interface IEditableInstrument
public void dispose()
IEditableInstrument
dispose
in interface IEditableInstrument
public java.lang.String getInstrumentDescription()
IEditableInstrument
getInstrumentDescription
in interface IEditableInstrument
public java.awt.Image getInstrumentPicture()
IEditableInstrument
getInstrumentPicture
in interface IEditableInstrument
public java.lang.String getName()
IEditableInstrument
getName
in interface IEditableInstrument
public java.lang.String[] getPipeStopGroupsAndRegisterName()
IEditableInstrument
getPipeStopGroupsAndRegisterName
in interface IEditableInstrument
public SampleMapping getSampleMapping(java.lang.String pipeStopGroup, SoundSample sample)
IEditableInstrument
getSampleMapping
in interface IEditableInstrument
public Scale getScale()
IEditableInstrument
getScale
in interface IEditableInstrument
public java.util.List<SoundSample> getSoundSampleList(java.lang.String pipeStopGroup)
IEditableInstrument
getSoundSampleList
in interface IEditableInstrument
public void removeListener(ScaleListener listener)
IEditableInstrument
removeListener
in interface IEditableInstrument
public void removeListener(SoundSampleListListener listener)
IEditableInstrument
removeListener
in interface IEditableInstrument
public void removeListener(InstrumentDescriptionListener listener)
removeListener
in interface IEditableInstrument
public void removeSampleMapping(java.lang.String pipeStopGroup, SoundSample sample)
IEditableInstrument
removeSampleMapping
in interface IEditableInstrument
public void removeSoundSample(SoundSample ss, java.lang.String pipeStopGroup)
removeSoundSample
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 void setName(java.lang.String name)
IEditableInstrument
setName
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 setScale(Scale scale)
IEditableInstrument
setScale
in interface IEditableInstrument
public java.lang.Long getRepositoryInstrumentID()
public java.lang.Long getVersion()
public java.lang.String getStatus()
public void changeStatus(java.lang.String newStatus)
public java.lang.String getReferenceName()
public boolean isDirty()
IEditableInstrument
isDirty
in interface IEditableInstrument
public void clearDirty()
IEditableInstrument
clearDirty
in interface IEditableInstrument
public void addScript(InstrumentScript script)
IEditableInstrument
addScript
in interface IEditableInstrument
public InstrumentScript findScript(java.lang.String name)
IEditableInstrument
findScript
in interface IEditableInstrument
public InstrumentScript[] getScripts()
IEditableInstrument
getScripts
in interface IEditableInstrument
public void removeScript(java.lang.String name)
IEditableInstrument
removeScript
in interface IEditableInstrument
public InstrumentScript[] findScriptsByType(InstrumentScript.InstrumentScriptType type)
IEditableInstrument
findScriptsByType
in interface IEditableInstrument
public SoundSample getPercussionSoundSample(PercussionDef pd)
IEditableInstrument
getPercussionSoundSample
in interface IEditableInstrument
public void setPercussionSoundSample(PercussionDef pd, SoundSample ss)
IEditableInstrument
setPercussionSoundSample
in interface IEditableInstrument