diff --git a/src/effects/Amplify.cpp b/src/effects/Amplify.cpp index ce9dea880..e6d53a01d 100644 --- a/src/effects/Amplify.cpp +++ b/src/effects/Amplify.cpp @@ -211,10 +211,11 @@ void EffectAmplify::PopulateOrExchange(ShuttleGui & S) S.StartVerticalLay(0); { + int precission = 3; // Amplitude S.StartMultiColumn(2, wxCENTER); { - FloatingPointValidator vldAmp(2, &mAmp); + FloatingPointValidator vldAmp(precission, &mAmp, NUM_VAL_ONE_TRAILING_ZERO); vldAmp.SetRange(MIN_Amp, MAX_Amp); mAmpT = S.Id(ID_Amp).AddTextBox(_("Amplification (dB):"), wxT(""), 12); mAmpT->SetValidator(vldAmp); @@ -233,8 +234,7 @@ void EffectAmplify::PopulateOrExchange(ShuttleGui & S) // Peak S.StartMultiColumn(2, wxCENTER); { - int precission = 2; - FloatingPointValidator vldNewPeak(precission, &mNewPeak); + FloatingPointValidator vldNewPeak(precission, &mNewPeak, NUM_VAL_ONE_TRAILING_ZERO); double minAmp = MIN_Amp + (20.0 * log10(mPeak)); double maxAmp = MAX_Amp + (20.0 * log10(mPeak)); diff --git a/src/effects/BassTreble.cpp b/src/effects/BassTreble.cpp index 131cc153c..f311a75d6 100644 --- a/src/effects/BassTreble.cpp +++ b/src/effects/BassTreble.cpp @@ -44,8 +44,8 @@ enum // Define keys, defaults, minimums, and maximums for the effect parameters // // Name Type Key Def Min Max Scale -Param( Bass, double, XO("Bass"), 0.0, -15.0, 15.0, 1 ); -Param( Treble, double, XO("Treble"), 0.0, -15.0, 15.0, 1 ); +Param( Bass, double, XO("Bass"), 0.0, -30.0, 30.0, 1 ); +Param( Treble, double, XO("Treble"), 0.0, -30.0, 30.0, 1 ); Param( Level, double, XO("Level"), -1.0, -30.0, 0.0, 1 ); Param( Normalize, bool, XO("Normalize"), true, false, true, 1 ); diff --git a/src/effects/Paulstretch.cpp b/src/effects/Paulstretch.cpp index 5b1c98a40..fba28331c 100644 --- a/src/effects/Paulstretch.cpp +++ b/src/effects/Paulstretch.cpp @@ -31,7 +31,7 @@ // // Name Type Key Def Min Max Scale Param( Amount, float, XO("Stretch Factor"), 10.0, 1.0, FLT_MAX, 1 ); -Param( Time, float, XO("Time Resolution"), 0.25f, 0.001f, FLT_MAX, 1 ); +Param( Time, float, XO("Time Resolution"), 0.25f, 0.00099f, FLT_MAX, 1 ); class PaulStretch { @@ -170,7 +170,7 @@ void EffectPaulstretch::PopulateOrExchange(ShuttleGui & S) */ S.AddTextBox(_("Stretch Factor:"), wxT(""), 10)->SetValidator(vldAmount); - FloatingPointValidator vldTime(1, &time_resolution); + FloatingPointValidator vldTime(3, &time_resolution, NUM_VAL_ONE_TRAILING_ZERO); vldTime.SetMin(MIN_Time); S.AddTextBox(_("Time Resolution (seconds):"), wxT(""), 10)->SetValidator(vldTime); } diff --git a/src/effects/Phaser.cpp b/src/effects/Phaser.cpp index 260a1dec0..529353a82 100644 --- a/src/effects/Phaser.cpp +++ b/src/effects/Phaser.cpp @@ -45,8 +45,8 @@ enum // Name Type Key Def Min Max Scale Param( Stages, int, XO("Stages"), 2, 2, NUM_STAGES, 1 ); Param( DryWet, int, XO("DryWet"), 128, 0, 255, 1 ); -Param( Freq, double, XO("Freq"), 0.4, 0.1, 4.0, 10 ); -Param( Phase, double, XO("Phase"), 0.0, 0.0, 359.0, 1 ); +Param( Freq, double, XO("Freq"), 0.4, 0.001,4.0, 10.0 ); +Param( Phase, double, XO("Phase"), 0.0, 0.0, 360.0, 1 ); Param( Depth, int, XO("Depth"), 100, 0, 255, 1 ); Param( Feedback, int, XO("Feedback"), 0, -100, 100, 1 ); @@ -152,7 +152,7 @@ sampleCount EffectPhaser::ProcessBlock(float **inBlock, float **outBlock, sample { double in = ibuf[i]; - double m = in + fbout * mFeedback / 100; + double m = in + fbout * mFeedback / 101; // Feedback must be less than 100% to avoid infinite gain. if (((skipcount++) % lfoskipsamples) == 0) { @@ -222,6 +222,7 @@ bool EffectPhaser::SetAutomationParameters(EffectAutomationParameters & parms) void EffectPhaser::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(5); + S.AddSpace(0, 5); S.StartMultiColumn(3, wxEXPAND); { @@ -229,7 +230,7 @@ void EffectPhaser::PopulateOrExchange(ShuttleGui & S) IntegerValidator vldStages(&mStages); vldStages.SetRange(MIN_Stages, MAX_Stages); - mStagesT = S.Id(ID_Stages).AddTextBox(_("Stages:"), wxT(""), 12); + mStagesT = S.Id(ID_Stages).AddTextBox(_("Stages:"), wxT(""), 15); mStagesT->SetValidator(vldStages); S.SetStyle(wxSL_HORIZONTAL); @@ -240,7 +241,7 @@ void EffectPhaser::PopulateOrExchange(ShuttleGui & S) IntegerValidator vldDryWet(&mDryWet); vldDryWet.SetRange(MIN_DryWet, MAX_DryWet); - mDryWetT = S.Id(ID_DryWet).AddTextBox(_("Dry/Wet:"), wxT(""), 12); + mDryWetT = S.Id(ID_DryWet).AddTextBox(_("Dry/Wet:"), wxT(""), 15); mDryWetT->SetValidator(vldDryWet); S.SetStyle(wxSL_HORIZONTAL); @@ -248,19 +249,19 @@ void EffectPhaser::PopulateOrExchange(ShuttleGui & S) mDryWetS->SetName(_("Dry Wet")); mDryWetS->SetMinSize(wxSize(100, -1)); - FloatingPointValidator vldFreq(1, &mFreq); + FloatingPointValidator vldFreq(5, &mFreq, NUM_VAL_ONE_TRAILING_ZERO); vldFreq.SetRange(MIN_Freq, MAX_Freq); - mFreqT = S.Id(ID_Freq).AddTextBox(_("LFO Frequency (Hz):"), wxT(""), 12); + mFreqT = S.Id(ID_Freq).AddTextBox(_("LFO Frequency (Hz):"), wxT(""), 15); mFreqT->SetValidator(vldFreq); S.SetStyle(wxSL_HORIZONTAL); - mFreqS = S.Id(ID_Freq).AddSlider(wxT(""), DEF_Freq * SCL_Freq, MAX_Freq * SCL_Freq, MIN_Freq * SCL_Freq); + mFreqS = S.Id(ID_Freq).AddSlider(wxT(""), DEF_Freq * SCL_Freq, MAX_Freq * SCL_Freq, 0.0); mFreqS ->SetName(_("LFO frequency in hertz")); mFreqS ->SetMinSize(wxSize(100, -1)); FloatingPointValidator vldPhase(1, &mPhase); vldPhase.SetRange(MIN_Phase, MAX_Phase); - mPhaseT = S.Id(ID_Phase).AddTextBox(_("LFO Start Phase (deg.):"), wxT(""), 12); + mPhaseT = S.Id(ID_Phase).AddTextBox(_("LFO Start Phase (deg.):"), wxT(""), 15); mPhaseT->SetValidator(vldPhase); S.SetStyle(wxSL_HORIZONTAL); @@ -271,7 +272,7 @@ void EffectPhaser::PopulateOrExchange(ShuttleGui & S) IntegerValidator vldDepth(&mDepth); vldDepth.SetRange(MIN_Depth, MAX_Depth); - mDepthT = S.Id(ID_Depth).AddTextBox(_("Depth:"), wxT(""), 12); + mDepthT = S.Id(ID_Depth).AddTextBox(_("Depth:"), wxT(""), 15); mDepthT->SetValidator(vldDepth); S.SetStyle(wxSL_HORIZONTAL); @@ -281,7 +282,7 @@ void EffectPhaser::PopulateOrExchange(ShuttleGui & S) IntegerValidator vldFeedback(&mFeedback); vldFeedback.SetRange(MIN_Feedback, MAX_Feedback); - mFeedbackT = S.Id(ID_Feedback).AddTextBox(_("Feedback (%):"), wxT(""), 12); + mFeedbackT = S.Id(ID_Feedback).AddTextBox(_("Feedback (%):"), wxT(""), 15); mFeedbackT->SetValidator(vldFeedback); S.SetStyle(wxSL_HORIZONTAL); @@ -331,7 +332,6 @@ bool EffectPhaser::TransferDataFromWindow() void EffectPhaser::OnStagesSlider(wxCommandEvent & evt) { mStages = (evt.GetInt() / SCL_Stages) & ~1; // must be even; - mPhaseS->SetValue(mStages * SCL_Stages); mStagesT->GetValidator()->TransferToWindow(); EnableApply(mUIParent->Validate()); } @@ -346,6 +346,7 @@ void EffectPhaser::OnDryWetSlider(wxCommandEvent & evt) void EffectPhaser::OnFreqSlider(wxCommandEvent & evt) { mFreq = (double) evt.GetInt() / SCL_Freq; + if (mFreq < MIN_Freq) mFreq = MIN_Freq; mFreqT->GetValidator()->TransferToWindow(); EnableApply(mUIParent->Validate()); } diff --git a/src/effects/Wahwah.cpp b/src/effects/Wahwah.cpp index a14213c32..7cf551093 100644 --- a/src/effects/Wahwah.cpp +++ b/src/effects/Wahwah.cpp @@ -217,7 +217,7 @@ void EffectWahwah::PopulateOrExchange(ShuttleGui & S) { S.SetStretchyCol(2); - FloatingPointValidator vldfreq(1, &mFreq); + FloatingPointValidator vldfreq(5, &mFreq, NUM_VAL_ONE_TRAILING_ZERO); vldfreq.SetRange(MIN_Freq, MAX_Freq); mFreqT = S.Id(ID_Freq).AddTextBox(_("LFO Frequency (Hz):"), wxT(""), 12); mFreqT->SetValidator(vldfreq);