mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-16 17:41:14 +01:00
Add labels to Compressor2 plots and tweak parameter labels.
Signed-off-by: Max Maisel <max.maisel@posteo.de>
This commit is contained in:
@@ -815,6 +815,9 @@ void EffectCompressor2::PopulateOrExchange(ShuttleGui & S)
|
|||||||
{
|
{
|
||||||
PlotData* plot;
|
PlotData* plot;
|
||||||
|
|
||||||
|
S.StartVerticalLay();
|
||||||
|
S.AddVariableText(XO("Envelope dependent gain"), 0,
|
||||||
|
wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL);
|
||||||
mGainPlot = S.MinSize( { 200, 200 } )
|
mGainPlot = S.MinSize( { 200, 200 } )
|
||||||
.AddPlot({}, -60, 0, -60, 0, XO("dB"), XO("dB"),
|
.AddPlot({}, -60, 0, -60, 0, XO("dB"), XO("dB"),
|
||||||
Ruler::LinearDBFormat, Ruler::LinearDBFormat);
|
Ruler::LinearDBFormat, Ruler::LinearDBFormat);
|
||||||
@@ -826,10 +829,15 @@ void EffectCompressor2::PopulateOrExchange(ShuttleGui & S)
|
|||||||
plot->ydata.resize(61);
|
plot->ydata.resize(61);
|
||||||
std::iota(plot->xdata.begin(), plot->xdata.end(), -60);
|
std::iota(plot->xdata.begin(), plot->xdata.end(), -60);
|
||||||
|
|
||||||
|
S.EndVerticalLay();
|
||||||
|
S.StartVerticalLay();
|
||||||
|
|
||||||
|
S.AddVariableText(XO("Envelope detector step response"), 0,
|
||||||
|
wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL);
|
||||||
mResponsePlot = S.MinSize( { 200, 200 } )
|
mResponsePlot = S.MinSize( { 200, 200 } )
|
||||||
.AddPlot({}, 0, 5, -0.2, 1.2, XO("s"), XO(""),
|
.AddPlot({}, 0, 5, -0.2, 1.2, XO("s"), XO(""),
|
||||||
Ruler::IntFormat, Ruler::RealFormat, 2);
|
Ruler::IntFormat, Ruler::RealFormat, 2);
|
||||||
mResponsePlot->SetName(XO("Compressor step response plot"));
|
mResponsePlot->SetName(XO("Envelope detector step response plot"));
|
||||||
|
|
||||||
plot = mResponsePlot->GetPlotData(0);
|
plot = mResponsePlot->GetPlotData(0);
|
||||||
plot->pen = std::unique_ptr<wxPen>(
|
plot->pen = std::unique_ptr<wxPen>(
|
||||||
@@ -847,6 +855,7 @@ void EffectCompressor2::PopulateOrExchange(ShuttleGui & S)
|
|||||||
plot->ydata.resize(RESPONSE_PLOT_SAMPLES+1);
|
plot->ydata.resize(RESPONSE_PLOT_SAMPLES+1);
|
||||||
for(size_t x = 0; x < plot->xdata.size(); ++x)
|
for(size_t x = 0; x < plot->xdata.size(); ++x)
|
||||||
plot->xdata[x] = x * float(RESPONSE_PLOT_TIME) / float(RESPONSE_PLOT_SAMPLES);
|
plot->xdata[x] = x * float(RESPONSE_PLOT_TIME) / float(RESPONSE_PLOT_SAMPLES);
|
||||||
|
S.EndVerticalLay();
|
||||||
}
|
}
|
||||||
S.EndHorizontalLay();
|
S.EndHorizontalLay();
|
||||||
|
|
||||||
@@ -967,9 +976,9 @@ void EffectCompressor2::PopulateOrExchange(ShuttleGui & S)
|
|||||||
{
|
{
|
||||||
S.SetStretchyCol(1);
|
S.SetStretchyCol(1);
|
||||||
|
|
||||||
S.AddVariableText(XO("Attack Time:"), true,
|
S.AddVariableText(XO("Attack:"), true,
|
||||||
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
|
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
|
||||||
mAttackTimeCtrl = S.Name(XO("Attack Time"))
|
mAttackTimeCtrl = S.Name(XO("Attack"))
|
||||||
.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),
|
||||||
@@ -978,9 +987,9 @@ void EffectCompressor2::PopulateOrExchange(ShuttleGui & S)
|
|||||||
S.AddVariableText(XO("s"), true,
|
S.AddVariableText(XO("s"), true,
|
||||||
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
|
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
|
||||||
|
|
||||||
S.AddVariableText(XO("Release Time:"), true,
|
S.AddVariableText(XO("Release:"), true,
|
||||||
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
|
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
|
||||||
ctrl = S.Name(XO("Release Time"))
|
ctrl = S.Name(XO("Release"))
|
||||||
.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),
|
||||||
|
|||||||
Reference in New Issue
Block a user