Skip to content

Commit

Permalink
Handle lower LFO frequency
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-13 committed Mar 19, 2024
1 parent 4160689 commit b6fda47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Source/PluginEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ SongbirdAudioProcessorEditor::SongbirdAudioProcessorEditor (SongbirdAudioProcess
TempoNumerMOD1Sld.reset (new juce::Slider ("MOD 1 Tempo Numer Slider"));
addAndMakeVisible (TempoNumerMOD1Sld.get());
TempoNumerMOD1Sld->setTooltip (TRANS ("Nominator for the LFO\'s tempo sync"));
TempoNumerMOD1Sld->setRange (1, 4, 1);
TempoNumerMOD1Sld->setRange (1, 32, 1);
TempoNumerMOD1Sld->setSliderStyle (juce::Slider::IncDecButtons);
TempoNumerMOD1Sld->setTextBoxStyle (juce::Slider::TextBoxLeft, false, 40, 20);
TempoNumerMOD1Sld->setColour (juce::Slider::textBoxTextColourId, juce::Colour (0xffffdf5e));
Expand Down Expand Up @@ -967,7 +967,7 @@ BEGIN_JUCER_METADATA
<SLIDER name="MOD 1 Tempo Numer Slider" id="6c49dac77f3e6f4b" memberName="TempoNumerMOD1Sld"
virtualName="" explicitFocusOrder="0" pos="78 282 56 16" tooltip="Nominator for the LFO's tempo sync"
textboxtext="ffffdf5e" textboxbkgd="c8c8c8" textboxoutline="808080"
min="1.0" max="4.0" int="1.0" style="IncDecButtons" textBoxPos="TextBoxLeft"
min="1.0" max="32.0" int="1.0" style="IncDecButtons" textBoxPos="TextBoxLeft"
textBoxEditable="1" textBoxWidth="40" textBoxHeight="20" skewFactor="1.0"
needsCallback="1"/>
<SLIDER name="MOD 1 Tempo Denom Slider" id="a116d9c60bf4c7b5" memberName="TempoDenomMOD1Sld"
Expand Down
6 changes: 5 additions & 1 deletion Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,14 @@ void SongbirdAudioProcessor::_migrateParamValues(std::vector<float>& paramValues
namespace AP = WECore::AREnv::Parameters;

if (paramValues.size() == 19) {
// The LFO frequency minimum changed from 0.5 to 0, but we need to use the original range
// when migrating the parameter value
const ParameterDefinition::RangedParameter<double> ORIGINAL_FREQ(0.5, 20, 2);

paramValues[2] = SP::FILTER_POSITION.NormalisedToInternal(paramValues[2]);
paramValues[3] = SP::MIX.NormalisedToInternal(paramValues[3]);
paramValues[8] = RP::DEPTH.NormalisedToInternal(paramValues[8]);
paramValues[9] = RP::FREQ.NormalisedToInternal(paramValues[9]);
paramValues[9] = ORIGINAL_FREQ.NormalisedToInternal(paramValues[9]);
paramValues[10] = RP::PHASE.NormalisedToInternal(paramValues[10]);
paramValues[13] = SP::OUTPUTGAIN.NormalisedToInternal(paramValues[13]);

Expand Down

0 comments on commit b6fda47

Please sign in to comment.