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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
6 changes: 3 additions & 3 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 Down
36 changes: 20 additions & 16 deletions src/effects/backends/builtin/bessel4lvmixeqeffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ 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");
}

void Bessel4LVMixEQEffect::loadEngineEffectParameters(
Expand All @@ -41,11 +41,9 @@ void Bessel4LVMixEQEffect::loadEngineEffectParameters(
m_pKillLow = parameters.value("killLow");
m_pKillMid = parameters.value("killMid");
m_pKillHigh = parameters.value("killHigh");
}

Bessel4LVMixEQEffect::~Bessel4LVMixEQEffect() {
delete m_pLoFreqCorner;
delete m_pHiFreqCorner;
m_pBypassLow = parameters.value("bypassLow");
m_pBypassMid = parameters.value("bypassMid");
m_pBypassHigh = parameters.value("bypassHigh");
}

void Bessel4LVMixEQEffect::processChannel(
Expand All @@ -64,20 +62,26 @@ void Bessel4LVMixEQEffect::processChannel(
double fLow;
double fMid;
double fHigh;
if (!m_pKillLow->toBool()) {
fLow = m_pPotLow->value();
} else {
if (m_pBypassLow->toBool()) {
fLow = 1;
} else if (m_pKillLow->toBool()) {
fLow = 0;
}
if (!m_pKillMid->toBool()) {
fMid = m_pPotMid->value();
} else {
fMid = 0;
fLow = m_pPotLow->value();
}
if (!m_pKillHigh->toBool()) {
fHigh = m_pPotHigh->value();
if (m_pBypassMid->toBool()) {
fMid = 1;
} else if (m_pKillMid->toBool()) {
fMid = 0;
} else {
fMid = m_pPotMid->value();
}
if (m_pBypassHigh->toBool()) {
fHigh = 1;
} else if (m_pKillHigh->toBool()) {
fHigh = 0;
} else {
fHigh = m_pPotHigh->value();
}
pState->processChannel(pInput,
pOutput,
Expand Down
9 changes: 6 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,12 @@ class Bessel4LVMixEQEffect : public EffectProcessorImpl<Bessel4LVMixEQEffectGrou
EngineEffectParameterPointer m_pKillMid;
EngineEffectParameterPointer m_pKillHigh;

ControlProxy* m_pLoFreqCorner;
ControlProxy* m_pHiFreqCorner;
EngineEffectParameterPointer m_pBypassLow;
EngineEffectParameterPointer m_pBypassMid;
EngineEffectParameterPointer m_pBypassHigh;

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

DISALLOW_COPY_AND_ASSIGN(Bessel4LVMixEQEffect);
};
36 changes: 20 additions & 16 deletions src/effects/backends/builtin/bessel8lvmixeqeffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ 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");
}

void Bessel8LVMixEQEffect::loadEngineEffectParameters(
Expand All @@ -41,11 +41,9 @@ void Bessel8LVMixEQEffect::loadEngineEffectParameters(
m_pKillLow = parameters.value("killLow");
m_pKillMid = parameters.value("killMid");
m_pKillHigh = parameters.value("killHigh");
}

Bessel8LVMixEQEffect::~Bessel8LVMixEQEffect() {
delete m_pLoFreqCorner;
delete m_pHiFreqCorner;
m_pBypassLow = parameters.value("bypassLow");
m_pBypassMid = parameters.value("bypassMid");
m_pBypassHigh = parameters.value("bypassHigh");
}

void Bessel8LVMixEQEffect::processChannel(
Expand All @@ -64,20 +62,26 @@ void Bessel8LVMixEQEffect::processChannel(
double fLow;
double fMid;
double fHigh;
if (!m_pKillLow->toBool()) {
fLow = m_pPotLow->value();
} else {
if (m_pBypassLow->toBool()) {
fLow = 1;
} else if (m_pKillLow->toBool()) {
fLow = 0;
}
if (!m_pKillMid->toBool()) {
fMid = m_pPotMid->value();
} else {
fMid = 0;
fLow = m_pPotLow->value();
}
if (!m_pKillHigh->toBool()) {
fHigh = m_pPotHigh->value();
if (m_pBypassMid->toBool()) {
fMid = 1;
} else if (m_pKillMid->toBool()) {
fMid = 0;
} else {
fMid = m_pPotMid->value();
}
if (m_pBypassHigh->toBool()) {
fHigh = 1;
} else if (m_pKillHigh->toBool()) {
fHigh = 0;
} else {
fHigh = m_pPotHigh->value();
}
pState->processChannel(pInput,
pOutput,
Expand Down
9 changes: 6 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,12 @@ class Bessel8LVMixEQEffect : public EffectProcessorImpl<Bessel8LVMixEQEffectGrou
EngineEffectParameterPointer m_pKillMid;
EngineEffectParameterPointer m_pKillHigh;

ControlProxy* m_pLoFreqCorner;
ControlProxy* m_pHiFreqCorner;
EngineEffectParameterPointer m_pBypassLow;
EngineEffectParameterPointer m_pBypassMid;
EngineEffectParameterPointer m_pBypassHigh;

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

DISALLOW_COPY_AND_ASSIGN(Bessel8LVMixEQEffect);
};
Loading