Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eq band bypass mode #10934

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,7 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/widget/weffectparameterknobcomposed.cpp
src/widget/weffectparameternamebase.cpp
src/widget/weffectpushbutton.cpp
src/widget/wequalizerpushbutton.cpp
src/widget/weffectselector.cpp
src/widget/wfindonwebmenu.cpp
src/widget/whotcuebutton.cpp
Expand Down
4 changes: 2 additions & 2 deletions res/skins/Deere/equalizer_rack_parameter_left.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<SizePolicy>me,me</SizePolicy>
<Children>

<EffectPushButton>
<EqualizerPushButton>
<TooltipId>EqualizerRack_effect_button_parameter</TooltipId>
<Size>15f,20f</Size>
<ObjectName>EQKillButton</ObjectName>
Expand All @@ -41,7 +41,7 @@
<ConfigKey>[Skin],show_eq_kill_buttons</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
</EffectPushButton>
</EqualizerPushButton>

<WidgetGroup><!-- Expanding spacer to push EQ knob to opposite side -->
<Size>0me,1min</Size>
Expand Down
4 changes: 2 additions & 2 deletions res/skins/Deere/equalizer_rack_parameter_right.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</Children>
</WidgetGroup>

<EffectPushButton>
<EqualizerPushButton>
<TooltipId>EqualizerRack_effect_button_parameter</TooltipId>
<Size>15f,20f</Size>
<ObjectName>EQKillButton</ObjectName>
Expand All @@ -64,7 +64,7 @@
<ConfigKey>[Skin],show_eq_kill_buttons</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
</EffectPushButton>
</EqualizerPushButton>

<WidgetGroup><!-- Expanding spacer to push EQ knob to opposite side -->
<Size>0me,1min</Size>
Expand Down
4 changes: 2 additions & 2 deletions res/skins/LateNight/mixer/eq_knob_4decks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<WidgetGroup><Size>0min,5f</Size></WidgetGroup>

<EffectPushButton>
<EqualizerPushButton>
<TooltipId>filter<Variable name="EqRange"/>Kill</TooltipId>
<ObjectName>EQKillButton_<Variable name="EqRange"/></ObjectName>
<Size>18f,18f</Size>
Expand All @@ -53,7 +53,7 @@
<ConfigKey>[Skin],show_eq_kill_buttons</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
</EffectPushButton>
</EqualizerPushButton>

<!-- Placeholder when Kill buttons are hidden -->
<WidgetGroup>
Expand Down
4 changes: 2 additions & 2 deletions res/skins/LateNight/mixer/eq_knob_left.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Size>18f,34f</Size>
<Children>
<WidgetGroup><Size>0min,5f</Size></WidgetGroup>
<EffectPushButton>
<EqualizerPushButton>
<TooltipId>filter<Variable name="EqRange"/>Kill</TooltipId>
<ObjectName>EQKillButton_<Variable name="EqRange"/></ObjectName>
<Size>18f,18f</Size>
Expand All @@ -40,7 +40,7 @@
<ConfigKey><Variable name="EqEffect"/>,button_parameter<Variable name="EqParameter"/></ConfigKey>
<ButtonState>LeftButton</ButtonState>
</Connection>
</EffectPushButton>
</EqualizerPushButton>
</Children>
<Connection>
<ConfigKey>[Skin],show_eq_kill_buttons</ConfigKey>
Expand Down
4 changes: 2 additions & 2 deletions res/skins/LateNight/mixer/eq_knob_right.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

<WidgetGroup><Size>0min,5f</Size></WidgetGroup>

<EffectPushButton>
<EqualizerPushButton>
<TooltipId>filter<Variable name="EqRange"/>Kill</TooltipId>
<ObjectName>EQKillButton_<Variable name="EqRange"/></ObjectName>
<Size>18f,18f</Size>
Expand All @@ -90,7 +90,7 @@
<ConfigKey><Variable name="EqEffect"/>,button_parameter<Variable name="EqParameter"/></ConfigKey>
<ButtonState>LeftButton</ButtonState>
</Connection>
</EffectPushButton>
</EqualizerPushButton>

