JSampler
v0.8a

org.jsampler
Interface SamplerChannelModel

All Known Implementing Classes:
DefaultSamplerChannelModel

public interface SamplerChannelModel

A data model representing a sampler channel. Note that all methods that begin with setBackend alter the settings on the backend side.


Method Summary
 void addBackendFxSend(int midiCtrl)
          Schedules a new task for adding a new effect send on the backend side.
 void addBackendFxSend(int midiCtrl, java.lang.String name)
          Schedules a new task for adding a new effect send on the backend side.
 void addEffectSendsListener(EffectSendsListener l)
          Registers the specified listener for receiving event messages.
 void addFxSend(FxSend fxSend)
          Adds the specified effect send.
 void addSamplerChannelListener(SamplerChannelListener l)
          Registers the specified listener for receiving event messages.
 void duplicateBackendChannel()
          Schedules a new task for duplicating the channel.
 int getChannelId()
          Gets the sampler channel number.
 SamplerChannel getChannelInfo()
          Gets the current settings of the sampler channel.
 FxSend getFxSend(int index)
          Gets the effect send at the specified position.
 FxSend getFxSendById(int fxSendId)
          Gets the effect send with the specified ID.
 int getFxSendCount()
          Gets the current number of effect sends.
 FxSend[] getFxSends()
          Gets the current list of effect sends.
 int getStreamCount()
          Gets the number of active disk streams.
 int getVoiceCount()
          Gets the number of active voices.
 void loadBackendInstrument(java.lang.String filename, int InstrIndex)
          Schedules a new task for loading and assigning the specified instrument to the sampler channel represented by this model.
 void removeAllFxSends()
          Removes all effect sends from this channel.
 void removeBackendFxSend(int fxSendId)
          Schedules a new task for removing the specified effect send on the backend side.
 void removeEffectSendsListener(EffectSendsListener l)
          Removes the specified listener.
 FxSend removeFxSend(int index)
          Removes the effect send at the specified position.
 boolean removeFxSendById(int fxSendId)
          Removes the specified effect send.
 void removeSamplerChannelListener(SamplerChannelListener l)
          Removes the specified listener.
 void resetBackendChannel()
          Schedules a new task for reseting the channel.
 void setBackendAudioOutputChannel(int audioSrc, int audioDst)
          Sets the destination of the destination of the specified audio channel.
 void setBackendAudioOutputDevice(int deviceId)
          Schedules a new task for setting (on the backend side) the audio output device of the channel represented by this model.
 void setBackendEngineType(java.lang.String engine)
          Schedules a new task for setting the sampler engine type to be used.
 void setBackendFxSendAudioOutputChannel(int fxSend, int audioSrc, int audioDst)
          Sets the destination of an effect send's audio channel.
 void setBackendFxSendLevel(int fxSend, float level)
          Sets the volume of the specified effect send.
 void setBackendFxSendMidiController(int fxSend, int midiCtrl)
          Sets the MIDI controller of the specified effect send.
 void setBackendFxSendName(int fxSend, java.lang.String name)
          Sets the name of the specified effect send.
 void setBackendMidiInputChannel(int channel)
          Schedules a new task for setting (on the backend side) the MIDI channel that the channel represented by this model should listen to.
 void setBackendMidiInputDevice(int deviceId)
          Schedules a new task for setting on the backend side the MIDI input device of the channel represented by this model.
 void setBackendMidiInputPort(int port)
          Schedules a new task for setting (on the backend side) the MIDI input port of the channel represented by this model.
 void setBackendMidiInstrumentMap(int mapId)
          Schedules a new task for assigning (on the backend side) the specified MIDI instrument map to this sampler channel.
 void setBackendMute(boolean mute)
          Schedules a new task for setting the mute mode of the channel.
 void setBackendSolo(boolean solo)
          Schedules a new task for setting on the backend side the solo mode of the channel.
 void setBackendVolume(float volume)
          Schedules a new task for setting the channel volume on the backend side.
 void setChannelInfo(SamplerChannel channel)
          Sets the current settings of the sampler channel.
 void setStreamCount(int count)
          Sets the number of active disk streams.
 void setVoiceCount(int count)
          Sets the number of active voices.
 void updateFxSend(FxSend fxSend)
          Updates the specified effect send.
 

Method Detail

addSamplerChannelListener

void addSamplerChannelListener(SamplerChannelListener l)
Registers the specified listener for receiving event messages.

Parameters:
l - The SamplerChannelListener to register.

removeSamplerChannelListener

void removeSamplerChannelListener(SamplerChannelListener l)
Removes the specified listener.

Parameters:
l - The SamplerChannelListener to remove.

addEffectSendsListener

void addEffectSendsListener(EffectSendsListener l)
Registers the specified listener for receiving event messages.

Parameters:
l - The EffectSendsListener to register.

removeEffectSendsListener

void removeEffectSendsListener(EffectSendsListener l)
Removes the specified listener.

Parameters:
l - The EffectSendsListener to remove.

getChannelId

int getChannelId()
Gets the sampler channel number.

Returns:
The sampler channel number or -1 if the sampler channel number is not set.

getChannelInfo

SamplerChannel getChannelInfo()
Gets the current settings of the sampler channel.

Returns:
SamplerChannel instance containing the current settings of the sampler channel.

setChannelInfo

void setChannelInfo(SamplerChannel channel)
Sets the current settings of the sampler channel. Note that this method does not changes the channel settings on the backend. It is invoked just notify for channel settings' changes.

Parameters:
channel - A SamplerChannel instance containing the new settings for this sampler channel.

getStreamCount

int getStreamCount()
Gets the number of active disk streams.

Returns:
The number of active disk streams.

setStreamCount

void setStreamCount(int count)
Sets the number of active disk streams. Note that this method does not alter the number of active disk streams on the backend side.

Parameters:
count - The new number of active disk streams.

getVoiceCount

int getVoiceCount()
Gets the number of active voices.

Returns:
The number of active voices.

setVoiceCount

void setVoiceCount(int count)
Sets the number of active voices. Note that this method does not alter the number of active voices on the backend side.

Parameters:
count - The new number of active voices.

setBackendEngineType

void setBackendEngineType(java.lang.String engine)
Schedules a new task for setting the sampler engine type to be used.

Parameters:
engine - The name of the engine type to be used.

setBackendMute

void setBackendMute(boolean mute)
Schedules a new task for setting the mute mode of the channel.

Parameters:
mute - Specifies the mute mode. If true the channel is muted, else the channel is unmuted.

setBackendSolo

void setBackendSolo(boolean solo)
Schedules a new task for setting on the backend side the solo mode of the channel.

Parameters:
solo - Specifies the solo mode. If true the channel is soloed, else the channel is unsoloed.

setBackendVolume

void setBackendVolume(float volume)
Schedules a new task for setting the channel volume on the backend side.

Parameters:
volume - Specifies the new volume value.

setBackendMidiInputDevice

void setBackendMidiInputDevice(int deviceId)
Schedules a new task for setting on the backend side the MIDI input device of the channel represented by this model.

Parameters:
deviceId - Specifies the numerical ID of the MIDI input device to be set.

setBackendMidiInputPort

void setBackendMidiInputPort(int port)
Schedules a new task for setting (on the backend side) the MIDI input port of the channel represented by this model.

Parameters:
port - Specifies the number of the MIDI input port.

setBackendMidiInputChannel

void setBackendMidiInputChannel(int channel)
Schedules a new task for setting (on the backend side) the MIDI channel that the channel represented by this model should listen to.

Parameters:
channel - Specifies the MIDI channel that the channel represented by this model should listen to.

setBackendAudioOutputDevice

void setBackendAudioOutputDevice(int deviceId)
Schedules a new task for setting (on the backend side) the audio output device of the channel represented by this model.

Parameters:
deviceId - Specifies the numerical ID of the audio output device to be set.

setBackendAudioOutputChannel

void setBackendAudioOutputChannel(int audioSrc,
                                  int audioDst)
Sets the destination of the destination of the specified audio channel.

Parameters:
audioSrc - The numerical ID of the sampler channel's audio output channel, which should be rerouted.
audioDst - The audio channel of the selected audio output device where audioSrc should be routed to.

setBackendMidiInstrumentMap

void setBackendMidiInstrumentMap(int mapId)
Schedules a new task for assigning (on the backend side) the specified MIDI instrument map to this sampler channel.

Parameters:
mapId - Specify the numerical ID of the MIDI instrument map that should be assigned to this sampler channel or -1 to remove the current map binding.

loadBackendInstrument

void loadBackendInstrument(java.lang.String filename,
                           int InstrIndex)
Schedules a new task for loading and assigning the specified instrument to the sampler channel represented by this model.

Parameters:
filename - The file name of the instrument to be loaded.
InstrIndex - The index of the instrument in the instrument file to be loaded.

resetBackendChannel

void resetBackendChannel()
Schedules a new task for reseting the channel.


duplicateBackendChannel

void duplicateBackendChannel()
Schedules a new task for duplicating the channel.


addBackendFxSend

void addBackendFxSend(int midiCtrl)
Schedules a new task for adding a new effect send on the backend side. The effect send will be actually added to this model when the backend notifies for its creation.

Parameters:
midiCtrl - Defines the MIDI controller, which will be able alter the effect send level.

addBackendFxSend

void addBackendFxSend(int midiCtrl,
                      java.lang.String name)
Schedules a new task for adding a new effect send on the backend side. The effect send will be actually added to this model when the backend notifies for its creation.

Parameters:
midiCtrl - Defines the MIDI controller, which will be able alter the effect send level.
name - The name of the effect send entity. The name does not have to be unique.

addFxSend

void addFxSend(FxSend fxSend)
Adds the specified effect send.

Parameters:
fxSend - The effect send to be added.

removeBackendFxSend

void removeBackendFxSend(int fxSendId)
Schedules a new task for removing the specified effect send on the backend side.

Parameters:
fxSendId - The ID of the effect send to remove.

removeFxSend

FxSend removeFxSend(int index)
Removes the effect send at the specified position.

Parameters:
index - The position of the effect send to remove.
Returns:
The removed effect send.

removeFxSendById

boolean removeFxSendById(int fxSendId)
Removes the specified effect send.

Parameters:
fxSendId - The ID of the effect send to remove.
Returns:
true if the effect send is removed successfully, false if the channel does not contain effect send with ID fxSendId.

removeAllFxSends

void removeAllFxSends()
Removes all effect sends from this channel.


updateFxSend

void updateFxSend(FxSend fxSend)
Updates the specified effect send.

Parameters:
fxSend - The effect send to update.

getFxSendCount

int getFxSendCount()
Gets the current number of effect sends.

Returns:
The current number of effect sends.

getFxSend

FxSend getFxSend(int index)
Gets the effect send at the specified position.

Parameters:
index - The index of the effect send to be returned.
Returns:
The effect send at the specified position.

getFxSendById

FxSend getFxSendById(int fxSendId)
Gets the effect send with the specified ID.

Parameters:
fxSendId - The ID of the effect send to return.
Returns:
The effect send with the specified ID or null if there is no effect send with ID fxSendId.

getFxSends

FxSend[] getFxSends()
Gets the current list of effect sends.

Returns:
The current list of effect sends.

setBackendFxSendName

void setBackendFxSendName(int fxSend,
                          java.lang.String name)
Sets the name of the specified effect send.

Parameters:
fxSend - The numerical ID of the effect send.
name - The new name of the effect send entity.

setBackendFxSendAudioOutputChannel

void setBackendFxSendAudioOutputChannel(int fxSend,
                                        int audioSrc,
                                        int audioDst)
Sets the destination of an effect send's audio channel.

Parameters:
fxSend - The numerical ID of the effect send entity to be rerouted.
audioSrc - The numerical ID of the effect send's audio output channel, which should be rerouted.
audioDst - The audio channel of the selected audio output device where audioSrc should be routed to.

setBackendFxSendMidiController

void setBackendFxSendMidiController(int fxSend,
                                    int midiCtrl)
Sets the MIDI controller of the specified effect send.

Parameters:
fxSend - The numerical ID of the effect send.
midiCtrl - The MIDI controller which shall be able to modify the effect send's send level.

setBackendFxSendLevel

void setBackendFxSendLevel(int fxSend,
                           float level)
Sets the volume of the specified effect send.

Parameters:
fxSend - The numerical ID of the effect send, which volume should be changed.
level - The new volume value.

JSampler
v0.8a

Copyright © 2007 Grigor Iliev. All rights reserved.