109 |
voice_steal_algo_oldestvoiceonkey, ///< Try to kill the oldest voice from same key where the new voice should be spawned. |
voice_steal_algo_oldestvoiceonkey, ///< Try to kill the oldest voice from same key where the new voice should be spawned. |
110 |
voice_steal_algo_oldestkey ///< Try to kill the oldest voice from the oldest active key. |
voice_steal_algo_oldestkey ///< Try to kill the oldest voice from the oldest active key. |
111 |
}; |
}; |
112 |
|
|
113 |
|
|
114 |
/** @brief MIDI key runtime informations |
/** @brief MIDI key runtime informations |
115 |
* |
* |
124 |
Pool<uint>::Iterator itSelf; ///< hack to allow fast deallocation of the key from the list of active keys |
Pool<uint>::Iterator itSelf; ///< hack to allow fast deallocation of the key from the list of active keys |
125 |
RTList<Event>* pEvents; ///< Key specific events (only Note-on, Note-off and sustain pedal currently) |
RTList<Event>* pEvents; ///< Key specific events (only Note-on, Note-off and sustain pedal currently) |
126 |
int VoiceTheftsQueued; ///< Amount of voices postponed due to shortage of voices. |
int VoiceTheftsQueued; ///< Amount of voices postponed due to shortage of voices. |
127 |
uint8_t RoundRobinIndex; ///< For the round robin dimension: current articulation for this key, will be incremented for each note on |
uint32_t* pRoundRobinIndex; ///< For the round robin dimension: current articulation for this key, will be incremented for each note on |
128 |
uint8_t Velocity; ///< Latest Note-on velocity for this key |
uint8_t Velocity; ///< Latest Note-on velocity for this key |
129 |
unsigned long NoteOnTime; ///< Time for latest Note-on event for this key |
unsigned long NoteOnTime; ///< Time for latest Note-on event for this key |
130 |
|
|
135 |
ReleaseTrigger = false; |
ReleaseTrigger = false; |
136 |
pEvents = NULL; |
pEvents = NULL; |
137 |
VoiceTheftsQueued = 0; |
VoiceTheftsQueued = 0; |
|
RoundRobinIndex = 0; |
|
138 |
} |
} |
139 |
|
|
140 |
void Reset() { |
void Reset() { |
182 |
bool SostenutoPedal; ///< true if sostenuto pedal is down |
bool SostenutoPedal; ///< true if sostenuto pedal is down |
183 |
int SostenutoKeys[128]; |
int SostenutoKeys[128]; |
184 |
int SostenutoKeyCount; |
int SostenutoKeyCount; |
185 |
|
uint32_t RoundRobinIndexes[128]; |
186 |
|
|
187 |
MidiKeyboardManager() { |
MidiKeyboardManager() { |
188 |
pMIDIKeyInfo = new MidiKey[128]; |
pMIDIKeyInfo = new MidiKey[128]; |
190 |
SoloMode = false; |
SoloMode = false; |
191 |
SustainPedal = false; |
SustainPedal = false; |
192 |
SostenutoPedal = false; |
SostenutoPedal = false; |
193 |
|
for (int i = 0 ; i < 128 ; i++) { |
194 |
|
RoundRobinIndexes[i] = 0; |
195 |
|
|
196 |
|
// by default use one counter for each key (the |
197 |
|
// gig engine will change this to one counter per |
198 |
|
// region) |
199 |
|
pMIDIKeyInfo[i].pRoundRobinIndex = &RoundRobinIndexes[i]; |
200 |
|
} |
201 |
} |
} |
202 |
|
|
203 |
virtual ~MidiKeyboardManager() { |
virtual ~MidiKeyboardManager() { |