43 |
|
|
44 |
#define PITCHBEND_SEMITONES 12 |
#define PITCHBEND_SEMITONES 12 |
45 |
#define MAX_AUDIO_VOICES 128 |
#define MAX_AUDIO_VOICES 128 |
46 |
|
#define SYSEX_BUFFER_SIZE 2048 // 2kB |
47 |
|
|
48 |
namespace LinuxSampler { namespace gig { |
namespace LinuxSampler { namespace gig { |
49 |
|
|
72 |
virtual void SendNoteOff(uint8_t Key, uint8_t Velocity); |
virtual void SendNoteOff(uint8_t Key, uint8_t Velocity); |
73 |
virtual void SendPitchbend(int Pitch); |
virtual void SendPitchbend(int Pitch); |
74 |
virtual void SendControlChange(uint8_t Controller, uint8_t Value); |
virtual void SendControlChange(uint8_t Controller, uint8_t Value); |
75 |
|
virtual void SendSysex(void* pData, uint Size); |
76 |
virtual float Volume(); |
virtual float Volume(); |
77 |
virtual void Volume(float f); |
virtual void Volume(float f); |
78 |
virtual uint Channels(); |
virtual uint Channels(); |
120 |
DiskThread* pDiskThread; |
DiskThread* pDiskThread; |
121 |
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. |
122 |
RingBuffer<Event>* pEventQueue; ///< Input event queue. |
RingBuffer<Event>* pEventQueue; ///< Input event queue. |
123 |
|
RingBuffer<uint8_t>* pSysexBuffer; ///< Input buffer for MIDI system exclusive messages. |
124 |
midi_key_info_t pMIDIKeyInfo[128]; ///< Contains all active voices sorted by MIDI key number and other informations to the respective MIDI key |
midi_key_info_t pMIDIKeyInfo[128]; ///< Contains all active voices sorted by MIDI key number and other informations to the respective MIDI key |
125 |
RTELMemoryPool<Voice>* pVoicePool; ///< Contains all voices that can be activated. |
RTELMemoryPool<Voice>* pVoicePool; ///< Contains all voices that can be activated. |
126 |
RTELMemoryPool<uint>* pActiveKeys; ///< Holds all keys in it's allocation list with active voices. |
RTELMemoryPool<uint>* pActiveKeys; ///< Holds all keys in it's allocation list with active voices. |
146 |
String InstrumentFile; |
String InstrumentFile; |
147 |
int InstrumentIdx; |
int InstrumentIdx; |
148 |
int InstrumentStat; |
int InstrumentStat; |
149 |
|
int8_t ScaleTuning[12]; ///< contains optional detune factors (-64..+63 cents) for all 12 semitones of an octave |
150 |
|
|
151 |
void ProcessNoteOn(Event* pNoteOnEvent); |
void ProcessNoteOn(Event* pNoteOnEvent); |
152 |
void ProcessNoteOff(Event* pNoteOffEvent); |
void ProcessNoteOff(Event* pNoteOffEvent); |
153 |
void ProcessPitchbend(Event* pPitchbendEvent); |
void ProcessPitchbend(Event* pPitchbendEvent); |
154 |
void ProcessControlChange(Event* pControlChangeEvent); |
void ProcessControlChange(Event* pControlChangeEvent); |
155 |
|
void ProcessSysex(Event* pSysexEvent); |
156 |
void LaunchVoice(Event* pNoteOnEvent, int iLayer = 0, bool ReleaseTriggerVoice = false); |
void LaunchVoice(Event* pNoteOnEvent, int iLayer = 0, bool ReleaseTriggerVoice = false); |
157 |
void KillVoiceImmediately(Voice* pVoice); |
void KillVoiceImmediately(Voice* pVoice); |
158 |
void ResetSynthesisParameters(Event::destination_t dst, float val); |
void ResetSynthesisParameters(Event::destination_t dst, float val); |
166 |
friend class VCOManipulator; |
friend class VCOManipulator; |
167 |
friend class InstrumentResourceManager; |
friend class InstrumentResourceManager; |
168 |
private: |
private: |
169 |
void DisableAndLock(); |
void DisableAndLock(); |
170 |
|
uint8_t GSCheckSum(const RingBuffer<uint8_t>::NonVolatileReader AddrReader, uint DataSize); |
171 |
|
void AdjustScale(int8_t ScaleTunes[12]); |
172 |
}; |
}; |
173 |
|
|
174 |
}} // namespace LinuxSampler::gig |
}} // namespace LinuxSampler::gig |