492 |
* this audio fragment cycle |
* this audio fragment cycle |
493 |
*/ |
*/ |
494 |
void Engine::RenderActiveVoices(EngineChannel* pEngineChannel, uint Samples) { |
void Engine::RenderActiveVoices(EngineChannel* pEngineChannel, uint Samples) { |
495 |
|
#if !CONFIG_PROCESS_MUTED_CHANNELS |
496 |
if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted |
if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted |
497 |
|
#endif |
498 |
|
|
499 |
RTList<uint>::Iterator iuiKey = pEngineChannel->pActiveKeys->first(); |
RTList<uint>::Iterator iuiKey = pEngineChannel->pActiveKeys->first(); |
500 |
RTList<uint>::Iterator end = pEngineChannel->pActiveKeys->end(); |
RTList<uint>::Iterator end = pEngineChannel->pActiveKeys->end(); |
624 |
* @param itNoteOnEvent - key, velocity and time stamp of the event |
* @param itNoteOnEvent - key, velocity and time stamp of the event |
625 |
*/ |
*/ |
626 |
void Engine::ProcessNoteOn(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOnEvent) { |
void Engine::ProcessNoteOn(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOnEvent) { |
627 |
if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted |
#if !CONFIG_PROCESS_MUTED_CHANNELS |
628 |
|
if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted |
629 |
|
#endif |
630 |
|
|
631 |
const int key = itNoteOnEvent->Param.Note.Key; |
const int key = itNoteOnEvent->Param.Note.Key; |
632 |
|
|
686 |
* @param itNoteOffEvent - key, velocity and time stamp of the event |
* @param itNoteOffEvent - key, velocity and time stamp of the event |
687 |
*/ |
*/ |
688 |
void Engine::ProcessNoteOff(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOffEvent) { |
void Engine::ProcessNoteOff(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOffEvent) { |
689 |
|
#if !CONFIG_PROCESS_MUTED_CHANNELS |
690 |
if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted |
if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted |
691 |
|
#endif |
692 |
|
|
693 |
midi_key_info_t* pKey = &pEngineChannel->pMIDIKeyInfo[itNoteOffEvent->Param.Note.Key]; |
midi_key_info_t* pKey = &pEngineChannel->pMIDIKeyInfo[itNoteOffEvent->Param.Note.Key]; |
694 |
pKey->KeyPressed = false; // the MIDI key was now released |
pKey->KeyPressed = false; // the MIDI key was now released |
1191 |
dmsg(4,("PEDAL DOWN\n")); |
dmsg(4,("PEDAL DOWN\n")); |
1192 |
pEngineChannel->SustainPedal = true; |
pEngineChannel->SustainPedal = true; |
1193 |
|
|
1194 |
|
#if !CONFIG_PROCESS_MUTED_CHANNELS |
1195 |
if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted |
if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted |
1196 |
|
#endif |
1197 |
|
|
1198 |
// cancel release process of voices if necessary |
// cancel release process of voices if necessary |
1199 |
RTList<uint>::Iterator iuiKey = pEngineChannel->pActiveKeys->first(); |
RTList<uint>::Iterator iuiKey = pEngineChannel->pActiveKeys->first(); |
1213 |
dmsg(4,("PEDAL UP\n")); |
dmsg(4,("PEDAL UP\n")); |
1214 |
pEngineChannel->SustainPedal = false; |
pEngineChannel->SustainPedal = false; |
1215 |
|
|
1216 |
|
#if !CONFIG_PROCESS_MUTED_CHANNELS |
1217 |
if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted |
if (pEngineChannel->GetMute()) return; // skip if sampler channel is muted |
1218 |
|
#endif |
1219 |
|
|
1220 |
// release voices if their respective key is not pressed |
// release voices if their respective key is not pressed |
1221 |
RTList<uint>::Iterator iuiKey = pEngineChannel->pActiveKeys->first(); |
RTList<uint>::Iterator iuiKey = pEngineChannel->pActiveKeys->first(); |
1441 |
} |
} |
1442 |
|
|
1443 |
String Engine::Version() { |
String Engine::Version() { |
1444 |
String s = "$Revision: 1.50 $"; |
String s = "$Revision: 1.51 $"; |
1445 |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword |
1446 |
} |
} |
1447 |
|
|