--- gigedit/trunk/src/gigedit/dimregionedit.h 2019/10/02 16:30:29 3623 +++ gigedit/trunk/src/gigedit/dimregionedit.h 2019/10/02 17:11:30 3624 @@ -99,7 +99,9 @@ bool on_draw(const Cairo::RefPtr& cr); #endif + virtual LinuxSampler::LFO::wave_t waveType() const = 0; virtual float frequency() const = 0; + virtual float phase() const = 0; virtual uint internalDepth() const = 0; virtual uint controllerDepth() const = 0; virtual bool flipPolarity() const = 0; @@ -113,7 +115,12 @@ class LFO1Graph : public LFOGraph { public: + LinuxSampler::LFO::wave_t waveType() const OVERRIDE { + // simply assuming here libgig's and LS's enums are equally value mapped + return (LinuxSampler::LFO::wave_t) dimreg->LFO1WaveForm; + } float frequency() const OVERRIDE { return dimreg->LFO1Frequency; } + float phase() const OVERRIDE { return dimreg->LFO1Phase; } uint internalDepth() const OVERRIDE { const gig::lfo1_ctrl_t ctrl = dimreg->LFO1Controller; const bool hasInternalDepth = ( @@ -130,7 +137,12 @@ class LFO2Graph : public LFOGraph { public: + LinuxSampler::LFO::wave_t waveType() const OVERRIDE { + // simply assuming here libgig's and LS's enums are equally value mapped + return (LinuxSampler::LFO::wave_t) dimreg->LFO2WaveForm; + } float frequency() const OVERRIDE { return dimreg->LFO2Frequency; } + float phase() const OVERRIDE { return dimreg->LFO2Phase; } uint internalDepth() const OVERRIDE { const gig::lfo2_ctrl_t ctrl = dimreg->LFO2Controller; const bool hasInternalDepth = ( @@ -147,7 +159,12 @@ class LFO3Graph : public LFOGraph { public: + LinuxSampler::LFO::wave_t waveType() const OVERRIDE { + // simply assuming here libgig's and LS's enums are equally value mapped + return (LinuxSampler::LFO::wave_t) dimreg->LFO3WaveForm; + } float frequency() const OVERRIDE { return dimreg->LFO3Frequency; } + float phase() const OVERRIDE { return dimreg->LFO3Phase; } uint internalDepth() const OVERRIDE { const gig::lfo3_ctrl_t ctrl = dimreg->LFO3Controller; const bool hasInternalDepth = ( @@ -156,7 +173,7 @@ return (hasInternalDepth) ? dimreg->LFO3InternalDepth : 0; } uint controllerDepth() const OVERRIDE { return dimreg->LFO3ControlDepth; } - bool flipPolarity() const OVERRIDE { return false; } + bool flipPolarity() const OVERRIDE { return dimreg->LFO3FlipPhase; } bool signedRange() const OVERRIDE { return true; } virtual LinuxSampler::LFO::start_level_t startLevel() const OVERRIDE { return LinuxSampler::LFO::start_level_max; } // see https://sourceforge.net/p/linuxsampler/mailman/linuxsampler-devel/thread/2189307.cNP0Xbctxq%40silver/#msg36774029 bool hasControllerAssigned() const OVERRIDE { return dimreg->LFO3Controller; } @@ -248,7 +265,9 @@ NumEntryTemp eEG1ControllerDecayInfluence; NumEntryTemp eEG1ControllerReleaseInfluence; EGStateOptions eEG1StateOptions; + ChoiceEntryLfoWave eLFO1Wave; NumEntryTemp eLFO1Frequency; + NumEntryTemp eLFO1Phase; NumEntryTemp eLFO1InternalDepth; NumEntryTemp eLFO1ControlDepth; ChoiceEntry eLFO1Controller; @@ -267,7 +286,9 @@ NumEntryTemp eEG2ControllerDecayInfluence; NumEntryTemp eEG2ControllerReleaseInfluence; EGStateOptions eEG2StateOptions; + ChoiceEntryLfoWave eLFO2Wave; NumEntryTemp eLFO2Frequency; + NumEntryTemp eLFO2Phase; NumEntryTemp eLFO2InternalDepth; NumEntryTemp eLFO2ControlDepth; ChoiceEntry eLFO2Controller; @@ -275,10 +296,13 @@ BoolEntry eLFO2Sync; NumEntryTemp eEG3Attack; NumEntryTemp eEG3Depth; + ChoiceEntryLfoWave eLFO3Wave; NumEntryTemp eLFO3Frequency; + NumEntryTemp eLFO3Phase; NumEntryTemp eLFO3InternalDepth; NumEntryTemp eLFO3ControlDepth; ChoiceEntry eLFO3Controller; + BoolEntry eLFO3FlipPhase; BoolEntry eLFO3Sync; BoolEntry eVCFEnabled; ChoiceEntry eVCFType;