</Children>
<Connection>
Expand Down
24 changes: 12 additions & 12 deletions res/skins/Shade/mixer_panel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
Button- Frequency Kill
**********************************************
-->
<EffectPushButton>
<EqualizerPushButton>
<EffectUnitGroup>[EqualizerRack1_[Channel1]]</EffectUnitGroup>
<Effect>1</Effect>
<EffectButtonParameter>3</EffectButtonParameter>
Expand All @@ -347,8 +347,8 @@
<ConfigKey>[EqualizerRack1_[Channel1]_Effect1],button_parameter3_loaded</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
</EffectPushButton>
<EffectPushButton>
</EqualizerPushButton>
<EqualizerPushButton>
<EffectUnitGroup>[EqualizerRack1_[Channel1]]</EffectUnitGroup>
<Effect>1</Effect>
<EffectButtonParameter>2</EffectButtonParameter>
Expand All @@ -373,8 +373,8 @@
<ConfigKey>[EqualizerRack1_[Channel1]_Effect1],button_parameter2_loaded</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
</EffectPushButton>
<EffectPushButton>
</EqualizerPushButton>
<EqualizerPushButton>
<EffectUnitGroup>[EqualizerRack1_[Channel1]]</EffectUnitGroup>
<Effect>1</Effect>
<EffectButtonParameter>1</EffectButtonParameter>
Expand All @@ -399,9 +399,9 @@
<ConfigKey>[EqualizerRack1_[Channel1]_Effect1],button_parameter1_loaded</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
</EffectPushButton>
</EqualizerPushButton>

<EffectPushButton>
<EqualizerPushButton>
<EffectUnitGroup>[EqualizerRack1_[Channel1]]</EffectUnitGroup>
<Effect>1</Effect>
<EffectButtonParameter>3</EffectButtonParameter>
Expand All @@ -426,8 +426,8 @@
<ConfigKey>[EqualizerRack1_[Channel2]_Effect1],button_parameter3_loaded</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
</EffectPushButton>
<EffectPushButton>
</EqualizerPushButton>
<EqualizerPushButton>
<EffectUnitGroup>[EqualizerRack1_[Channel1]]</EffectUnitGroup>
<Effect>1</Effect>
<EffectButtonParameter>2</EffectButtonParameter>
Expand All @@ -452,8 +452,8 @@
<ConfigKey>[EqualizerRack1_[Channel2]_Effect1],button_parameter2_loaded</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
</EffectPushButton>
<EffectPushButton>
</EqualizerPushButton>
<EqualizerPushButton>
<EffectUnitGroup>[EqualizerRack1_[Channel1]]</EffectUnitGroup>
<Effect>1</Effect>
<EffectButtonParameter>1</EffectButtonParameter>
Expand All @@ -478,7 +478,7 @@
<ConfigKey>[EqualizerRack1_[Channel2]_Effect1],button_parameter1_loaded</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
</EffectPushButton>
</EqualizerPushButton>

<Battery>
<ObjectName>Battery</ObjectName>
Expand Down
4 changes: 2 additions & 2 deletions res/skins/Tango/mixer/eq_button.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Variables:
[QuickEffectRack1_[ChannelA]_EffectY]
-->
<Template>
<EffectPushButton>
<EqualizerPushButton>
<ObjectName><Variable name="ObjectName"/></ObjectName>
<Size><Variable name="Size"/></Size>
<NumberStates>2</NumberStates>
Expand All @@ -35,5 +35,5 @@ Variables:
<ConfigKey><Variable name="FxUnit_FxNum"/>,button_parameter<Variable name="FxParameter"/></ConfigKey>
<ButtonState>LeftButton</ButtonState>
</Connection>
</EffectPushButton>
</EqualizerPushButton>
</Template>
10 changes: 5 additions & 5 deletions src/controllers/controlpickermenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ ControlPickerMenu::ControlPickerMenu(QWidget* pParent)
// Since 3-band is by far the most common, stick with that.
const int kMaxEqs = 3;
QList<QString> eqNames;
eqNames.append(tr("Low EQ"));
eqNames.append(tr("Mid EQ"));
eqNames.append(tr("High EQ"));
eqNames.append(tr("EQ Low"));
eqNames.append(tr("EQ Mid"));
eqNames.append(tr("EQ High"));
for (int deck = 1; deck <= iNumDecks; ++deck) {
QMenu* deckMenu = addSubmenu(QString("Deck %1").arg(deck), eqMenu);
for (int effect = kMaxEqs - 1; effect >= 0; --effect) {
Expand All @@ -131,8 +131,8 @@ ControlPickerMenu::ControlPickerMenu(QWidget* pParent)
control = "button_parameter%1";
addControl(group,
control.arg(effect + 1),
tr("Kill %1").arg(eqNames[effect]),
tr("Kill %1").arg(eqNames[effect]),
tr("%1 Button").arg(eqNames[effect]),
tr("%1 Button").arg(eqNames[effect]),
bandMenu,
false,
tr("Deck %1").arg(deck));
Expand Down
16 changes: 6 additions & 10 deletions src/effects/backends/builtin/bessel4lvmixeqeffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ EffectManifestPointer Bessel4LVMixEQEffect::getManifest() {
}

Bessel4LVMixEQEffect::Bessel4LVMixEQEffect() {
m_pLoFreqCorner = new ControlProxy("[Mixer Profile]", "LoEQFrequency");
m_pHiFreqCorner = new ControlProxy("[Mixer Profile]", "HiEQFrequency");
m_pLoFreqCorner = std::make_unique<ControlProxy>("[Mixer Profile]", "LoEQFrequency");
m_pHiFreqCorner = std::make_unique<ControlProxy>("[Mixer Profile]", "HiEQFrequency");
m_pEQButtonMode = std::make_unique<ControlProxy>("[Mixer Profile]", "EQButtonMode");
}

void Bessel4LVMixEQEffect::loadEngineEffectParameters(
Expand All @@ -43,11 +44,6 @@ void Bessel4LVMixEQEffect::loadEngineEffectParameters(
m_pKillHigh = parameters.value("killHigh");
}

Bessel4LVMixEQEffect::~Bessel4LVMixEQEffect() {
delete m_pLoFreqCorner;
delete m_pHiFreqCorner;
}

void Bessel4LVMixEQEffect::processChannel(
Bessel4LVMixEQEffectGroupState* pState,
const CSAMPLE* pInput,
Expand All @@ -67,17 +63,17 @@ void Bessel4LVMixEQEffect::processChannel(
if (!m_pKillLow->toBool()) {
fLow = m_pPotLow->value();
} else {
fLow = 0;
fLow = m_pEQButtonMode->get() == 0 ? 0 : 1;
}
if (!m_pKillMid->toBool()) {
fMid = m_pPotMid->value();
} else {
fMid = 0;
fMid = m_pEQButtonMode->get() == 0 ? 0 : 1;
}
if (!m_pKillHigh->toBool()) {
fHigh = m_pPotHigh->value();
} else {
fHigh = 0;
fHigh = m_pEQButtonMode->get() == 0 ? 0 : 1;
}
pState->processChannel(pInput,
pOutput,
Expand Down
6 changes: 3 additions & 3 deletions src/effects/backends/builtin/bessel4lvmixeqeffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class Bessel4LVMixEQEffectGroupState : public LVMixEQEffectGroupState<EngineFilt
class Bessel4LVMixEQEffect : public EffectProcessorImpl<Bessel4LVMixEQEffectGroupState> {
public:
Bessel4LVMixEQEffect();
virtual ~Bessel4LVMixEQEffect();

static QString getId();
static EffectManifestPointer getManifest();
Expand Down Expand Up @@ -51,8 +50,9 @@ class Bessel4LVMixEQEffect : public EffectProcessorImpl<Bessel4LVMixEQEffectGrou
EngineEffectParameterPointer m_pKillMid;
EngineEffectParameterPointer m_pKillHigh;

ControlProxy* m_pLoFreqCorner;
ControlProxy* m_pHiFreqCorner;
std::unique_ptr<ControlProxy> m_pLoFreqCorner;
std::unique_ptr<ControlProxy> m_pHiFreqCorner;
std::unique_ptr<ControlProxy> m_pEQButtonMode;

DISALLOW_COPY_AND_ASSIGN(Bessel4LVMixEQEffect);
};
16 changes: 6 additions & 10 deletions src/effects/backends/builtin/bessel8lvmixeqeffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ EffectManifestPointer Bessel8LVMixEQEffect::getManifest() {
}

Bessel8LVMixEQEffect::Bessel8LVMixEQEffect() {
m_pLoFreqCorner = new ControlProxy("[Mixer Profile]", "LoEQFrequency");
m_pHiFreqCorner = new ControlProxy("[Mixer Profile]", "HiEQFrequency");
m_pLoFreqCorner = std::make_unique<ControlProxy>("[Mixer Profile]", "LoEQFrequency");
m_pHiFreqCorner = std::make_unique<ControlProxy>("[Mixer Profile]", "HiEQFrequency");
m_pEQButtonMode = std::make_unique<ControlProxy>("[Mixer Profile]", "EQButtonMode");
}

void Bessel8LVMixEQEffect::loadEngineEffectParameters(
Expand All @@ -43,11 +44,6 @@ void Bessel8LVMixEQEffect::loadEngineEffectParameters(
m_pKillHigh = parameters.value("killHigh");
}

Bessel8LVMixEQEffect::~Bessel8LVMixEQEffect() {
delete m_pLoFreqCorner;
delete m_pHiFreqCorner;
}

void Bessel8LVMixEQEffect::processChannel(
Bessel8LVMixEQEffectGroupState* pState,
const CSAMPLE* pInput,
Expand All @@ -67,17 +63,17 @@ void Bessel8LVMixEQEffect::processChannel(
if (!m_pKillLow->toBool()) {
fLow = m_pPotLow->value();
} else {
fLow = 0;
fLow = m_pEQButtonMode->get() == 0 ? 0 : 1;
}
if (!m_pKillMid->toBool()) {
fMid = m_pPotMid->value();
} else {
fMid = 0;
fMid = m_pEQButtonMode->get() == 0 ? 0 : 1;
}
if (!m_pKillHigh->toBool()) {
fHigh = m_pPotHigh->value();
} else {
fHigh = 0;
fHigh = m_pEQButtonMode->get() == 0 ? 0 : 1;
}
pState->processChannel(pInput,
pOutput,
Expand Down
6 changes: 3 additions & 3 deletions src/effects/backends/builtin/bessel8lvmixeqeffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class Bessel8LVMixEQEffectGroupState : public LVMixEQEffectGroupState<EngineFilt
class Bessel8LVMixEQEffect : public EffectProcessorImpl<Bessel8LVMixEQEffectGroupState> {
public:
Bessel8LVMixEQEffect();
virtual ~Bessel8LVMixEQEffect();

static QString getId();
static EffectManifestPointer getManifest();
Expand Down Expand Up @@ -53,8 +52,9 @@ class Bessel8LVMixEQEffect : public EffectProcessorImpl<Bessel8LVMixEQEffectGrou
EngineEffectParameterPointer m_pKillMid;
EngineEffectParameterPointer m_pKillHigh;

ControlProxy* m_pLoFreqCorner;
ControlProxy* m_pHiFreqCorner;
std::unique_ptr<ControlProxy> m_pLoFreqCorner;
std::unique_ptr<ControlProxy> m_pHiFreqCorner;
std::unique_ptr<ControlProxy> m_pEQButtonMode;

DISALLOW_COPY_AND_ASSIGN(Bessel8LVMixEQEffect);
};
Loading