--- linuxsampler/trunk/src/engines/gig/Voice.cpp 2019/10/02 17:11:30 3624 +++ linuxsampler/trunk/src/engines/gig/Voice.cpp 2019/10/03 13:37:25 3625 @@ -33,6 +33,12 @@ namespace LinuxSampler { namespace gig { + // converts ::gig::lfo_wave_t (libgig) -> LFO::wave_t (LinuxSampler) + inline LFO::wave_t fromGigLfoWave(::gig::lfo_wave_t wave) { + // simply assuming equally mapped enums on both sides + return static_cast(wave); + } + Voice::Voice() { pEngine = NULL; pEG1 = &EG1; @@ -273,7 +279,9 @@ bLFO1Enabled = false; } if (bLFO1Enabled) { - pLFO1->trigger(pRegion->LFO1Frequency, + pLFO1->trigger(fromGigLfoWave(pRegion->LFO1WaveForm), + pRegion->LFO1Frequency, + pRegion->LFO1Phase, LFO::start_level_mid, // see https://sourceforge.net/p/linuxsampler/mailman/linuxsampler-devel/thread/2189307.cNP0Xbctxq%40silver/#msg36774029 lfo1_internal_depth, pRegion->LFO1ControlDepth, @@ -329,7 +337,9 @@ bLFO2Enabled = false; } if (bLFO2Enabled) { - pLFO2->trigger(pRegion->LFO2Frequency, + pLFO2->trigger(fromGigLfoWave(pRegion->LFO2WaveForm), + pRegion->LFO2Frequency, + pRegion->LFO2Phase, LFO::start_level_mid, // see https://sourceforge.net/p/linuxsampler/mailman/linuxsampler-devel/thread/2189307.cNP0Xbctxq%40silver/#msg36774029 lfo2_internal_depth, pRegion->LFO2ControlDepth, @@ -381,11 +391,13 @@ bLFO3Enabled = false; } if (bLFO3Enabled) { - pLFO3->trigger(pRegion->LFO3Frequency, + pLFO3->trigger(fromGigLfoWave(pRegion->LFO3WaveForm), + pRegion->LFO3Frequency, + pRegion->LFO3Phase, LFO::start_level_max, // see https://sourceforge.net/p/linuxsampler/mailman/linuxsampler-devel/thread/2189307.cNP0Xbctxq%40silver/#msg36774029 lfo3_internal_depth, pRegion->LFO3ControlDepth, - false, + pRegion->LFO3FlipPhase, pEngine->SampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE); pLFO3->updateByMIDICtrlValue(pLFO3->ExtController ? GetGigEngineChannel()->ControllerTable[pLFO3->ExtController] : 0); pLFO3->setScriptDepthFactor(