/[svn]/linuxsampler/trunk/src/engines/gig/Voice.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/Voice.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3624 by schoenebeck, Tue Oct 1 09:49:08 2019 UTC revision 3625 by schoenebeck, Thu Oct 3 13:37:25 2019 UTC
# Line 33  Line 33 
33    
34  namespace LinuxSampler { namespace gig {  namespace LinuxSampler { namespace gig {
35    
36        // converts ::gig::lfo_wave_t (libgig) -> LFO::wave_t (LinuxSampler)
37        inline LFO::wave_t fromGigLfoWave(::gig::lfo_wave_t wave) {
38            // simply assuming equally mapped enums on both sides
39            return static_cast<LFO::wave_t>(wave);
40        }
41    
42      Voice::Voice() {      Voice::Voice() {
43          pEngine = NULL;          pEngine = NULL;
44          pEG1 = &EG1;          pEG1 = &EG1;
# Line 273  namespace LinuxSampler { namespace gig { Line 279  namespace LinuxSampler { namespace gig {
279                  bLFO1Enabled         = false;                  bLFO1Enabled         = false;
280          }          }
281          if (bLFO1Enabled) {          if (bLFO1Enabled) {
282              pLFO1->trigger(pRegion->LFO1Frequency,              pLFO1->trigger(fromGigLfoWave(pRegion->LFO1WaveForm),
283                               pRegion->LFO1Frequency,
284                               pRegion->LFO1Phase,
285                             LFO::start_level_mid, // see https://sourceforge.net/p/linuxsampler/mailman/linuxsampler-devel/thread/2189307.cNP0Xbctxq%40silver/#msg36774029                             LFO::start_level_mid, // see https://sourceforge.net/p/linuxsampler/mailman/linuxsampler-devel/thread/2189307.cNP0Xbctxq%40silver/#msg36774029
286                             lfo1_internal_depth,                             lfo1_internal_depth,
287                             pRegion->LFO1ControlDepth,                             pRegion->LFO1ControlDepth,
# Line 329  namespace LinuxSampler { namespace gig { Line 337  namespace LinuxSampler { namespace gig {
337                  bLFO2Enabled         = false;                  bLFO2Enabled         = false;
338          }          }
339          if (bLFO2Enabled) {          if (bLFO2Enabled) {
340              pLFO2->trigger(pRegion->LFO2Frequency,              pLFO2->trigger(fromGigLfoWave(pRegion->LFO2WaveForm),
341                               pRegion->LFO2Frequency,
342                               pRegion->LFO2Phase,
343                             LFO::start_level_mid, // see https://sourceforge.net/p/linuxsampler/mailman/linuxsampler-devel/thread/2189307.cNP0Xbctxq%40silver/#msg36774029                             LFO::start_level_mid, // see https://sourceforge.net/p/linuxsampler/mailman/linuxsampler-devel/thread/2189307.cNP0Xbctxq%40silver/#msg36774029
344                             lfo2_internal_depth,                             lfo2_internal_depth,
345                             pRegion->LFO2ControlDepth,                             pRegion->LFO2ControlDepth,
# Line 381  namespace LinuxSampler { namespace gig { Line 391  namespace LinuxSampler { namespace gig {
391                  bLFO3Enabled         = false;                  bLFO3Enabled         = false;
392          }          }
393          if (bLFO3Enabled) {          if (bLFO3Enabled) {
394              pLFO3->trigger(pRegion->LFO3Frequency,              pLFO3->trigger(fromGigLfoWave(pRegion->LFO3WaveForm),
395                               pRegion->LFO3Frequency,
396                               pRegion->LFO3Phase,
397                             LFO::start_level_max, // see https://sourceforge.net/p/linuxsampler/mailman/linuxsampler-devel/thread/2189307.cNP0Xbctxq%40silver/#msg36774029                             LFO::start_level_max, // see https://sourceforge.net/p/linuxsampler/mailman/linuxsampler-devel/thread/2189307.cNP0Xbctxq%40silver/#msg36774029
398                             lfo3_internal_depth,                             lfo3_internal_depth,
399                             pRegion->LFO3ControlDepth,                             pRegion->LFO3ControlDepth,
400                             false,                             pRegion->LFO3FlipPhase,
401                             pEngine->SampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE);                             pEngine->SampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE);
402              pLFO3->updateByMIDICtrlValue(pLFO3->ExtController ? GetGigEngineChannel()->ControllerTable[pLFO3->ExtController] : 0);              pLFO3->updateByMIDICtrlValue(pLFO3->ExtController ? GetGigEngineChannel()->ControllerTable[pLFO3->ExtController] : 0);
403              pLFO3->setScriptDepthFactor(              pLFO3->setScriptDepthFactor(

Legend:
Removed from v.3624  
changed lines
  Added in v.3625

  ViewVC Help
Powered by ViewVC