3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 Christian Schoenebeck * |
* Copyright (C) 2005, 2006 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
30 |
|
|
31 |
#include "../common/Event.h" |
#include "../common/Event.h" |
32 |
#include "../common/EngineChannel.h" |
#include "../common/EngineChannel.h" |
33 |
|
#include "../../common/RingBuffer.h" |
34 |
#include "EngineGlobals.h" |
#include "EngineGlobals.h" |
35 |
#include "Engine.h" |
#include "Engine.h" |
36 |
#include "Voice.h" |
#include "Voice.h" |
68 |
virtual void DisconnectAudioOutputDevice(); |
virtual void DisconnectAudioOutputDevice(); |
69 |
virtual void SetOutputChannel(uint EngineAudioChannel, uint AudioDeviceChannel); |
virtual void SetOutputChannel(uint EngineAudioChannel, uint AudioDeviceChannel); |
70 |
virtual int OutputChannel(uint EngineAudioChannel); |
virtual int OutputChannel(uint EngineAudioChannel); |
71 |
|
virtual void Connect(MidiInputPort* pMidiPort, midi_chan_t MidiChannel); |
72 |
|
virtual void DisconnectMidiInputPort(); |
73 |
|
virtual MidiInputPort* GetMidiInputPort(); |
74 |
|
virtual midi_chan_t MidiChannel(); |
75 |
virtual String InstrumentFileName(); |
virtual String InstrumentFileName(); |
76 |
virtual String InstrumentName(); |
virtual String InstrumentName(); |
77 |
virtual int InstrumentIndex(); |
virtual int InstrumentIndex(); |
90 |
float* pOutputRight; ///< Audio output channel buffer (right) |
float* pOutputRight; ///< Audio output channel buffer (right) |
91 |
int AudioDeviceChannelLeft; ///< audio device channel number to which the left channel is connected to |
int AudioDeviceChannelLeft; ///< audio device channel number to which the left channel is connected to |
92 |
int AudioDeviceChannelRight; ///< audio device channel number to which the right channel is connected to |
int AudioDeviceChannelRight; ///< audio device channel number to which the right channel is connected to |
93 |
|
MidiInputPort* pMidiInputPort; ///< Points to the connected MIDI input port or NULL if none assigned. |
94 |
|
midi_chan_t midiChannel; ///< MIDI channel(s) on which this engine channel listens to. |
95 |
RingBuffer<Event>* pEventQueue; ///< Input event queue. |
RingBuffer<Event>* pEventQueue; ///< Input event queue. |
96 |
RTList<Event>* pEvents; ///< All engine channel specific events for the current audio fragment. |
RTList<Event>* pEvents; ///< All engine channel specific events for the current audio fragment. |
|
RTList<Event>* pCCEvents; ///< All control change events for the current audio fragment on this engine channel. |
|
|
RTList<Event>* pSynthesisEvents[Event::destination_count]; ///< Events directly affecting synthesis parameters (like pitch, volume and filter). |
|
97 |
uint8_t ControllerTable[128]; ///< Reflects the current values (0-127) of all MIDI controllers for this engine / sampler channel. |
uint8_t ControllerTable[128]; ///< Reflects the current values (0-127) of all MIDI controllers for this engine / sampler channel. |
98 |
midi_key_info_t* pMIDIKeyInfo; ///< Contains all active voices sorted by MIDI key number and other informations to the respective MIDI key |
midi_key_info_t* pMIDIKeyInfo; ///< Contains all active voices sorted by MIDI key number and other informations to the respective MIDI key |
99 |
Pool<uint>* pActiveKeys; ///< Holds all keys in it's allocation list with active voices. |
Pool<uint>* pActiveKeys; ///< Holds all keys in it's allocation list with active voices. |
100 |
std::map<uint,uint*> ActiveKeyGroups; ///< Contains active keys (in case they belong to a key group) ordered by key group ID. |
std::map<uint,uint*> ActiveKeyGroups; ///< Contains active keys (in case they belong to a key group) ordered by key group ID. |
101 |
::gig::Instrument* pInstrument; |
::gig::Instrument* pInstrument; |
102 |
bool SustainPedal; ///< true if sustain pedal is down |
bool SustainPedal; ///< true if sustain pedal is down |
103 |
|
bool SostenutoPedal; ///< true if sostenuto pedal is down |
104 |
|
bool SoloMode; ///< in Solo Mode we only play one voice (group) at a time |
105 |
|
int SoloKey; ///< Currently 'active' solo key, that is the key to which the currently sounding voice belongs to (only if SoloMode is enabled) |
106 |
|
bool PortamentoMode; ///< in Portamento Mode we slide the pitch from the last note to the current note. |
107 |
|
float PortamentoTime; ///< How long it will take to glide from the previous note to the current (in seconds) |
108 |
|
float PortamentoPos; ///< Current position on the keyboard, that is integer and fractional part (only used if PortamentoMode is on) |
109 |
double GlobalVolume; ///< overall volume (a value < 1.0 means attenuation, a value > 1.0 means amplification) |
double GlobalVolume; ///< overall volume (a value < 1.0 means attenuation, a value > 1.0 means amplification) |
110 |
float GlobalPanLeft; |
float GlobalPanLeft; |
111 |
float GlobalPanRight; |
float GlobalPanRight; |
112 |
int Pitch; ///< Current (absolute) MIDI pitch value. |
int Pitch; ///< Current (absolute) MIDI pitch value. |
113 |
int CurrentKeyDimension; ///< Current value (0-127) for the keyboard dimension, altered by pressing a keyswitching key. |
float CurrentKeyDimension; ///< Current value (0-1.0) for the keyboard dimension, altered by pressing a keyswitching key. |
114 |
String InstrumentFile; |
String InstrumentFile; |
115 |
int InstrumentIdx; |
int InstrumentIdx; |
116 |
String InstrumentIdxName; |
String InstrumentIdxName; |