#include <EngineChannel.h>
Public Member Functions | |
virtual void | PrepareLoadInstrument (const char *FileName, uint Instrument)=0 |
virtual void | LoadInstrument ()=0 |
virtual void | Reset ()=0 |
virtual void | SendNoteOn (uint8_t Key, uint8_t Velocity)=0 |
virtual void | SendNoteOn (uint8_t Key, uint8_t Velocity, int32_t FragmentPos)=0 |
virtual void | SendNoteOff (uint8_t Key, uint8_t Velocity)=0 |
virtual void | SendNoteOff (uint8_t Key, uint8_t Velocity, int32_t FragmentPos)=0 |
virtual void | SendPitchbend (int Pitch)=0 |
virtual void | SendPitchbend (int Pitch, int32_t FragmentPos)=0 |
virtual void | SendControlChange (uint8_t Controller, uint8_t Value)=0 |
virtual void | SendControlChange (uint8_t Controller, uint8_t Value, int32_t FragmentPos)=0 |
virtual void | SendProgramChange (uint8_t Program)=0 |
virtual bool | StatusChanged (bool bNewStatus=false)=0 |
virtual float | Volume ()=0 |
virtual void | Volume (float f)=0 |
virtual float | Pan ()=0 |
virtual void | Pan (float f)=0 |
virtual uint | Channels ()=0 |
virtual void | Connect (AudioOutputDevice *pAudioOut)=0 |
virtual void | DisconnectAudioOutputDevice ()=0 |
virtual AudioOutputDevice * | GetAudioOutputDevice ()=0 |
virtual void | SetOutputChannel (uint EngineAudioChannel, uint AudioDeviceChannel)=0 |
virtual int | OutputChannel (uint EngineAudioChannel)=0 |
virtual void | Connect (MidiInputPort *pMidiPort, midi_chan_t MidiChannel)=0 |
virtual void | DisconnectMidiInputPort ()=0 |
virtual MidiInputPort * | GetMidiInputPort ()=0 |
virtual midi_chan_t | MidiChannel ()=0 |
virtual String | InstrumentFileName ()=0 |
virtual String | InstrumentName ()=0 |
virtual int | InstrumentIndex ()=0 |
virtual int | InstrumentStatus ()=0 |
virtual Engine * | GetEngine ()=0 |
virtual String | EngineName ()=0 |
virtual FxSend * | AddFxSend (uint8_t MidiCtrl, String Name="")=0 throw (Exception) |
virtual FxSend * | GetFxSend (uint FxSendIndex)=0 |
virtual uint | GetFxSendCount ()=0 |
virtual void | RemoveFxSend (FxSend *pFxSend)=0 |
virtual void | Connect (VirtualMidiDevice *pDevice)=0 |
virtual void | Disconnect (VirtualMidiDevice *pDevice)=0 |
void | SetMute (int state) throw (Exception) |
Sets the mute state of this channel. | |
int | GetMute () |
Determines whether this channel is muted. | |
void | SetSolo (bool solo) |
Sets the solo state of this channel. | |
bool | GetSolo () |
Determines whether this is a solo channel. | |
uint8_t | GetMidiProgram () |
Returns current MIDI program (change) number of this EngineChannel. | |
void | SetMidiProgram (uint8_t Program) |
Change EngineChannel's MIDI program. | |
uint8_t | GetMidiBankMsb () |
Returns current MIDI bank MSB (coarse) number of this EngineChannel. | |
void | SetMidiBankMsb (uint8_t BankMSB) |
Change current MIDI bank MSB (coarse) number of this EngineChannel. | |
uint8_t | GetMidiBankLsb () |
Returns current MIDI bank LSB (fine) number of this EngineChannel. | |
void | SetMidiBankLsb (uint8_t BankLSB) |
Change current MIDI bank LSB (fine) number of this EngineChannel. | |
bool | UsesNoMidiInstrumentMap () |
Returns true if this EngineChannel is using no MIDI instrument map at all, that is if it will ignore all MIDI program change messages. | |
bool | UsesDefaultMidiInstrumentMap () |
Returns true if this EngineChannel is using the default MIDI instrument map for handling MIDI program changes. | |
int | GetMidiInstrumentMap () throw (Exception) |
Returns ID of the MIDI instrument map currently used by this EngineChannel to handle MIDI program changes. | |
void | SetMidiInstrumentMapToNone () |
Let this EngineChannel use no MIDI instrument map at all, that is to let it ignore all MIDI program change messages. | |
void | SetMidiInstrumentMapToDefault () |
Let this EngineChannel use the default MIDI instrument map to handle MIDI program changes. | |
void | SetMidiInstrumentMap (int MidiMap) throw (Exception) |
Set a specific MIDI instrument map this EngineChannel should use to handle MIDI program changes. | |
void | SetMidiRpnControllerMsb (uint8_t CtrlMSB) |
Set MIDI Registered Parameter Number (RPN) Controller (upper 8 bits / coarse). | |
void | SetMidiRpnControllerLsb (uint8_t CtrlLSB) |
Set MIDI Registered Parameter Number (RPN) Controller (lower 8 bits / fine). | |
void | ResetMidiRpnController () |
Reset to no RPN controller currently selected. | |
void | AddFxSendCountListener (FxSendCountListener *l) |
Registers the specified listener to be notified when the number of effect sends on this channel is changed. | |
void | RemoveFxSendCountListener (FxSendCountListener *l) |
Removes the specified listener. | |
void | RemoveAllFxSendCountListeners () |
Removes all listeners. | |
int | GetMidiRpnController () |
Get currently selected MIDI Registered Parameter Number (RPN) Controller, this method will return the already merged value (MSB and LSB value). | |
uint | GetVoiceCount () |
Gets the current number of active voices. | |
void | SetVoiceCount (uint Voices) |
Sets the current number of active voices. | |
uint | GetDiskStreamCount () |
Gets the current number of active disk streams. | |
void | SetDiskStreamCount (uint Streams) |
Sets the current number of active disk streams. | |
SamplerChannel * | GetSamplerChannel () |
void | SetSamplerChannel (SamplerChannel *pChannel) |
Sampler * | GetSampler () |
Returns the sampler to which this channel belongs. | |
void | ExecuteProgramChange (uint8_t Program) |
Performs a program change on the channel. | |
Protected Member Functions | |
EngineChannel () | |
virtual | ~EngineChannel () |
void | fireFxSendCountChanged (int ChannelId, int NewCount) |
Notifies listeners that the number of effect sends on a this channel is changed. | |
Friends | |
class | EngineChannelFactory |
Every sampler engine can be used on several sampler channels and usually the same Engine instance is used on multiple sampler channels. For this every sampler engine must also implement a class which handles all channel dependant parameters and channel dependant execution code.
This abstract base interface class defines all mandatory methods which have to be implemented by all engine channel implementations.
Definition at line 54 of file EngineChannel.h.
LinuxSampler::EngineChannel::EngineChannel | ( | ) | [protected] |
virtual LinuxSampler::EngineChannel::~EngineChannel | ( | ) | [protected, virtual] |
virtual FxSend* LinuxSampler::EngineChannel::AddFxSend | ( | uint8_t | MidiCtrl, | |
String | Name = "" | |||
) | throw (Exception) [pure virtual] |
void LinuxSampler::EngineChannel::AddFxSendCountListener | ( | FxSendCountListener * | l | ) |
Registers the specified listener to be notified when the number of effect sends on this channel is changed.
virtual uint LinuxSampler::EngineChannel::Channels | ( | ) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::Connect | ( | VirtualMidiDevice * | pDevice | ) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::Connect | ( | MidiInputPort * | pMidiPort, | |
midi_chan_t | MidiChannel | |||
) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::Connect | ( | AudioOutputDevice * | pAudioOut | ) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::Disconnect | ( | VirtualMidiDevice * | pDevice | ) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::DisconnectAudioOutputDevice | ( | ) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::DisconnectMidiInputPort | ( | ) | [pure virtual] |
virtual String LinuxSampler::EngineChannel::EngineName | ( | ) | [pure virtual] |
void LinuxSampler::EngineChannel::ExecuteProgramChange | ( | uint8_t | Program | ) |
Performs a program change on the channel.
This method is not real-time safe.
void LinuxSampler::EngineChannel::fireFxSendCountChanged | ( | int | ChannelId, | |
int | NewCount | |||
) | [protected] |
Notifies listeners that the number of effect sends on a this channel is changed.
ChannelId | The numerical ID of the sampler channel. | |
NewCount | The new number of sampler channels. |
virtual AudioOutputDevice* LinuxSampler::EngineChannel::GetAudioOutputDevice | ( | ) | [pure virtual] |
uint LinuxSampler::EngineChannel::GetDiskStreamCount | ( | ) |
Gets the current number of active disk streams.
virtual Engine* LinuxSampler::EngineChannel::GetEngine | ( | ) | [pure virtual] |
virtual FxSend* LinuxSampler::EngineChannel::GetFxSend | ( | uint | FxSendIndex | ) | [pure virtual] |
virtual uint LinuxSampler::EngineChannel::GetFxSendCount | ( | ) | [pure virtual] |
uint8_t LinuxSampler::EngineChannel::GetMidiBankLsb | ( | ) |
Returns current MIDI bank LSB (fine) number of this EngineChannel.
uint8_t LinuxSampler::EngineChannel::GetMidiBankMsb | ( | ) |
Returns current MIDI bank MSB (coarse) number of this EngineChannel.
virtual MidiInputPort* LinuxSampler::EngineChannel::GetMidiInputPort | ( | ) | [pure virtual] |
int LinuxSampler::EngineChannel::GetMidiInstrumentMap | ( | ) | throw (Exception) |
Returns ID of the MIDI instrument map currently used by this EngineChannel to handle MIDI program changes.
You should always call UsesNoMidiInstrumentMap()
and UsesDefaultMidiInstrumentMap()
before calling this method to check if this EngineChannel is probably using the default map or no map at all, because in these two particular cases this method would throw an exception!
Exception | - if EngineChannel is set to no map at all or is set to the default map |
uint8_t LinuxSampler::EngineChannel::GetMidiProgram | ( | ) |
Returns current MIDI program (change) number of this EngineChannel.
int LinuxSampler::EngineChannel::GetMidiRpnController | ( | ) |
Get currently selected MIDI Registered Parameter Number (RPN) Controller, this method will return the already merged value (MSB and LSB value).
WARNING: you have to call ResetMidiRpnController()
after using this value, otherwise all subsequent MIDI CC #6 (Data) messages are interpreted as RPN controller value messages.
int LinuxSampler::EngineChannel::GetMute | ( | ) |
Determines whether this channel is muted.
Sampler* LinuxSampler::EngineChannel::GetSampler | ( | ) |
Returns the sampler to which this channel belongs.
SamplerChannel* LinuxSampler::EngineChannel::GetSamplerChannel | ( | ) |
bool LinuxSampler::EngineChannel::GetSolo | ( | ) |
Determines whether this is a solo channel.
uint LinuxSampler::EngineChannel::GetVoiceCount | ( | ) |
Gets the current number of active voices.
virtual String LinuxSampler::EngineChannel::InstrumentFileName | ( | ) | [pure virtual] |
virtual int LinuxSampler::EngineChannel::InstrumentIndex | ( | ) | [pure virtual] |
virtual String LinuxSampler::EngineChannel::InstrumentName | ( | ) | [pure virtual] |
virtual int LinuxSampler::EngineChannel::InstrumentStatus | ( | ) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::LoadInstrument | ( | ) | [pure virtual] |
virtual midi_chan_t LinuxSampler::EngineChannel::MidiChannel | ( | ) | [pure virtual] |
virtual int LinuxSampler::EngineChannel::OutputChannel | ( | uint | EngineAudioChannel | ) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::Pan | ( | float | f | ) | [pure virtual] |
virtual float LinuxSampler::EngineChannel::Pan | ( | ) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::PrepareLoadInstrument | ( | const char * | FileName, | |
uint | Instrument | |||
) | [pure virtual] |
void LinuxSampler::EngineChannel::RemoveAllFxSendCountListeners | ( | ) |
Removes all listeners.
virtual void LinuxSampler::EngineChannel::RemoveFxSend | ( | FxSend * | pFxSend | ) | [pure virtual] |
void LinuxSampler::EngineChannel::RemoveFxSendCountListener | ( | FxSendCountListener * | l | ) |
Removes the specified listener.
virtual void LinuxSampler::EngineChannel::Reset | ( | ) | [pure virtual] |
void LinuxSampler::EngineChannel::ResetMidiRpnController | ( | ) |
Reset to no RPN controller currently selected.
virtual void LinuxSampler::EngineChannel::SendControlChange | ( | uint8_t | Controller, | |
uint8_t | Value, | |||
int32_t | FragmentPos | |||
) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::SendControlChange | ( | uint8_t | Controller, | |
uint8_t | Value | |||
) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::SendNoteOff | ( | uint8_t | Key, | |
uint8_t | Velocity, | |||
int32_t | FragmentPos | |||
) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::SendNoteOff | ( | uint8_t | Key, | |
uint8_t | Velocity | |||
) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::SendNoteOn | ( | uint8_t | Key, | |
uint8_t | Velocity, | |||
int32_t | FragmentPos | |||
) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::SendNoteOn | ( | uint8_t | Key, | |
uint8_t | Velocity | |||
) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::SendPitchbend | ( | int | Pitch, | |
int32_t | FragmentPos | |||
) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::SendPitchbend | ( | int | Pitch | ) | [pure virtual] |
virtual void LinuxSampler::EngineChannel::SendProgramChange | ( | uint8_t | Program | ) | [pure virtual] |
void LinuxSampler::EngineChannel::SetDiskStreamCount | ( | uint | Streams | ) |
Sets the current number of active disk streams.
void LinuxSampler::EngineChannel::SetMidiBankLsb | ( | uint8_t | BankLSB | ) |
Change current MIDI bank LSB (fine) number of this EngineChannel.
void LinuxSampler::EngineChannel::SetMidiBankMsb | ( | uint8_t | BankMSB | ) |
Change current MIDI bank MSB (coarse) number of this EngineChannel.
void LinuxSampler::EngineChannel::SetMidiInstrumentMap | ( | int | MidiMap | ) | throw (Exception) |
Set a specific MIDI instrument map this EngineChannel should use to handle MIDI program changes.
Exception | - in case given map does not exist |
void LinuxSampler::EngineChannel::SetMidiInstrumentMapToDefault | ( | ) |
Let this EngineChannel use the default MIDI instrument map to handle MIDI program changes.
void LinuxSampler::EngineChannel::SetMidiInstrumentMapToNone | ( | ) |
Let this EngineChannel use no MIDI instrument map at all, that is to let it ignore all MIDI program change messages.
void LinuxSampler::EngineChannel::SetMidiProgram | ( | uint8_t | Program | ) |
Change EngineChannel's MIDI program.
void LinuxSampler::EngineChannel::SetMidiRpnControllerLsb | ( | uint8_t | CtrlLSB | ) |
Set MIDI Registered Parameter Number (RPN) Controller (lower 8 bits / fine).
void LinuxSampler::EngineChannel::SetMidiRpnControllerMsb | ( | uint8_t | CtrlMSB | ) |
Set MIDI Registered Parameter Number (RPN) Controller (upper 8 bits / coarse).
void LinuxSampler::EngineChannel::SetMute | ( | int | state | ) | throw (Exception) |
Sets the mute state of this channel.
state | - specifies the mute state of this sampler channel. |
Exception | - if state does not contain valid value. |
virtual void LinuxSampler::EngineChannel::SetOutputChannel | ( | uint | EngineAudioChannel, | |
uint | AudioDeviceChannel | |||
) | [pure virtual] |
void LinuxSampler::EngineChannel::SetSamplerChannel | ( | SamplerChannel * | pChannel | ) |
void LinuxSampler::EngineChannel::SetSolo | ( | bool | solo | ) |
Sets the solo state of this channel.
solo | - specifies whether this is a solo channel. |
void LinuxSampler::EngineChannel::SetVoiceCount | ( | uint | Voices | ) |
Sets the current number of active voices.
virtual bool LinuxSampler::EngineChannel::StatusChanged | ( | bool | bNewStatus = false |
) | [pure virtual] |
bool LinuxSampler::EngineChannel::UsesDefaultMidiInstrumentMap | ( | ) |
Returns true if this EngineChannel is using the default MIDI instrument map for handling MIDI program changes.
bool LinuxSampler::EngineChannel::UsesNoMidiInstrumentMap | ( | ) |
Returns true if this EngineChannel is using no MIDI instrument map at all, that is if it will ignore all MIDI program change messages.
virtual void LinuxSampler::EngineChannel::Volume | ( | float | f | ) | [pure virtual] |
virtual float LinuxSampler::EngineChannel::Volume | ( | ) | [pure virtual] |
friend class EngineChannelFactory [friend] |
Definition at line 331 of file EngineChannel.h.