|
JSampler v0.8a |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jsampler.DefaultSamplerModel
public class DefaultSamplerModel
This class provides default implementation of the SamplerModel interface.
Note that the setter methods of this class does not alter any settings
on the backend side unless otherwise specified.
| Constructor Summary | |
|---|---|
DefaultSamplerModel()
Creates a new instance of DefaultSamplerModel |
|
| Method Summary | |
|---|---|
void |
addAudioDevice(AudioOutputDevice device)
Adds the specified audio device. |
void |
addAudioDeviceListListener(ListListener<AudioDeviceModel> listener)
Registers the specified listener for receiving event messages. |
void |
addBackendChannel()
Schedules a new task for adding a new sampler channel on the backend side. |
void |
addBackendMidiDevice(java.lang.String driver,
Parameter... parameters)
Schedules a new task for adding new MIDI device. |
void |
addBackendMidiInstrumentMap(java.lang.String name)
Schedules a new task for creating a new MIDI instrument map on the backend side. |
void |
addChannel(SamplerChannel channel)
Adds the specified sampler channel. |
void |
addMidiDevice(MidiInputDevice device)
Adds the specified MIDI device. |
void |
addMidiDeviceListListener(MidiDeviceListListener listener)
Registers the specified listener for receiving event messages. |
void |
addMidiInstrumentMap(MidiInstrumentMap map)
Adds the specified MIDI instrument map. |
void |
addMidiInstrumentMapListListener(ListListener<MidiInstrumentMap> listener)
Registers the specified listener for receiving event messages. |
void |
addSamplerChannelListListener(SamplerChannelListListener listener)
Registers the specified listener for receiving event messages. |
void |
addSamplerListener(SamplerListener l)
Registers the specified listener for receiving event messages. |
void |
editBackendInstrument(int channelId)
Schedules a new task for starting an instrument editor for editing the loaded instrument on the specified sampler channel. |
AudioDeviceModel |
getAudioDevice(int index)
Gets the model of the audio device at the specified position. |
AudioDeviceModel |
getAudioDeviceById(int deviceId)
Gets the model of the audio device with ID deviceId. |
int |
getAudioDeviceCount()
Gets the current number of audio devices. |
AudioDeviceModel[] |
getAudioDevices()
Gets the current list of audio device models. |
AudioOutputDriver[] |
getAudioOutputDrivers()
Gets all audio output drivers currently available for the LinuxSampler instance. |
SamplerChannelModel |
getChannel(int index)
Gets the model of the sampler channel in the specified position. |
SamplerChannelModel |
getChannelById(int channelId)
Gets the model of the sampler channel with ID channelId. |
int |
getChannelCount()
Gets the current number of sampler channels. |
SamplerChannelModel[] |
getChannels()
Gets the current list of sampler channel models. |
MidiInstrumentMap |
getDefaultMidiInstrumentMap()
Gets the default MIDI instrument map. |
SamplerEngine[] |
getEngines()
Gets a list of all available engines. |
MidiDeviceModel |
getMidiDevice(int index)
Gets the model of the MIDI device at the specified position. |
MidiDeviceModel |
getMidiDeviceById(int deviceId)
Gets the model of the MIDI device with ID deviceId. |
int |
getMidiDeviceCount()
Gets the current number of MIDI input devices. |
MidiDeviceModel[] |
getMidiDevices()
Gets the current list of MIDI device models. |
MidiInputDriver[] |
getMidiInputDrivers()
Gets all MIDI input drivers currently available for the LinuxSampler instance. |
MidiInstrumentMap |
getMidiInstrumentMap(int index)
Gets the MIDI instrument map at the specified position. |
MidiInstrumentMap |
getMidiInstrumentMapById(int mapId)
Gets the MIDI instrument map with ID mapId. |
int |
getMidiInstrumentMapCount()
Gets the current number of MIDI instrument maps. |
int |
getMidiInstrumentMapIndex(MidiInstrumentMap map)
Gets the position of the specified MIDI instrument map in the list. |
MidiInstrumentMap[] |
getMidiInstrumentMaps()
Gets the current list of MIDI instrument maps. |
int |
getMutedBySoloChannelCount()
Gets the number of channels muted because of the presence of a solo channel. |
int |
getMutedChannelCount()
Gets the number of muted channels in the current list of sampler channels. |
ServerInfo |
getServerInfo()
Gets information about the LinuxSampler instance the front-end is connected to. |
int |
getSoloChannelCount()
Gets the number of solo channels in the current list of sampler channels. |
int |
getTotalStreamCount()
Gets the total number of active streams. |
int |
getTotalVoiceCount()
Gets the total number of active voices. |
int |
getTotalVoiceCountMax()
Gets the maximum number of active voices. |
float |
getVolume()
Gets the golobal volume of the sampler. |
boolean |
hasSoloChannel()
Determines whether there is at least one solo channel in the current list of sampler channels. |
boolean |
isModified()
Determines whether the sampler configuration is modified. |
void |
mapBackendMidiInstrument(int mapId,
int bank,
int program,
MidiInstrumentInfo instrInfo)
Schedules a new task for mapping a MIDI instrument on the backend side. |
void |
removeAllMidiInstrumentMaps()
Removes all MIDI instrument maps. |
boolean |
removeAudioDeviceById(int deviceId)
Removes the specified audio device. |
void |
removeAudioDeviceListListener(ListListener<AudioDeviceModel> listener)
Removes the specified listener. |
void |
removeBackendAudioDevice(int deviceId)
Schedules a new task for removing the specified audio device on the backend side. |
void |
removeBackendChannel(int channelId)
Schedules a new task for removing the specified sampler channel on the backend side. |
void |
removeBackendMidiDevice(int deviceId)
Schedules a new task for removing the specified MIDI device. |
void |
removeBackendMidiInstrumentMap(int mapId)
Schedules a new task for removing the specified MIDI instrument map on the backend side. |
boolean |
removeChannelById(int channelId)
Removes the specified sampler channel. |
boolean |
removeMidiDeviceById(int deviceId)
Removes the specified MIDI device. |
void |
removeMidiDeviceListListener(MidiDeviceListListener listener)
Removes the specified listener. |
boolean |
removeMidiInstrumentMap(MidiInstrumentMap map)
Removes the specified MIDI instrument map. |
boolean |
removeMidiInstrumentMapById(int mapId)
Removes the specified MIDI instrument map. |
void |
removeMidiInstrumentMapListListener(ListListener<MidiInstrumentMap> listener)
Removes the specified listener. |
void |
removeSamplerChannelListListener(SamplerChannelListListener listener)
Removes the specified listener. |
void |
removeSamplerListener(SamplerListener l)
Removes the specified listener. |
void |
resetBackend()
Schedules a new task for resetting the sampler. |
void |
setAudioOutputDrivers(AudioOutputDriver[] drivers)
Sets the currently available audio output drivers for the LinuxSampler instance. |
void |
setBackendMidiInstrumentMapName(int mapId,
java.lang.String name)
Schedules a new task for changing the name of the specified MIDI instrument map on the backend side. |
void |
setBackendVolume(float volume)
Schedules a new task for setting the global volume on the backend side. |
void |
setEngines(SamplerEngine[] engines)
Sets the list of all available engines. |
void |
setMidiInputDrivers(MidiInputDriver[] drivers)
Sets the currently available MIDI input drivers for the LinuxSampler instance. |
void |
setModified(boolean b)
Sets whether the sampler configuration is modified. |
void |
setServerInfo(ServerInfo serverInfo)
Sets information about the LinuxSampler instance the front-end is connected to. |
void |
setVolume(float volume)
Sets the global volume. |
void |
unmapBackendMidiInstrument(int mapId,
int bank,
int program)
Schedules a new task for removing a MIDI instrument on the backend side. |
void |
updateActiveStreamsInfo(int count)
Updates the current number of active disk streams in the sampler. |
void |
updateActiveVoiceInfo(int count,
int countMax)
Updates the current and the maximum number of active voices in the sampler. |
void |
updateChannel(SamplerChannel channel)
Updates the settings of the specified channel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultSamplerModel()
| Method Detail |
|---|
public void addSamplerListener(SamplerListener l)
addSamplerListener in interface SamplerModell - The SamplerListener to register.public void removeSamplerListener(SamplerListener l)
removeSamplerListener in interface SamplerModell - The SamplerListener to remove.public void addAudioDeviceListListener(ListListener<AudioDeviceModel> listener)
addAudioDeviceListListener in interface SamplerModellistener - The AudioDeviceListListener to register.public void removeAudioDeviceListListener(ListListener<AudioDeviceModel> listener)
removeAudioDeviceListListener in interface SamplerModellistener - The AudioDeviceListListener to remove.public void addMidiDeviceListListener(MidiDeviceListListener listener)
addMidiDeviceListListener in interface SamplerModellistener - The MidiDeviceListListener to register.public void removeMidiDeviceListListener(MidiDeviceListListener listener)
removeMidiDeviceListListener in interface SamplerModellistener - The MidiDeviceListListener to remove.public void addMidiInstrumentMapListListener(ListListener<MidiInstrumentMap> listener)
addMidiInstrumentMapListListener in interface SamplerModellistener - The ListListener to register.public void removeMidiInstrumentMapListListener(ListListener<MidiInstrumentMap> listener)
removeMidiInstrumentMapListListener in interface SamplerModellistener - The ListListener to remove.public void addSamplerChannelListListener(SamplerChannelListListener listener)
addSamplerChannelListListener in interface SamplerModellistener - The SamplerChannelListListener to register.public void removeSamplerChannelListListener(SamplerChannelListListener listener)
removeSamplerChannelListListener in interface SamplerModellistener - The SamplerChannelListListener to remove.public ServerInfo getServerInfo()
getServerInfo in interface SamplerModelServerInfo instance containing
information about the LinuxSampler instance the front-end is connected to.public void setServerInfo(ServerInfo serverInfo)
serverInfo - ServerInfo instance containing
information about the LinuxSampler instance the front-end is connected to.public AudioOutputDriver[] getAudioOutputDrivers()
getAudioOutputDrivers in interface SamplerModelAudioOutputDriver array containing all audio output drivers
currently available for the LinuxSampler instance.public void setAudioOutputDrivers(AudioOutputDriver[] drivers)
drivers - AudioOutputDriver array containing all audio output drivers
currently available for the LinuxSampler instance.public AudioDeviceModel getAudioDevice(int index)
getAudioDevice in interface SamplerModelindex - The position of the audio device to return.
getAudioDeviceCount()public AudioDeviceModel getAudioDeviceById(int deviceId)
deviceId.
getAudioDeviceById in interface SamplerModeldeviceId - The ID of the audio device whose model should be obtained.
null
if there is no audio device with ID deviceId.public int getAudioDeviceCount()
getAudioDeviceCount in interface SamplerModelpublic AudioDeviceModel[] getAudioDevices()
getAudioDevices in interface SamplerModelpublic void addAudioDevice(AudioOutputDevice device)
addAudioDevice in interface SamplerModeldevice - The audio device to be added.public boolean removeAudioDeviceById(int deviceId)
removeAudioDeviceById in interface SamplerModeldeviceId - The ID of the audio device to be removed.
true if the audio device is removed successfully, false
if the device list does not contain audio device with ID deviceId.public void removeBackendAudioDevice(int deviceId)
removeBackendAudioDevice in interface SamplerModeldeviceId - The ID of the audio device to be removed.public MidiInputDriver[] getMidiInputDrivers()
getMidiInputDrivers in interface SamplerModelMidiInputDriver array containing all MIDI input drivers currently
available for the LinuxSampler instance.public void setMidiInputDrivers(MidiInputDriver[] drivers)
drivers - MidiInputDriver array containing all MIDI input drivers
currently available for the LinuxSampler instance.public MidiDeviceModel getMidiDevice(int index)
getMidiDevice in interface SamplerModelindex - The position of the MIDI device to return.
public MidiDeviceModel getMidiDeviceById(int deviceId)
deviceId.
getMidiDeviceById in interface SamplerModeldeviceId - The ID of the MIDI device whose model should be obtained.
null
if there is no MIDI device with ID deviceId.public int getMidiDeviceCount()
getMidiDeviceCount in interface SamplerModelpublic MidiDeviceModel[] getMidiDevices()
getMidiDevices in interface SamplerModelpublic void addMidiDevice(MidiInputDevice device)
addMidiDevice in interface SamplerModeldevice - The MIDI device to be added.
public void addBackendMidiDevice(java.lang.String driver,
Parameter... parameters)
addBackendMidiDevice in interface SamplerModeldriver - The desired MIDI input system.parameters - An optional list of driver specific parameters.public boolean removeMidiDeviceById(int deviceId)
removeMidiDeviceById in interface SamplerModeldeviceId - The ID of the MIDI device to be removed.
true if the MIDI device is removed successfully, false
if the device list does not contain MIDI device with ID deviceId.public void removeBackendMidiDevice(int deviceId)
removeBackendMidiDevice in interface SamplerModeldeviceId - The ID of the MIDI input device to be destroyed.public MidiInstrumentMap getMidiInstrumentMapById(int mapId)
mapId.
getMidiInstrumentMapById in interface SamplerModelmapId - The ID of the MIDI instrument map to obtain.
null
if there is no MIDI instrument map with ID mapId.public MidiInstrumentMap getMidiInstrumentMap(int index)
getMidiInstrumentMap in interface SamplerModelindex - The position of the MIDI instrument map to return.
public int getMidiInstrumentMapCount()
getMidiInstrumentMapCount in interface SamplerModelpublic MidiInstrumentMap[] getMidiInstrumentMaps()
getMidiInstrumentMaps in interface SamplerModelpublic int getMidiInstrumentMapIndex(MidiInstrumentMap map)
getMidiInstrumentMapIndex in interface SamplerModelmap - The map whose index should be returned.
map is null or
the map list does not contain the specified map.public void addMidiInstrumentMap(MidiInstrumentMap map)
addMidiInstrumentMap in interface SamplerModelmap - The MIDI instrument map to be added.
java.lang.IllegalArgumentException - If map is null.public void addBackendMidiInstrumentMap(java.lang.String name)
addBackendMidiInstrumentMap in interface SamplerModelname - The name of the MIDI instrument map.
java.lang.IllegalArgumentException - If name is null.public boolean removeMidiInstrumentMapById(int mapId)
removeMidiInstrumentMapById in interface SamplerModelmapId - The ID of the MIDI instrument map to be removed.
true if the MIDI instrument map is removed successfully,
false if the MIDI instrument map's list does not contain
MIDI instrument map with ID mapId.public boolean removeMidiInstrumentMap(MidiInstrumentMap map)
map - The MIDI instrument map to remove.
true if the specified MIDI instrument map was in the list,
false otherwise.public void removeAllMidiInstrumentMaps()
removeAllMidiInstrumentMaps in interface SamplerModelpublic void removeBackendMidiInstrumentMap(int mapId)
removeBackendMidiInstrumentMap in interface SamplerModelmapId - The numerical ID of the MIDI instrument map to remove.
public void setBackendMidiInstrumentMapName(int mapId,
java.lang.String name)
setBackendMidiInstrumentMapName in interface SamplerModelmapId - The numerical ID of the MIDI instrument map.name - The new name for the specified MIDI instrument map.public MidiInstrumentMap getDefaultMidiInstrumentMap()
getDefaultMidiInstrumentMap in interface SamplerModelnull
if there are no maps created.
public void mapBackendMidiInstrument(int mapId,
int bank,
int program,
MidiInstrumentInfo instrInfo)
mapBackendMidiInstrument in interface SamplerModelmapId - The id of the MIDI instrument map.bank - The index of the MIDI bank, which shall contain the instrument.program - The MIDI program number of the new instrument.instrInfo - Provides the MIDI instrument settings.
public void unmapBackendMidiInstrument(int mapId,
int bank,
int program)
unmapBackendMidiInstrument in interface SamplerModelmapId - The id of the MIDI instrument map containing the instrument to be removed.bank - The index of the MIDI bank containing the instrument to be removed.program - The MIDI program number of the instrument to be removed.public SamplerEngine[] getEngines()
getEngines in interface SamplerModelpublic void setEngines(SamplerEngine[] engines)
engines - The new list of all available engines.public SamplerChannelModel getChannel(int index)
getChannel in interface SamplerModelindex - The position of the channel to return.
#getchannelCountpublic SamplerChannelModel getChannelById(int channelId)
channelId.
getChannelById in interface SamplerModelchannelId - The ID of the sampler channel whose model should be obtained.
null
if there is no channel with ID channelId.public int getChannelCount()
getChannelCount in interface SamplerModelpublic SamplerChannelModel[] getChannels()
getChannels in interface SamplerModelpublic void addBackendChannel()
addBackendChannel in interface SamplerModeladdChannel(SamplerChannel)public void addChannel(SamplerChannel channel)
addChannel in interface SamplerModelchannel - The channel to be added.public void updateChannel(SamplerChannel channel)
updateChannel in interface SamplerModelchannel - A SamplerChannel instance containing the new settings
for the channel.public boolean removeChannelById(int channelId)
removeChannelById in interface SamplerModelchannelId - The ID of the channel to be removed.
true if the channel is removed successfully, false
if the channel's list does not contain channel with ID channelId.public void removeBackendChannel(int channelId)
removeBackendChannel in interface SamplerModelchannelId - The ID of the channel to be removed.public void editBackendInstrument(int channelId)
editBackendInstrument in interface SamplerModelchannelId - The sampler channel number.public boolean hasSoloChannel()
hasSoloChannel in interface SamplerModeltrue if there is at least one solo channel in the current list of
sampler channels, false otherwise.public int getSoloChannelCount()
getSoloChannelCount in interface SamplerModelpublic int getMutedChannelCount()
getMutedChannelCount in interface SamplerModelpublic int getMutedBySoloChannelCount()
getMutedBySoloChannelCount in interface SamplerModelpublic int getTotalStreamCount()
getTotalStreamCount in interface SamplerModelpublic int getTotalVoiceCount()
getTotalVoiceCount in interface SamplerModelpublic int getTotalVoiceCountMax()
getTotalVoiceCountMax in interface SamplerModelpublic float getVolume()
getVolume in interface SamplerModelpublic void setVolume(float volume)
setVolume in interface SamplerModelvolume - The new volume value.public void setBackendVolume(float volume)
setBackendVolume in interface SamplerModelvolume - The new volume value.public void resetBackend()
resetBackend in interface SamplerModelpublic void updateActiveStreamsInfo(int count)
updateActiveStreamsInfo in interface SamplerModelcount - The new number of active streams.
public void updateActiveVoiceInfo(int count,
int countMax)
updateActiveVoiceInfo in interface SamplerModelcount - The new number of active voices.countMax - The maximum number of active voices.public boolean isModified()
isModified in interface SamplerModelpublic void setModified(boolean b)
setModified in interface SamplerModel
|
JSampler v0.8a |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||