-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Effect enable switches changes #1103
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
Changes from all commits
f7464e4
41ed69a
64b001d
038d4cd
8019197
c6c5b3c
783e418
7ac5b6d
4cc7a1f
1748730
a35281b
d1e3e68
8139b43
7629cb5
476e76e
224a621
d757a5f
e6924ee
6be7800
2218f55
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,11 +93,8 @@ | |
| <Text>ON</Text> | ||
| </State> | ||
| <Connection> | ||
| <ConfigKey persist="true"><Variable name="group"/>,enabled</ConfigKey> | ||
| <ButtonState>LeftButton</ButtonState> | ||
| </Connection> | ||
| <Connection> | ||
| <ConfigKey persist="true"><Variable name="group"/>,enabled</ConfigKey> | ||
| <!-- FIXME: Quick hack until effect chains are implemented. --> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add a connection block for Effect1 through Effect4?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think that would be worth the trouble considering the whole file will have to be replaced imminently. This is just a quick hack to make it keep working like it has been.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's no guarantee that's going to happen imminently though, so it's best to be thorough.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll work on LateNight if no one else steps up to do it for 2.1.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, even so I prefer every individual commit or PR to master to be complete and not half-working pending future work or design discussion. It's a good policy, since it allows releasing 2.1 at any commit from master even if pending work doesn't get done. Here I am considering the case of effect chains with multiple effects. If like me, you have a variety of effect chains in your personal branch defined with multiple effects, this prevents LateNight from working with them.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My concern is what will happen if toggling the enabled switches for all effects in the chain when they are not all in sync with each other. I'll test it out.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The behavior with all effects connected to the button is erratic. It only lights up when Effect3 is enabled, regardless of the state of Effect1 and Effect2. I haven't quite figured out the rules determining how it behaves when clicking the button, but it's confusing. It won't switch the state of Effect3, but it'll switch 1 and 2, but not always both. IMO leaving it as just connected to Effect1 is better for now.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, ok -- thanks for trying. |
||
| <ConfigKey persist="true">[EffectRack<Variable name="EffectRack"/>_EffectUnit<Variable name="EffectUnit"/>_Effect1],enabled</ConfigKey> | ||
| </Connection> | ||
| </PushButton> | ||
| </Children> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,11 +29,10 @@ EffectSlot::EffectSlot(const QString& group, | |
| m_pControlNumButtonParameterSlots = new ControlObject(ConfigKey(m_group, "num_button_parameterslots")); | ||
| m_pControlNumButtonParameterSlots->setReadOnly(); | ||
|
|
||
| // Default to disabled to prevent accidental activation of effects | ||
| // at the beginning of a set. | ||
| m_pControlEnabled = new ControlPushButton(ConfigKey(m_group, "enabled")); | ||
| m_pControlEnabled->setButtonMode(ControlPushButton::POWERWINDOW); | ||
| // Default to enabled. The skin might not show these buttons. | ||
| m_pControlEnabled->setDefaultValue(true); | ||
| m_pControlEnabled->set(true); | ||
| connect(m_pControlEnabled, SIGNAL(valueChanged(double)), | ||
| this, SLOT(slotEnabled(double))); | ||
|
|
||
|
|
@@ -146,9 +145,10 @@ void EffectSlot::loadEffect(EffectPointer pEffect) { | |
| m_pControlNumParameters->forceSet(pEffect->numKnobParameters()); | ||
| m_pControlNumButtonParameters->forceSet(pEffect->numButtonParameters()); | ||
|
|
||
| // Enabled is a persistent property of the effect slot, not of the | ||
| // effect. Propagate the current setting to the effect. | ||
| pEffect->setEnabled(m_pControlEnabled->get() > 0.0); | ||
| // The enabled status persists in the EffectSlot when loading a new | ||
| // EffectPointer to the EffectSlot. Effects and EngineEffects default to | ||
| // disabled, so if this EffectSlot was enabled, enable the Effect and EngineEffect. | ||
| pEffect->setEnabled(m_pControlEnabled->toBool()); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you keep the comment?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really understand the comment as it was. The slot enabled status has never been persistent, unless I'm misunderstanding the context of the comment.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, I think I understand. Persistent across calls to loadEffect() with different EffectPointers, not persistent across restarts of Mixxx.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, yea I think this comment predates the concept of a persistent CO :). Feel free to reword. |
||
|
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a no-op with the initial value of |
||
| connect(pEffect.data(), SIGNAL(enabledChanged(bool)), | ||
| this, SLOT(slotEffectEnabledChanged(bool))); | ||
|
|
@@ -161,11 +161,11 @@ void EffectSlot::loadEffect(EffectPointer pEffect) { | |
| addEffectButtonParameterSlot(); | ||
| } | ||
|
|
||
| foreach (EffectParameterSlotPointer pParameter, m_parameters) { | ||
| for (const auto& pParameter : m_parameters) { | ||
| pParameter->loadEffect(pEffect); | ||
| } | ||
|
|
||
| foreach (EffectButtonParameterSlotPointer pParameter, m_buttonParameters) { | ||
| for (const auto& pParameter : m_buttonParameters) { | ||
| pParameter->loadEffect(pEffect); | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm boggling a bit as to why there were two "enabled" connections here. @ywwg do you remember?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O.o I don't understand either. This whole
<Connection>element should probably be removed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I think it probably can be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is empty now could you remove it?