274 |
} |
} |
275 |
if (bLFO1Enabled) { |
if (bLFO1Enabled) { |
276 |
pLFO1->trigger(pRegion->LFO1Frequency, |
pLFO1->trigger(pRegion->LFO1Frequency, |
277 |
start_level_min, |
LFO::start_level_min, |
278 |
lfo1_internal_depth, |
lfo1_internal_depth, |
279 |
pRegion->LFO1ControlDepth, |
pRegion->LFO1ControlDepth, |
280 |
pRegion->LFO1FlipPhase, |
pRegion->LFO1FlipPhase, |
330 |
} |
} |
331 |
if (bLFO2Enabled) { |
if (bLFO2Enabled) { |
332 |
pLFO2->trigger(pRegion->LFO2Frequency, |
pLFO2->trigger(pRegion->LFO2Frequency, |
333 |
start_level_max, |
LFO::start_level_max, |
334 |
lfo2_internal_depth, |
lfo2_internal_depth, |
335 |
pRegion->LFO2ControlDepth, |
pRegion->LFO2ControlDepth, |
336 |
pRegion->LFO2FlipPhase, |
pRegion->LFO2FlipPhase, |
382 |
} |
} |
383 |
if (bLFO3Enabled) { |
if (bLFO3Enabled) { |
384 |
pLFO3->trigger(pRegion->LFO3Frequency, |
pLFO3->trigger(pRegion->LFO3Frequency, |
385 |
start_level_mid, |
LFO::start_level_mid, |
386 |
lfo3_internal_depth, |
lfo3_internal_depth, |
387 |
pRegion->LFO3ControlDepth, |
pRegion->LFO3ControlDepth, |
388 |
false, |
false, |
498 |
pRegion->EG1Options.ReleaseCancel |
pRegion->EG1Options.ReleaseCancel |
499 |
); |
); |
500 |
EG1.trigger(pRegion->EG1PreAttack, |
EG1.trigger(pRegion->EG1PreAttack, |
501 |
RTMath::Max(pRegion->EG1Attack, 0.0316) * egInfo.Attack, |
(pNote && pNote->Override.Attack.isFinal()) ? |
502 |
|
pNote->Override.Attack.Value : |
503 |
|
RTMath::Max(pRegion->EG1Attack, 0.0316) * egInfo.Attack, |
504 |
pRegion->EG1Hold, |
pRegion->EG1Hold, |
505 |
pRegion->EG1Decay1 * egInfo.Decay * velrelease, |
(pNote && pNote->Override.Decay.isFinal()) ? |
506 |
pRegion->EG1Decay2 * egInfo.Decay * velrelease, |
pNote->Override.Decay.Value : |
507 |
|
pRegion->EG1Decay1 * egInfo.Decay * velrelease, |
508 |
|
(pNote && pNote->Override.Decay.isFinal()) ? |
509 |
|
pNote->Override.Decay.Value : |
510 |
|
pRegion->EG1Decay2 * egInfo.Decay * velrelease, |
511 |
pRegion->EG1InfiniteSustain, |
pRegion->EG1InfiniteSustain, |
512 |
(pNote && pNote->Override.Sustain.Final) ? |
(pNote && pNote->Override.Sustain.Final) ? |
513 |
pNote->Override.Sustain.Value : |
uint(pNote->Override.Sustain.Value * 1000.f) : |
514 |
pRegion->EG1Sustain * (pNote ? pNote->Override.Sustain.Value : 1.f), |
pRegion->EG1Sustain * (pNote ? pNote->Override.Sustain.Value : 1.f), |
515 |
RTMath::Max(pRegion->EG1Release * velrelease, 0.014) * egInfo.Release, |
(pNote && pNote->Override.Release.isFinal()) ? |
516 |
|
pNote->Override.Release.Value : |
517 |
|
RTMath::Max(pRegion->EG1Release * velrelease, 0.014) * egInfo.Release, |
518 |
velocityAttenuation, |
velocityAttenuation, |
519 |
sampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE); |
sampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE); |
520 |
} |
} |
528 |
pRegion->EG2Options.ReleaseCancel |
pRegion->EG2Options.ReleaseCancel |
529 |
); |
); |
530 |
EG2.trigger(uint(RgnInfo.EG2PreAttack), |
EG2.trigger(uint(RgnInfo.EG2PreAttack), |
531 |
RgnInfo.EG2Attack * egInfo.Attack, |
(pNote && pNote->Override.CutoffAttack.isFinal()) ? |
532 |
|
pNote->Override.CutoffAttack.Value : |
533 |
|
RgnInfo.EG2Attack * egInfo.Attack, |
534 |
false, |
false, |
535 |
RgnInfo.EG2Decay1 * egInfo.Decay * velrelease, |
(pNote && pNote->Override.CutoffDecay.isFinal()) ? |
536 |
RgnInfo.EG2Decay2 * egInfo.Decay * velrelease, |
pNote->Override.CutoffDecay.Value : |
537 |
|
RgnInfo.EG2Decay1 * egInfo.Decay * velrelease, |
538 |
|
(pNote && pNote->Override.CutoffDecay.isFinal()) ? |
539 |
|
pNote->Override.CutoffDecay.Value : |
540 |
|
RgnInfo.EG2Decay2 * egInfo.Decay * velrelease, |
541 |
RgnInfo.EG2InfiniteSustain, |
RgnInfo.EG2InfiniteSustain, |
542 |
uint(RgnInfo.EG2Sustain), |
(pNote && pNote->Override.CutoffSustain.Final) ? |
543 |
RgnInfo.EG2Release * egInfo.Release * velrelease, |
uint(pNote->Override.CutoffSustain.Value * 1000.f) : |
544 |
|
uint(RgnInfo.EG2Sustain), |
545 |
|
(pNote && pNote->Override.CutoffRelease.isFinal()) ? |
546 |
|
pNote->Override.CutoffRelease.Value : |
547 |
|
RgnInfo.EG2Release * egInfo.Release * velrelease, |
548 |
velocityAttenuation, |
velocityAttenuation, |
549 |
sampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE); |
sampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE); |
550 |
} |
} |