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

[Kicker plugin] Automation connection of a particular knob is not restored when reopening a project #6797

Closed
M4rotte opened this issue Aug 3, 2023 · 4 comments · Fixed by #6670
Labels

Comments

@M4rotte
Copy link

M4rotte commented Aug 3, 2023

Hi,

I automated multiple knobs of a Kicker plugin, using some automation tracks in the song. I noticed that the connection of the "End distortion" is systematically not restored after closing/reopening the project. This never happen with another automated knob of this plugin, but with "End distortion" it happen every times.

Version used : LMMS 1.3.0-alpha.1.315+g57e7fdc53 (Linux x86_64, Qt 5.15.8, GCC 12.2.0)

@M4rotte M4rotte added the bug label Aug 3, 2023
@zonkmachine zonkmachine self-assigned this Aug 4, 2023
@zonkmachine
Copy link
Member

I can verify this. It is my understanding that this is a problem on loading. I believe it could have been introduced in #727 available in 1.1.0-RC4. I couldn't test that unfortunately since I would need an older platform for this.

Here is the code that fails:

if( _this.hasAttribute( "distend" ) )
{
m_distEndModel.loadSettings( _this, "distend" );
}
else
{
m_distEndModel.setValue( m_distModel.value() );
}
I don't know why though. It's like "distend" is invisible to the system. When I put in some code to test for all of the attributes, this is the result. Looks like some namespace voodoo to me. "distend" is clearly present in the resulting project save.

Has attribute "version"
Has attribute "startfreq"
Has attribute "endfreq"
Has attribute "decay"
Has attribute "dist"
Hasn't got attribute "distend"
Has attribute "gain"
Has attribute "env"
Has attribute "noise"
Has attribute "click"
Has attribute "slope"
Has attribute "startnote"
Has attribute "endnote"

If I instead test for the version of the plugin the loading succeeds (Quickfix below). The version number is 1 and this is defined in Kicker.h. It's not literally the same thing as testing for "distend" but pretty much. Version number 1 predates "distend". I was thinking possibly moving this code to DataFile.cpp and do a proper upgrade but that's not possible if hasAttribute("distend") doesn't work.

Quickfix:

diff --git a/plugins/Kicker/Kicker.cpp b/plugins/Kicker/Kicker.cpp
index 7d4c6fbb0..658479193 100644
--- a/plugins/Kicker/Kicker.cpp
+++ b/plugins/Kicker/Kicker.cpp
@@ -114,14 +114,19 @@ void KickerInstrument::loadSettings( const QDomElement & _this )
        m_endFreqModel.loadSettings( _this, "endfreq" );
        m_decayModel.loadSettings( _this, "decay" );
        m_distModel.loadSettings( _this, "dist" );
-       if( _this.hasAttribute( "distend" ) )
+       if( m_versionModel.value() > 0 )
        {
                m_distEndModel.loadSettings( _this, "distend" );
        }

@DomClark
Copy link
Member

DomClark commented Aug 5, 2023

Should be fixed by #6670.

@DomClark DomClark linked a pull request Aug 5, 2023 that will close this issue
@zonkmachine
Copy link
Member

Should be fixed by #6670.

And zonkmachine taps out... 😎

@zonkmachine zonkmachine removed their assignment Aug 5, 2023
@PhysSong PhysSong changed the title [Kicker plugin] Automation connection of a particular knob is not restaured when reopening a project [Kicker plugin] Automation connection of a particular knob is not restored when reopening a project Aug 6, 2023
@zonkmachine
Copy link
Member

Should be fixed by #6670.

I can confirm that this issue is fixed in #6670

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants