linuxsampler 2.3.1
|
LinuxSampler sampler channel (a.k.a. More...
#include <Sampler.h>
Public Member Functions | |
void | SetEngineType (String EngineType) throw (Exception) |
Assign a sampler engine type to this sampler channel. | |
void | SetAudioOutputDevice (AudioOutputDevice *pDevice) throw (Exception) |
Connect this sampler channel to an audio output device, that is an instance of an audio output driver. | |
void | Connect (MidiInputPort *pPort) throw (Exception) |
Connect the given MIDIInputPort to this SamplerChannel. | |
void | Disconnect (MidiInputPort *pPort) throw (Exception) |
Disconnects the given MidiInputPort from this SamplerChannel. | |
void | DisconnectAllMidiInputPorts () throw (Exception) |
Disconnects all MIDI input ports currently connected with this SamplerChannel. | |
std::vector< MidiInputPort * > | GetMidiInputPorts () |
Returns all MIDI input ports currently connected to this sampler channel. | |
void | SetMidiInputDevice (MidiInputDevice *pDevice) DEPRECATED_API throw (Exception) |
Connect this sampler channel to a MIDI input device. | |
void | SetMidiInputPort (int MidiPort) DEPRECATED_API throw (Exception) |
Change the MIDI input port connected to this sampler channel. | |
void | SetMidiInputChannel (midi_chan_t MidiChannel) |
Define on which MIDI channel(s) this sampler channel should listen to (on all MIDI ports and all virtual MIDI devices connected to this sampler channel). | |
void | SetMidiInput (MidiInputDevice *pDevice, int iMidiPort, midi_chan_t MidiChannel=midi_chan_all) DEPRECATED_API throw (Exception) |
Connect this sampler channel to a MIDI input triplet. | |
EngineChannel * | GetEngineChannel () |
Returns the EngineChannel object that was deployed on this sampler channel appropriate to the given sampler engine type. | |
midi_chan_t | GetMidiInputChannel () |
Returns the MIDI input channel to which this sampler channel is currently connected to. | |
int | GetMidiInputPort () DEPRECATED_API |
Returns the MIDI input port number to which this sampler channel is currently connected to. | |
AudioOutputDevice * | GetAudioOutputDevice () |
Returns the audio output device to which this sampler channel is currently connected to. | |
MidiInputDevice * | GetMidiInputDevice () DEPRECATED_API |
Returns the MIDI input device to which this sampler channel is currently connected to. | |
uint | Index () |
Returns the index number of this sampler channel within the Sampler instance. | |
Sampler * | GetSampler () |
Returns the sampler to which this channel belongs. | |
void | AddEngineChangeListener (EngineChangeListener *l) |
Registers the specified listener to be notified when the engine type of this sampler channel is changed. | |
void | RemoveEngineChangeListener (EngineChangeListener *l) |
Removes the specified listener. | |
void | RemoveAllEngineChangeListeners () |
Removes the specified listener. | |
void | fireEngineToBeChanged () |
Notifies listeners that the engine type of this sampler channel is going to be changed soon. | |
void | fireEngineChanged () |
Notifies listeners that the engine type of this sampler channel is changed. | |
Protected Member Functions | |
SamplerChannel (Sampler *pS) | |
virtual | ~SamplerChannel () |
Protected Attributes | |
Sampler * | pSampler |
EngineChannel * | pEngineChannel |
AudioOutputDevice * | pAudioOutputDevice |
int | iIndex |
Friends | |
class | Sampler |
LinuxSampler sampler channel (a.k.a.
"sampler part")
Encapsulates a channel of a specific sampler engine type, one connection to a MIDI input device and one connection to an audio output device. You cannot create an instance of this class on your own, you have to use the AddSamplerChannel() method of the Sampler object to create a new sampler channel.
|
protected |
|
protectedvirtual |
void LinuxSampler::SamplerChannel::AddEngineChangeListener | ( | EngineChangeListener * | l | ) |
Registers the specified listener to be notified when the engine type of this sampler channel is changed.
void LinuxSampler::SamplerChannel::Connect | ( | MidiInputPort * | pPort | ) | |
throw | ( | Exception | |||
) |
Connect the given MIDIInputPort to this SamplerChannel.
The connection is added to the sampler channel. So other MIDI input connections remain unaffected by this call. If the given port is already connected to this sampler channel, then this call is ignored.
pPort | - MIDI input port to connect to |
Exception | in case the MIDI device is tried to be changed while the sampler channel is being used by a host plugin (e.g. VST, AU, DSSI, LV2) which don't allow to change the MIDI port or even device |
void LinuxSampler::SamplerChannel::Disconnect | ( | MidiInputPort * | pPort | ) | |
throw | ( | Exception | |||
) |
Disconnects the given MidiInputPort from this SamplerChannel.
All other MIDI input ports connected to this sampler channel remain unaffected. If the given port is not currently connected to this sampler channel, then this call is ignored.
pPort | - MIDI input port to disconnect |
Exception | in case the MIDI device is tried to be changed while the sampler channel is being used by a host plugin (e.g. VST, AU, DSSI, LV2) which don't allow to change the MIDI port or even device |
Disconnects all MIDI input ports currently connected with this SamplerChannel.
Exception | in case the MIDI device is tried to be changed while the sampler channel is being used by a host plugin (e.g. VST, AU, DSSI, LV2) which don't allow to change the MIDI port or even device |
void LinuxSampler::SamplerChannel::fireEngineChanged | ( | ) |
Notifies listeners that the engine type of this sampler channel is changed.
void LinuxSampler::SamplerChannel::fireEngineToBeChanged | ( | ) |
Notifies listeners that the engine type of this sampler channel is going to be changed soon.
AudioOutputDevice * LinuxSampler::SamplerChannel::GetAudioOutputDevice | ( | ) |
Returns the audio output device to which this sampler channel is currently connected to.
EngineChannel * LinuxSampler::SamplerChannel::GetEngineChannel | ( | ) |
Returns the EngineChannel object that was deployed on this sampler channel appropriate to the given sampler engine type.
midi_chan_t LinuxSampler::SamplerChannel::GetMidiInputChannel | ( | ) |
Returns the MIDI input channel to which this sampler channel is currently connected to.
MidiInputDevice * LinuxSampler::SamplerChannel::GetMidiInputDevice | ( | ) |
Returns the MIDI input device to which this sampler channel is currently connected to.
int LinuxSampler::SamplerChannel::GetMidiInputPort | ( | ) |
Returns the MIDI input port number to which this sampler channel is currently connected to.
This method should not be used in new applications anymore!
std::vector< MidiInputPort * > LinuxSampler::SamplerChannel::GetMidiInputPorts | ( | ) |
Returns all MIDI input ports currently connected to this sampler channel.
Sampler * LinuxSampler::SamplerChannel::GetSampler | ( | ) |
Returns the sampler to which this channel belongs.
uint LinuxSampler::SamplerChannel::Index | ( | ) |
Returns the index number of this sampler channel within the Sampler instance.
void LinuxSampler::SamplerChannel::RemoveAllEngineChangeListeners | ( | ) |
Removes the specified listener.
void LinuxSampler::SamplerChannel::RemoveEngineChangeListener | ( | EngineChangeListener * | l | ) |
Removes the specified listener.
void LinuxSampler::SamplerChannel::SetAudioOutputDevice | ( | AudioOutputDevice * | pDevice | ) | |
throw | ( | Exception | |||
) |
Connect this sampler channel to an audio output device, that is an instance of an audio output driver.
If this sampler channel was already connected to an audio output device, then the old connection will automatically be removed before.
pDevice | - audio output device to connect to |
Exception | in case the audio device is tried to be changed while the sampler channel is used by a host plugin (e.g. VST, AU, DSSI, LV2) which don't allow to change the audio output device |
Assign a sampler engine type to this sampler channel.
EngineType | - type of the engine to use |
Exception | - if EngineType is invalid |
void LinuxSampler::SamplerChannel::SetMidiInput | ( | MidiInputDevice * | pDevice, |
int | iMidiPort, | ||
midi_chan_t | MidiChannel = midi_chan_all |
||
) | |||
throw | ( | Exception | |
) |
Connect this sampler channel to a MIDI input triplet.
This call will also disconnect all existing MIDI input connections from this sampler channel before establishing the new connection! Disconnection of all previous connections is done to preserve full behavior backward compatibility to times when this API only allowed one MIDI input port per sampler channel.
pDevice | - MIDI input device to connect to |
iMidiPort | - MIDI port to connect to |
MidiChannel | - optional: MIDI channel on which the sampler channel should listen to (default: listen on all MIDI channels) |
Exception | in case the MIDI port is tried to be changed while the sampler channel is being used by a host plugin (e.g. VST, AU, DSSI, LV2) which don't allow to change the MIDI port |
void LinuxSampler::SamplerChannel::SetMidiInputChannel | ( | midi_chan_t | MidiChannel | ) |
Define on which MIDI channel(s) this sampler channel should listen to (on all MIDI ports and all virtual MIDI devices connected to this sampler channel).
By default, that is after creation of a new sampler channel, the sampler channel will listen to all MIDI channels (a.k.a. "MIDI Omni mode").
MidiChannel | - MIDI channel to listen |
Exception | if provided MidiChannel is not a valid constant as defined by midi_chan_t |
void LinuxSampler::SamplerChannel::SetMidiInputDevice | ( | MidiInputDevice * | pDevice | ) | |
throw | ( | Exception | |||
) |
Connect this sampler channel to a MIDI input device.
This call will also disconnect all existing MIDI input connections from this sampler channel before establishing the new connection! Disconnection of all previous connections is done to preserve full behavior backward compatibility to times when this API only allowed one MIDI input port per sampler channel.
pDevice | - MIDI input device to connect to |
Exception | in case the MIDI device is tried to be changed while the sampler channel is being used by a host plugin (e.g. VST, AU, DSSI, LV2) which don't allow to change the MIDI port or even device |
Change the MIDI input port connected to this sampler channel.
Calling this method will switch the connection of the first (and only the first) MIDIInputPort currently being connected to this sampler channel, to another port of the same MidiInputDevice. Or in other words: the first MIDIInputPort currently connected to this sampler channel will be disconnected, and the requested other port of its MIDIInputDevice will be connected to this sampler channel instead.
This behavior is implemented to preserve full behavior backward compatibility to times when this API only allowed one MIDI input port per SamplerChannel.
MidiPort | - MIDI port to connect to |
Exception | in case the MIDI port is tried to be changed while the sampler channel is being used by a host plugin (e.g. VST, AU, DSSI, LV2) which don't allow to change the MIDI port |
|
protected |
|
protected |