1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-29 23:29:41 +02:00

Tweak parameter ranges and lookaround keyboard tick scaling.

Signed-off-by: Max Maisel <max.maisel@posteo.de>
This commit is contained in:
Max Maisel 2021-02-11 18:30:05 +01:00
parent dec7e72abc
commit 5c14ec43d3
2 changed files with 9 additions and 9 deletions

View File

@ -83,10 +83,10 @@ Param( CompressBy, int, wxT("CompressBy"), kAmplitude, 0, nBy-1
Param( StereoInd, bool, wxT("StereoIndependent"), false, false, true, 1 ); Param( StereoInd, bool, wxT("StereoIndependent"), false, false, true, 1 );
Param( Threshold, double, wxT("Threshold"), -12.0, -60.0, -1.0, 1.0 ); Param( Threshold, double, wxT("Threshold"), -12.0, -60.0, -1.0, 1.0 );
Param( Ratio, double, wxT("Ratio"), 2.0, 1.1, 100.0, 10.0 ); Param( Ratio, double, wxT("Ratio"), 2.0, 1.1, 100.0, 20.0 );
Param( KneeWidth, double, wxT("KneeWidth"), 10.0, 0.0, 20.0, 10.0 ); Param( KneeWidth, double, wxT("KneeWidth"), 10.0, 0.0, 20.0, 10.0 );
Param( AttackTime, double, wxT("AttackTime"), 0.2, 0.00001, 30.0, 20000.0 ); Param( AttackTime, double, wxT("AttackTime"), 0.2, 0.0001, 30.0, 2000.0 );
Param( ReleaseTime, double, wxT("ReleaseTime"), 1.0, 0.00001, 30.0, 20000.0 ); Param( ReleaseTime, double, wxT("ReleaseTime"), 1.0, 0.0001, 30.0, 2000.0 );
Param( LookaheadTime, double, wxT("LookaheadTime"), 0.0, 0.0, 10.0, 200.0 ); Param( LookaheadTime, double, wxT("LookaheadTime"), 0.0, 0.0, 10.0, 200.0 );
Param( LookbehindTime, double, wxT("LookbehindTime"), 0.1, 0.0, 10.0, 200.0 ); Param( LookbehindTime, double, wxT("LookbehindTime"), 0.1, 0.0, 10.0, 200.0 );
Param( MakeupGain, double, wxT("MakeupGain"), 0.0, 0.0, 100.0, 1.0 ); Param( MakeupGain, double, wxT("MakeupGain"), 0.0, 0.0, 100.0, 1.0 );
@ -931,7 +931,7 @@ void EffectCompressor2::PopulateOrExchange(ShuttleGui & S)
S.StartStatic(XO("Compressor")); S.StartStatic(XO("Compressor"));
{ {
int textbox_width = S.GetParent()->GetTextExtent("10.000001XX").GetWidth(); int textbox_width = S.GetParent()->GetTextExtent("10.00001XX").GetWidth();
SliderTextCtrl* ctrl = nullptr; SliderTextCtrl* ctrl = nullptr;
S.StartHorizontalLay(wxEXPAND, true); S.StartHorizontalLay(wxEXPAND, true);
@ -1002,7 +1002,7 @@ void EffectCompressor2::PopulateOrExchange(ShuttleGui & S)
.Style(SliderTextCtrl::HORIZONTAL | SliderTextCtrl::LOG) .Style(SliderTextCtrl::HORIZONTAL | SliderTextCtrl::LOG)
.AddSliderTextCtrl({}, DEF_AttackTime, MAX_AttackTime, .AddSliderTextCtrl({}, DEF_AttackTime, MAX_AttackTime,
MIN_AttackTime, ScaleToPrecision(SCL_AttackTime), MIN_AttackTime, ScaleToPrecision(SCL_AttackTime),
&mAttackTime, SCL_AttackTime / 1000); &mAttackTime, SCL_AttackTime / 100, 0.033);
mAttackTimeCtrl->SetMinTextboxWidth(textbox_width); mAttackTimeCtrl->SetMinTextboxWidth(textbox_width);
S.AddVariableText(XO("s"), true, S.AddVariableText(XO("s"), true,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
@ -1013,7 +1013,7 @@ void EffectCompressor2::PopulateOrExchange(ShuttleGui & S)
.Style(SliderTextCtrl::HORIZONTAL | SliderTextCtrl::LOG) .Style(SliderTextCtrl::HORIZONTAL | SliderTextCtrl::LOG)
.AddSliderTextCtrl({}, DEF_ReleaseTime, MAX_ReleaseTime, .AddSliderTextCtrl({}, DEF_ReleaseTime, MAX_ReleaseTime,
MIN_ReleaseTime, ScaleToPrecision(SCL_ReleaseTime), MIN_ReleaseTime, ScaleToPrecision(SCL_ReleaseTime),
&mReleaseTime, SCL_ReleaseTime / 1000); &mReleaseTime, SCL_ReleaseTime / 100, 0.033);
ctrl->SetMinTextboxWidth(textbox_width); ctrl->SetMinTextboxWidth(textbox_width);
S.AddVariableText(XO("s"), true, S.AddVariableText(XO("s"), true,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
@ -1024,7 +1024,7 @@ void EffectCompressor2::PopulateOrExchange(ShuttleGui & S)
.Style(SliderTextCtrl::HORIZONTAL | SliderTextCtrl::LOG) .Style(SliderTextCtrl::HORIZONTAL | SliderTextCtrl::LOG)
.AddSliderTextCtrl({}, DEF_LookaheadTime, MAX_LookaheadTime, .AddSliderTextCtrl({}, DEF_LookaheadTime, MAX_LookaheadTime,
MIN_LookaheadTime, ScaleToPrecision(SCL_LookaheadTime), MIN_LookaheadTime, ScaleToPrecision(SCL_LookaheadTime),
&mLookaheadTime); &mLookaheadTime, SCL_LookaheadTime / 10);
mLookaheadTimeCtrl->SetMinTextboxWidth(textbox_width); mLookaheadTimeCtrl->SetMinTextboxWidth(textbox_width);
S.AddVariableText(XO("s"), true, S.AddVariableText(XO("s"), true,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
@ -1035,7 +1035,7 @@ void EffectCompressor2::PopulateOrExchange(ShuttleGui & S)
.Style(SliderTextCtrl::HORIZONTAL | SliderTextCtrl::LOG) .Style(SliderTextCtrl::HORIZONTAL | SliderTextCtrl::LOG)
.AddSliderTextCtrl({}, DEF_LookbehindTime, MAX_LookbehindTime, .AddSliderTextCtrl({}, DEF_LookbehindTime, MAX_LookbehindTime,
MIN_LookbehindTime, ScaleToPrecision(SCL_LookbehindTime), MIN_LookbehindTime, ScaleToPrecision(SCL_LookbehindTime),
&mLookbehindTime); &mLookbehindTime, SCL_LookbehindTime / 10);
ctrl->SetMinTextboxWidth(textbox_width); ctrl->SetMinTextboxWidth(textbox_width);
S.AddVariableText(XO("s"), true, S.AddVariableText(XO("s"), true,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);

View File

@ -220,7 +220,7 @@ do_test_equ(settled(y, fs, 0.1), ...
CURRENT_TEST = "Compressor2, mono, ultra short attack time"; CURRENT_TEST = "Compressor2, mono, ultra short attack time";
remove_all_tracks(); remove_all_tracks();
x = export_to_aud(x1, fs); x = export_to_aud(x1, fs);
aud_do("DynamicCompressor: Threshold=-20 Algorithm=1 CompressBy=0 Ratio=2 AttackTime=0.00001 ReleaseTime=0.00001 LookaheadTime=0 LookbehindTime=0 KneeWidth=10\n"); aud_do("DynamicCompressor: Threshold=-20 Algorithm=1 CompressBy=0 Ratio=2 AttackTime=0.0001 ReleaseTime=0.0001 LookaheadTime=0 LookbehindTime=0 KneeWidth=10\n");
y = import_from_aud(2); y = import_from_aud(2);
# XXX: use larger epsilon due to numerical issues # XXX: use larger epsilon due to numerical issues