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-2009 Christian Schoenebeck * |
* Copyright (C) 2005-2008 Christian Schoenebeck * |
7 |
* Copyright (C) 2009 Grigor Iliev * |
* Copyright (C) 2009-2010 Christian Schoenebeck and Grigor Iliev * |
8 |
* * |
* * |
9 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
10 |
* 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 * |
299 |
// lower minimum release time |
// lower minimum release time |
300 |
const float minReleaseTime = (float) MaxSamplesPerCycle / (float) SampleRate; |
const float minReleaseTime = (float) MaxSamplesPerCycle / (float) SampleRate; |
301 |
for (VoiceIterator iterVoice = pVoicePool->allocAppend(); iterVoice == pVoicePool->last(); iterVoice = pVoicePool->allocAppend()) { |
for (VoiceIterator iterVoice = pVoicePool->allocAppend(); iterVoice == pVoicePool->last(); iterVoice = pVoicePool->allocAppend()) { |
302 |
iterVoice->EG1.CalculateFadeOutCoeff(minReleaseTime, SampleRate); |
iterVoice->pEG1->CalculateFadeOutCoeff(minReleaseTime, SampleRate); |
303 |
} |
} |
304 |
pVoicePool->clear(); |
pVoicePool->clear(); |
305 |
} |
} |
1334 |
pKey->itSelf = pChannel->pActiveKeys->allocAppend(); |
pKey->itSelf = pChannel->pActiveKeys->allocAppend(); |
1335 |
*pKey->itSelf = itNoteOnEvent->Param.Note.Key; |
*pKey->itSelf = itNoteOnEvent->Param.Note.Key; |
1336 |
} |
} |
|
if (itNewVoice->KeyGroup) { |
|
|
uint** ppKeyGroup = &pChannel->ActiveKeyGroups[itNewVoice->KeyGroup]; |
|
|
*ppKeyGroup = &*pKey->itSelf; // put key as the (new) active key to its key group |
|
|
} |
|
1337 |
if (itNewVoice->Type == Voice::type_release_trigger_required) pKey->ReleaseTrigger = true; // mark key for the need of release triggered voice(s) |
if (itNewVoice->Type == Voice::type_release_trigger_required) pKey->ReleaseTrigger = true; // mark key for the need of release triggered voice(s) |
1338 |
return 0; // success |
return 0; // success |
1339 |
} |
} |