Conversation
|
I like the idea. Unfortunately we cannot merge it without changing the way our default LateNight skin works. |
|
The last commit should hold over LateNight until someone takes up the work of redesign its effects UI. |
| // 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); | ||
|
|
There was a problem hiding this comment.
This is a no-op with the initial value of m_pControlEnabled equal to the initial value of Effect's m_bEnabled.
|
@timrae : Could you test this? I have merged the recent updates into my personal branch. I think it's ready for merging to master. |
|
Sure I'm already back to work but I'll try test it over the next few days. |
|
Did you figure out the steps to reproduce? I'm not exactly sure how to test it |
|
The steps to reproduce were simply starting Mixxx after shutting it down with effects loaded. The workaround is described here and it should not be necessary anymore. |
|
Thanks, I can confirm that yes that was the bug that I reported, and yes it is fixed here. I'm also 100% in support of disabling the individual FX enable switches and making the assignments persistent. It looks good for the merge to me. |
| m_channelStatusMapper.setMapping(pEnableControl, handle_group.name()); | ||
| connect(pEnableControl, SIGNAL(valueChanged(double)), | ||
| &m_channelStatusMapper, SLOT(map())); | ||
| slotChannelStatusChanged(handle_group.name()); |
There was a problem hiding this comment.
We already have pInfo here so you could avoid the QMap lookup by doing a
if (pEnableControl->toBool()) {
m_pEffectChain->enableForChannel(pInfo->handle_group);
} else {
m_pEffectChain->disableForChannel(pInfo->handle_group);
}
| // 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); | ||
| pEffect->updateEngineState(); |
There was a problem hiding this comment.
Couldn't the effect's enabled state be out of sync with the EffectSlot's enabled status? That's what the original line was doing here.
There was a problem hiding this comment.
No, the original line was a no-op because setEnabled() checks if the parameter passed to it is equal to its private enabled boolean.
There was a problem hiding this comment.
If the effect slot is enabled then the effect will be disabled but the effect slot will be enabled.
It should be easy to see -- enable an effect, then change the effect to something else. The enabled button will be lit but the effect will be disabled.
There was a problem hiding this comment.
The problem I was fixing was that when the effect slot was disabled, loading a new effect would load the EngineEffect enabled but the slot would still be disabled.
There was a problem hiding this comment.
Ah, looks like you also need to make EngineEffect default to disabled so Effect/EngineEffect don't start life out of sync. I think this line should stay as it was.
| m_pControlEnabled->set(true); | ||
| // Default to disabled to prevent accidental activation of effects | ||
| // at the beginning of a set. | ||
| m_pControlEnabled->setDefaultValue(false); |
There was a problem hiding this comment.
These are both no-ops since they're the default. Maybe drop them and move the comment above the "new ControlPushButton".
|
Failing test: |
|
I think it's inconsistent to default the EffectChainSlot to enabled but the EffectSlot to disabled or vice versa. They were both enabled by default to support skins that don't show either one of them with little hassle. Let's disable them both by default and then put the work onto the skins to set things up according to the paradigm the skin offers. |
| <Text>ON</Text> | ||
| </State> | ||
| <Connection> | ||
| <ConfigKey persist="true"><Variable name="group"/>,enabled</ConfigKey> |
There was a problem hiding this comment.
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.
O.o I don't understand either. This whole <Connection> element should probably be removed.
There was a problem hiding this comment.
Since this is empty now could you remove it?
|
Let's stop providing an inconsistent interface in different skins. Skins should conform to a standard interface or be expected to not work properly. I'm leaning towards removing the chain enable switches from skins. It's one more layer of complexity to get confused about while mixing. Effect enable and deck assignment switches is already pretty complicated. |
|
What is the use case for chain enable switches separate from deck assignment switches? AFAIK no controllers are designed for such a concept. |
They let you drop an effect unit in and out of the mix with one click -- as LateNight does. |
So do effect enable switches and deck assignment switches. But, confusingly, those won't work if the whole chain is disabled. |
Having spent time mixing with the new branch, I strongly disagree with this. Having the states of the individual enabled switches to "off" makes sure that the unit doesn't affect the sound by default. Going further to disable the unit itself would make it such that users who are experimenting with effects for the first time have to press THREE buttons before they can use the FX: channel assignment, effect enable, effect unit enable. I would go further to say that by default only ONE button press should be required by default: the effect enable. I.e. channel assignment should default to 1 and 2 for the two units respectively |
Right -- in practice the skin supports either enabling at the chain level or the effect level. |
That's a good idea. |
I think you misunderstood the proposal -- we would default all of them to off in C++ and then put it on the skin to set one of the two to on via an attributes section. |
|
Skins shouldn't have to worry about a ControlObject that they do not show any visual indicator for. |
and make changes to default persistent
|
Effects, EQs, and QuickEffects are working now, but one of the EffectSlot tests is failing. I'll fix that tomorrow. |
| // 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); | ||
| pEffect->setEnabled(m_pControlEnabled->toBool()); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Oh, I think I understand. Persistent across calls to loadEffect() with different EffectPointers, not persistent across restarts of Mixxx.
There was a problem hiding this comment.
Ah, yea I think this comment predates the concept of a persistent CO :). Feel free to reword.
as per discussion on PR mixxxdj#1103
as per discussion on PR mixxxdj#1103
as per discussion on PR mixxxdj#1103
I thought this would be useful before when working on mixxxdj#1103, but experience has shown it is annoying. I want effect unit 1 assigned to deck 1, unit 2 to deck 2, unit 3 to deck 3, and unit 4 to deck 4 on startup regardless of how the routing switches happened to be when I last shut down Mixxx.
This PR disables the per-effect switches when Mixxx starts and makes the switches to enable EffectUnits on decks (and other sources) persistent.
The motivation for this came from my experience setting up for my set last night using the persistent effects in PR #1092. I was worried because the level meters on my sound card showed no signal was coming out. I had to ask the previous DJ to play another track while I figured out what was going wrong. I thought something was wrong with my sound card. I tried restarting Mixxx and replugging my sound card several times and restarted my computer. Finally, I noticed that the level meters on Mixxx were not showing any signal coming through when the deck was playing. I realized that the dry/wet knob for the EffectUnit enabled on that deck was all the way wet and the filter effect's metaknob was all the way right, completely silencing the deck. I have my mapping set up to set the initial position of the software knobs to the position of the hardware knobs on startup, so the knobs may have accidentally been turned that way during transit to my gig. With this PR, that situation would not happen because each effect would have to be explicitly enabled by the user when they want to use it.
Making the deck enable switches persistent allows controllers lacking buttons to control which effect units are active on which decks to use effects conveniently. This approach is better than requiring the controller's mapping to set the enable switches in its init() function because the user may want to change their defaults and change the switches throughout a set. The user would have to enable the effect units on their preferred decks once and could leave them that way indefinitely if they choose, but users who want otherwise won't have their preferences overriden by the controller mapping's init() function.