linuxsampler 1.0.0

LinuxSampler::SamplerChannel Class Reference

LinuxSampler sampler channel. More...

#include <Sampler.h>

List of all members.

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 SetMidiInputDevice (MidiInputDevice *pDevice) throw (Exception)
 Connect this sampler channel to a MIDI input device.
void SetMidiInputPort (int MidiPort) throw (Exception)
 Connect this sampler channel to a MIDI input port.
void SetMidiInputChannel (midi_chan_t MidiChannel)
 Define on which MIDI channel(s) this sampler channel should listen to.
void SetMidiInput (MidiInputDevice *pDevice, int iMidiPort, midi_chan_t MidiChannel=midi_chan_all) throw (Exception)
 Connect this sampler channel to a MIDI input triplet.
EngineChannelGetEngineChannel ()
 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 ()
 Returns the MIDI input port number to which this sampler channel is currently connected to.
AudioOutputDeviceGetAudioOutputDevice ()
 Returns the audio output device to which this sampler channel is currently connected to.
MidiInputDeviceGetMidiInputDevice ()
 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.
SamplerGetSampler ()
 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 ()
MidiInputPort__GetMidiInputDevicePort (int iMidiPort)
 Getting MIDI input device port given its index number.

Protected Attributes

SamplerpSampler
EngineChannelpEngineChannel
AudioOutputDevicepAudioOutputDevice
MidiInputDevicepMidiInputDevice
int iIndex

Friends

class Sampler

Detailed Description

LinuxSampler sampler channel.

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.

Definition at line 52 of file Sampler.h.


Constructor & Destructor Documentation

LinuxSampler::SamplerChannel::SamplerChannel ( Sampler pS) [protected]
virtual LinuxSampler::SamplerChannel::~SamplerChannel ( ) [protected, virtual]

Member Function Documentation

MidiInputPort* LinuxSampler::SamplerChannel::__GetMidiInputDevicePort ( int  iMidiPort) [protected]

Getting MIDI input device port given its index number.

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::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.

Returns:
pointer to audio output device or NULL if not connected
EngineChannel* LinuxSampler::SamplerChannel::GetEngineChannel ( )

Returns the EngineChannel object that was deployed on this sampler channel appropriate to the given sampler engine type.

Returns:
pointer to engine or NULL if no engine deployed
midi_chan_t LinuxSampler::SamplerChannel::GetMidiInputChannel ( )

Returns the MIDI input channel to which this sampler channel is currently connected to.

Returns:
The MIDI input channel on which the sampler channel is listening to.
MidiInputDevice* LinuxSampler::SamplerChannel::GetMidiInputDevice ( )

Returns the MIDI input device to which this sampler channel is currently connected to.

Returns:
pointer to MIDI input device or NULL if not connected
int LinuxSampler::SamplerChannel::GetMidiInputPort ( )

Returns the MIDI input port number to which this sampler channel is currently connected to.

Returns:
MIDI input port number or -1 if not connected
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.

Parameters:
pDevice- audio output device to connect to
Exceptions:
Exceptionin 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
void LinuxSampler::SamplerChannel::SetEngineType ( String  EngineType) throw (Exception)

Assign a sampler engine type to this sampler channel.

Parameters:
EngineType- type of the engine to use
Exceptions:
Exception- if EngineType is invalid
See also:
Sampler::AvailableEngineTypes()
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.

Parameters:
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)
Exceptions:
Exceptionin 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.

By default, that is after creation of a new sampler channel, the sampler channel will listen to all MIDI channels.

Parameters:
MidiChannel- MIDI channel to listen
void LinuxSampler::SamplerChannel::SetMidiInputDevice ( MidiInputDevice pDevice) throw (Exception)

Connect this sampler channel to a MIDI input device.

Parameters:
pDevice- MIDI input device to connect to
Exceptions:
Exceptionin 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::SetMidiInputPort ( int  MidiPort) throw (Exception)

Connect this sampler channel to a MIDI input port.

Parameters:
MidiPort- MIDI port to connect to
Exceptions:
Exceptionin 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

Friends And Related Function Documentation

friend class Sampler [friend]

Definition at line 222 of file Sampler.h.


Member Data Documentation

Definition at line 220 of file Sampler.h.

Definition at line 217 of file Sampler.h.

Definition at line 216 of file Sampler.h.


The documentation for this class was generated from the following file: