There's a "Link Channels" LED in LADSPA mono effects. The following does not work:
This sounds like a bug to me, because the LED looks like that knob was linked.
The issue also occurs on the Lv2 branch, since the code was copied from LADSPA.
Can anyone confirm that this occurs, and consider it a bug?
It's hard to believe to have a bug in there for such a long time...
I can reproduce it already with a single click to "Link Channels" LED.
But for me there's also some drawing problem. I need to reopen LADSPA modal window or cover knob 2 with other modal window for a moment to visually see different values of knobs when they are linked.
Knob values get switched. Left knob gets the value of right knob and vice versa from what I see after redrawing the modal window. I would expect to see both knobs have the value of knob 2.
It seems like there's a bug with AutomatableModel::linkModels. You can trigger a similar bug without any LADSPA plugins:
It means this bug has nothing to do with LADSPA stuff. This one looks like a design flaw in AutomatableModel.
If we try to link model A and model B. Let's consider some situations:
@PhysSong I'm not sure why you changed the title. In the OP, I can't see where values are swapped. They are not changed visibly at all.
Also, what do you mean by "B is for the left channel(the original case)"? Do you mean B is a knob of a left channel of another LADSPA stereo effect?
In the OP, I can't see where values are swapped. They are not changed visibly at all.
Try this:
You can see that the values effectively gets swapped. The visualization doesn't reflect this as @karmux reported, though.
Also, what do you mean by "B is for the left channel(the original case)"?
Sorry for the typo, it's the control for the right channel of the same effect.
You can see that the values effectively gets swapped. The visualization doesn't reflect this as @karmux reported, though.
Wow, didn't see this until now!
User Ctrl+drags A and drops on B
A is for the left channel of a mono LADSPA effect, and B is for the right channel (the original case)
Assuming the two models should have the same value after linking, which value should we take?
As dragging a knob in LMMS usually means copying the value of that knob somewhere else, I'd expect that the resulting value for both would be the value of "A". I'd expect this both if A is on the left and if A is on the right side, because you probably want a fast way to set the values of both channels to either A or B.
As dragging a knob in LMMS usually means copying the value of that knob somewhere else, I'd expect that the resulting value for both would be the value of "A". I'd expect this both if A is on the left and if A is on the right side, because you probably want a fast way to set the values of both channels to either A or B.
@PhysSong I want to change my opinion. Both should have the value of B, because: If you drag a knob on an automation pattern, you want the knob to be automated by the pattern. So if you drag a knob A on a knob B, you want the knob A to be automated by knob B. Can you agree?
@PhysSong I did some debugging. AutomatableModel::m_value is never being changed during the linking - not for any of the two. However, AutomatableModel::linkModel pushes back the other model to m_linkedModels for each, and then AutomatableModel<float>::value() returns AutomatableModel::controllerValue(), which returns m_linkedModels.first(). This should explain the crossover values. Do you think that explenation is correct?
I'd like to provide a fix, but there are a few points...
Maybe this requires a poll :smile:
Poll:
Discussions are also possible and may outplay the voting.
You ctrl-drag to put a knob under automation control, so dragging A to B should make A the slave.
When unlinking, I'd be pretty surprised if the slave knob snapped back to a value it might've had before a lot of twiddling happened, maybe days ago.
You ctrl-drag to put a knob under automation control, so dragging A to B should make A the slave.
True, but some people have noted that ctrl-dragging an automation pattern to a knob should be enabled and do the same as ctrl-dragging a knob to an automation pattern.
Intuitively for me, I would expect to drag the Master knob onto the Slave. This is also how Serum behaves. It also means there's no ambiguity about what happens if I drag a knob onto several other knobs, the first simply controls all the rest.
I can't deny that this would be inconsistent with the current automation behavior, but I think its worth it.
Thanks for voting! Looks like most people want that dragging A on B makes B take A's value.
Now, to the implementation:
m_linkedModels somehow differ between linked slaves and linked masters.AutomatableModel::controllerValue() only use the first master in m_linkedModels, and in case none exists, return its own value.@PhysSong are you OK with this?
I'd push a PR the next days to test if that works.
To reflect PR #5336: This PR is a minimal solution to this issue (more minimal than I planned above). Minimal but sufficient, so it fixes the bugs but does not have large impact on the stable code branch.
@JohannesLorenz Do you mean you want to add a hierarchy to AutomatableModel eventually?
@PhysSong Not in the fixing PR. Like mentioned, the PR is just a minimal solution. A hierarchy would be nice, but after the PR I think we have more important issues.
Solved by #5336
Most helpful comment
Poll:
Discussions are also possible and may outplay the voting.