-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add option to connect last changed model to AutomationClip #7622
base: master
Are you sure you want to change the base?
Conversation
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 am okay with this.
Co-authored-by: saker <[email protected]>
Oops, I messed up the indent. I also think we can move |
|
That's fine. Yeah, The getter method is nice because it only allows read access to the variable. |
Maybe I don't want to merge just yet: There's something I think I can do to remedy the unknown model name problem, at least when making clips. |
Also, has anyone tested this with a VST? |
Automation with VST is unusable because of the spike in CPU, so there may not be a big use case for that at the moment.
The problem is basically that when constructing automatable models, it calls |
I'm having issues with this as We should stop storing Another problem I am seeing is if the project already has automation or LFO controllers attached to an |
I have newfounded doubts that should be addressed.
Nevermind, it seems like the "consistently changing the model value" issue isn't there. I thought it was. Still don't like storing |
Some This is not necessarily an issue, but it makes the code a little less pretty since more checks have to be done and the connect statement appears in two places. It works, but it doesn't feel optimal, and it's easy to cause segfaults if I miss something. |
Could you give an example? |
When you add a new automation track (for example), it first creates the Mute and Solo models, but they appear to be temporary as they are soon replaced with new Mute and Solo models. (I suspect this may be due to a call to This is a small excerpt of me printing
Almost all models do this, so lmms is spamming debug info like this when it starts up. |
Got the program to crash by adding a mixer channel and then right-clicking on an automation clip. We might need to rethink the solution a bit. |
I cannot reproduce the crash. Did you add the mixer channel after adding the clip? Also did you change any knobs before doing it, or was it a fresh project? |
No, I just added a mixer channel with the "+" button, and then right clicked on an automation clip. I honestly don't know why you can't reproduce it. I'll try again soon. Edit: The clip was already created. I right clicked on an already existing automation clip after adding the mixer channel. The project was completely empty but for the automation clip and the extra mixer channel. I don't think I changed any knobs before doing it. |
I can now reproduce the crash. It appears it only occurs when starting from an empty project. |
Is P.S. |
This PR adds a new context menu action to
AutomationClipView
s which allows users to connect the last changed model.A pointer to the last changed model is kept as a static variable
AutomatableModel::s_lastChangedModel
, which is updated inAutomatableModel::setValue()
. When theAutomationClipView
context menu is constructed, ifAutomatableModel::s_lastChangedModel
is not a nullptr and if the model's display name is not empty (Many hidden models have empty names, and it would be confusing to show them to users), then an option to connect it is given.Demo:
2024-12-17.13-51-06.mp4