324 |
case ::gig::lfo1_ctrl_internal: |
case ::gig::lfo1_ctrl_internal: |
325 |
lfo1_internal_depth = pDimRgn->LFO1InternalDepth; |
lfo1_internal_depth = pDimRgn->LFO1InternalDepth; |
326 |
pLFO1->ExtController = 0; // no external controller |
pLFO1->ExtController = 0; // no external controller |
327 |
|
bLFO1Enabled = (lfo1_internal_depth > 0); |
328 |
break; |
break; |
329 |
case ::gig::lfo1_ctrl_modwheel: |
case ::gig::lfo1_ctrl_modwheel: |
330 |
lfo1_internal_depth = 0; |
lfo1_internal_depth = 0; |
331 |
pLFO1->ExtController = 1; // MIDI controller 1 |
pLFO1->ExtController = 1; // MIDI controller 1 |
332 |
|
bLFO1Enabled = (pDimRgn->LFO1ControlDepth > 0); |
333 |
break; |
break; |
334 |
case ::gig::lfo1_ctrl_breath: |
case ::gig::lfo1_ctrl_breath: |
335 |
lfo1_internal_depth = 0; |
lfo1_internal_depth = 0; |
336 |
pLFO1->ExtController = 2; // MIDI controller 2 |
pLFO1->ExtController = 2; // MIDI controller 2 |
337 |
|
bLFO1Enabled = (pDimRgn->LFO1ControlDepth > 0); |
338 |
break; |
break; |
339 |
case ::gig::lfo1_ctrl_internal_modwheel: |
case ::gig::lfo1_ctrl_internal_modwheel: |
340 |
lfo1_internal_depth = pDimRgn->LFO1InternalDepth; |
lfo1_internal_depth = pDimRgn->LFO1InternalDepth; |
341 |
pLFO1->ExtController = 1; // MIDI controller 1 |
pLFO1->ExtController = 1; // MIDI controller 1 |
342 |
|
bLFO1Enabled = (lfo1_internal_depth > 0 || pDimRgn->LFO1ControlDepth > 0); |
343 |
break; |
break; |
344 |
case ::gig::lfo1_ctrl_internal_breath: |
case ::gig::lfo1_ctrl_internal_breath: |
345 |
lfo1_internal_depth = pDimRgn->LFO1InternalDepth; |
lfo1_internal_depth = pDimRgn->LFO1InternalDepth; |
346 |
pLFO1->ExtController = 2; // MIDI controller 2 |
pLFO1->ExtController = 2; // MIDI controller 2 |
347 |
|
bLFO1Enabled = (lfo1_internal_depth > 0 || pDimRgn->LFO1ControlDepth > 0); |
348 |
break; |
break; |
349 |
default: |
default: |
350 |
lfo1_internal_depth = 0; |
lfo1_internal_depth = 0; |
351 |
pLFO1->ExtController = 0; // no external controller |
pLFO1->ExtController = 0; // no external controller |
352 |
|
bLFO1Enabled = false; |
353 |
} |
} |
354 |
pLFO1->Trigger(pDimRgn->LFO1Frequency, |
if (bLFO1Enabled) pLFO1->Trigger(pDimRgn->LFO1Frequency, |
355 |
lfo1_internal_depth, |
lfo1_internal_depth, |
356 |
pDimRgn->LFO1ControlDepth, |
pDimRgn->LFO1ControlDepth, |
357 |
pEngineChannel->ControllerTable[pLFO1->ExtController], |
pEngineChannel->ControllerTable[pLFO1->ExtController], |
358 |
pDimRgn->LFO1FlipPhase, |
pDimRgn->LFO1FlipPhase, |
359 |
pEngine->SampleRate, |
pEngine->SampleRate, |
360 |
Delay); |
Delay); |
361 |
} |
} |
362 |
|
|
363 |
|
|
368 |
case ::gig::lfo2_ctrl_internal: |
case ::gig::lfo2_ctrl_internal: |
369 |
lfo2_internal_depth = pDimRgn->LFO2InternalDepth; |
lfo2_internal_depth = pDimRgn->LFO2InternalDepth; |
370 |
pLFO2->ExtController = 0; // no external controller |
pLFO2->ExtController = 0; // no external controller |
371 |
|
bLFO2Enabled = (lfo2_internal_depth > 0); |
372 |
break; |
break; |
373 |
case ::gig::lfo2_ctrl_modwheel: |
case ::gig::lfo2_ctrl_modwheel: |
374 |
lfo2_internal_depth = 0; |
lfo2_internal_depth = 0; |
375 |
pLFO2->ExtController = 1; // MIDI controller 1 |
pLFO2->ExtController = 1; // MIDI controller 1 |
376 |
|
bLFO2Enabled = (pDimRgn->LFO2ControlDepth > 0); |
377 |
break; |
break; |
378 |
case ::gig::lfo2_ctrl_foot: |
case ::gig::lfo2_ctrl_foot: |
379 |
lfo2_internal_depth = 0; |
lfo2_internal_depth = 0; |
380 |
pLFO2->ExtController = 4; // MIDI controller 4 |
pLFO2->ExtController = 4; // MIDI controller 4 |
381 |
|
bLFO2Enabled = (pDimRgn->LFO2ControlDepth > 0); |
382 |
break; |
break; |
383 |
case ::gig::lfo2_ctrl_internal_modwheel: |
case ::gig::lfo2_ctrl_internal_modwheel: |
384 |
lfo2_internal_depth = pDimRgn->LFO2InternalDepth; |
lfo2_internal_depth = pDimRgn->LFO2InternalDepth; |
385 |
pLFO2->ExtController = 1; // MIDI controller 1 |
pLFO2->ExtController = 1; // MIDI controller 1 |
386 |
|
bLFO2Enabled = (lfo2_internal_depth > 0 || pDimRgn->LFO2ControlDepth > 0); |
387 |
break; |
break; |
388 |
case ::gig::lfo2_ctrl_internal_foot: |
case ::gig::lfo2_ctrl_internal_foot: |
389 |
lfo2_internal_depth = pDimRgn->LFO2InternalDepth; |
lfo2_internal_depth = pDimRgn->LFO2InternalDepth; |
390 |
pLFO2->ExtController = 4; // MIDI controller 4 |
pLFO2->ExtController = 4; // MIDI controller 4 |
391 |
|
bLFO2Enabled = (lfo2_internal_depth > 0 || pDimRgn->LFO2ControlDepth > 0); |
392 |
break; |
break; |
393 |
default: |
default: |
394 |
lfo2_internal_depth = 0; |
lfo2_internal_depth = 0; |
395 |
pLFO2->ExtController = 0; // no external controller |
pLFO2->ExtController = 0; // no external controller |
396 |
|
bLFO2Enabled = false; |
397 |
} |
} |
398 |
pLFO2->Trigger(pDimRgn->LFO2Frequency, |
if (bLFO2Enabled) pLFO2->Trigger(pDimRgn->LFO2Frequency, |
399 |
lfo2_internal_depth, |
lfo2_internal_depth, |
400 |
pDimRgn->LFO2ControlDepth, |
pDimRgn->LFO2ControlDepth, |
401 |
pEngineChannel->ControllerTable[pLFO2->ExtController], |
pEngineChannel->ControllerTable[pLFO2->ExtController], |
402 |
pDimRgn->LFO2FlipPhase, |
pDimRgn->LFO2FlipPhase, |
403 |
pEngine->SampleRate, |
pEngine->SampleRate, |
404 |
Delay); |
Delay); |
405 |
} |
} |
406 |
|
|
407 |
|
|
412 |
case ::gig::lfo3_ctrl_internal: |
case ::gig::lfo3_ctrl_internal: |
413 |
lfo3_internal_depth = pDimRgn->LFO3InternalDepth; |
lfo3_internal_depth = pDimRgn->LFO3InternalDepth; |
414 |
pLFO3->ExtController = 0; // no external controller |
pLFO3->ExtController = 0; // no external controller |
415 |
|
bLFO3Enabled = (lfo3_internal_depth > 0); |
416 |
break; |
break; |
417 |
case ::gig::lfo3_ctrl_modwheel: |
case ::gig::lfo3_ctrl_modwheel: |
418 |
lfo3_internal_depth = 0; |
lfo3_internal_depth = 0; |
419 |
pLFO3->ExtController = 1; // MIDI controller 1 |
pLFO3->ExtController = 1; // MIDI controller 1 |
420 |
|
bLFO3Enabled = (pDimRgn->LFO3ControlDepth > 0); |
421 |
break; |
break; |
422 |
case ::gig::lfo3_ctrl_aftertouch: |
case ::gig::lfo3_ctrl_aftertouch: |
423 |
lfo3_internal_depth = 0; |
lfo3_internal_depth = 0; |
424 |
pLFO3->ExtController = 0; // TODO: aftertouch not implemented yet |
pLFO3->ExtController = 0; // TODO: aftertouch not implemented yet |
425 |
|
bLFO3Enabled = false; // see TODO comment in line above |
426 |
break; |
break; |
427 |
case ::gig::lfo3_ctrl_internal_modwheel: |
case ::gig::lfo3_ctrl_internal_modwheel: |
428 |
lfo3_internal_depth = pDimRgn->LFO3InternalDepth; |
lfo3_internal_depth = pDimRgn->LFO3InternalDepth; |
429 |
pLFO3->ExtController = 1; // MIDI controller 1 |
pLFO3->ExtController = 1; // MIDI controller 1 |
430 |
|
bLFO3Enabled = (lfo3_internal_depth > 0 || pDimRgn->LFO3ControlDepth > 0); |
431 |
break; |
break; |
432 |
case ::gig::lfo3_ctrl_internal_aftertouch: |
case ::gig::lfo3_ctrl_internal_aftertouch: |
433 |
lfo3_internal_depth = pDimRgn->LFO3InternalDepth; |
lfo3_internal_depth = pDimRgn->LFO3InternalDepth; |
434 |
pLFO1->ExtController = 0; // TODO: aftertouch not implemented yet |
pLFO1->ExtController = 0; // TODO: aftertouch not implemented yet |
435 |
|
bLFO3Enabled = (lfo3_internal_depth > 0 /*|| pDimRgn->LFO3ControlDepth > 0*/); // see TODO comment in line above |
436 |
break; |
break; |
437 |
default: |
default: |
438 |
lfo3_internal_depth = 0; |
lfo3_internal_depth = 0; |
439 |
pLFO3->ExtController = 0; // no external controller |
pLFO3->ExtController = 0; // no external controller |
440 |
|
bLFO3Enabled = false; |
441 |
} |
} |
442 |
pLFO3->Trigger(pDimRgn->LFO3Frequency, |
if (bLFO3Enabled) pLFO3->Trigger(pDimRgn->LFO3Frequency, |
443 |
lfo3_internal_depth, |
lfo3_internal_depth, |
444 |
pDimRgn->LFO3ControlDepth, |
pDimRgn->LFO3ControlDepth, |
445 |
pEngineChannel->ControllerTable[pLFO3->ExtController], |
pEngineChannel->ControllerTable[pLFO3->ExtController], |
446 |
false, |
false, |
447 |
pEngine->SampleRate, |
pEngine->SampleRate, |
448 |
Delay); |
Delay); |
449 |
} |
} |
450 |
|
|
451 |
|
|
588 |
SYNTHESIS_MODE_SET_INTERPOLATE(SynthesisMode, true); |
SYNTHESIS_MODE_SET_INTERPOLATE(SynthesisMode, true); |
589 |
SYNTHESIS_MODE_SET_CONSTPITCH(SynthesisMode, false); |
SYNTHESIS_MODE_SET_CONSTPITCH(SynthesisMode, false); |
590 |
} |
} |
591 |
pLFO1->Process(Samples); |
if (bLFO1Enabled) pLFO1->Process(Samples); |
592 |
pLFO2->Process(Samples); |
if (bLFO2Enabled) pLFO2->Process(Samples); |
593 |
if (pLFO3->Process(Samples)) { // if pitch LFO modulation is active |
if (bLFO3Enabled) { |
594 |
SYNTHESIS_MODE_SET_INTERPOLATE(SynthesisMode, true); |
if (pLFO3->Process(Samples)) { // if pitch LFO modulation is active |
595 |
SYNTHESIS_MODE_SET_CONSTPITCH(SynthesisMode, false); |
SYNTHESIS_MODE_SET_INTERPOLATE(SynthesisMode, true); |
596 |
|
SYNTHESIS_MODE_SET_CONSTPITCH(SynthesisMode, false); |
597 |
|
} |
598 |
} |
} |
599 |
|
|
600 |
if (SYNTHESIS_MODE_GET_FILTER(SynthesisMode)) |
if (SYNTHESIS_MODE_GET_FILTER(SynthesisMode)) |