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

Free Distortion VST Temper resets values when project is re-opened #4500

Closed
EtornaZ opened this issue Jul 23, 2018 · 16 comments · Fixed by #4540
Closed

Free Distortion VST Temper resets values when project is re-opened #4500

EtornaZ opened this issue Jul 23, 2018 · 16 comments · Fixed by #4540

Comments

@EtornaZ
Copy link

EtornaZ commented Jul 23, 2018

I've recently installed a great distortion VST called Temper. My problem with it is that whenever I close a project with a Temper effect in it and re-open the project, the effect has reset back to its default values. This can be fixed by connecting every value to an automation track (7 values total), but that's rather annoying in cases where you're not automating.
I'm on a Windows 10 computer using the latest beta version of LMMS (1.2.0 rc6)

You can download Temper here: https://www.pluginboutique.com/product/2-Effects/30-Distortion/4378-Temper

@SecondFlight
Copy link
Member

Reminds me of #1049, but that's been closed for a while.

@zonkmachine
Copy link
Member

Sounds like this could have been fixed in #4401
Test RC7 when it's released.

@EtornaZ
Copy link
Author

EtornaZ commented Jul 24, 2018

Will do.

@PhysSong
Copy link
Member

Sounds like this could have been fixed in #4401

No, it's not. I can still reproduce this with #4401. It's also different from #1049 because Temper uses a chunk for loading/setting settings.

I don't know if this is LMMS bug or upstream one, but here's some information I found so far:

Tagging @DomClark.

@PhysSong
Copy link
Member

@DomClark
Copy link
Member

I've tested the plugin in Reaper and it works fine; in Ardour the values are restored correctly in the GUI but it seems it has reset to default values for the actual audio processing; in LMMS it resets to the default values as described. I'll investigate.

@DomClark
Copy link
Member

The settings appear to be saved correctly - the chunk in the LMMS project file matches that in the Reaper project file. The bug seems to be in loading the settings again.

@DomClark
Copy link
Member

After loading the chunk, LMMS restores the VST's currently selected program. Temper doesn't save modified programs in the chunk however, only the current state, so setting the program overrides previously saved settings.

It's not clear what the correct behaviour is here; looking around online it seems some hosts (Cubase, Ableton, etc.) set the program after the chunk whereas others (Reaper, Ardour, etc.) don't. I suppose Cubase should be the reference implementation as it's by Steinberg, but since there's inconsistency and the current implementation has this issue, I think we should change it so the program is only set if loading the chunk or parameters fails. If this causes problems for other plugins in RC7, we can revert before releasing 1.2.

@DomClark
Copy link
Member

Should I add the proposed change to #4540?

@PhysSong
Copy link
Member

if loading the chunk or parameters fails.

How can you check that?

@musikBear
Copy link

@DomClark

It's not clear what the correct behaviour is here

Imo LMMS could set all values independent of the chunk, in fact it could be omitted. LMMS only need to set changes for those controllers that is kept in the LMMS-VST-dials-array. Only those makes sense, because they are the ones that can be automated. If the plugin has controllers, we cant automate, then the plugin should not be used.
One drawback are those VSTs that has internal banks, but isent that transparent in respect to LMMS?

@DomClark
Copy link
Member

DomClark commented Sep 1, 2018

if loading the chunk or paramters fails.

How can you check that?

I worded that badly, sorry - what I mean is to change the last if to an else if in VstPlugin::loadSettings:

void VstPlugin::loadSettings( const QDomElement & _this )
{
const int num_params = _this.attribute( "numparams" ).toInt();
// if it exists try to load settings chunk
if( _this.hasAttribute( "chunk" ) )
{
loadChunk( QByteArray::fromBase64(
_this.attribute( "chunk" ).toUtf8() ) );
}
else if( num_params > 0 )
{
// no chunk, restore individual parameters
QMap<QString, QString> dump;
for( int i = 0; i < num_params; ++i )
{
const QString key = "param" +
QString::number( i );
dump[key] = _this.attribute( key );
}
setParameterDump( dump );
}
if( _this.hasAttribute( "program" ) )
{
setProgram( _this.attribute( "program" ).toInt() );
}
}

@musikBear

Imo LMMS could set all values independent of the chunk, in fact it could be omitted. LMMS only need to set changes for those controllers that is kept in the LMMS-VST-dials-array.

We already do this for plugins that don't support chunks. I don't think we should stop using chunks - they were added to the VST specification for a reason, and many plugins use them to store data beyond what is available through parameters exposed to the host. The only effect would be that some plugins won't work as well in LMMS as in other hosts, which isn't something we want.

If the plugin has controllers, we cant automate, then the plugin should not be used.

If we tell users not to use plugin foo because it doesn't behave how we like, they're not going to say "Ah yes, you're right, I'll use a different plugin", they'll say "Ugh, LMMS is rubbish; it doesn't work with plugin foo". The VST plugin standard was designed by a professional audio company and is implemented across many different hosts; if we decide we don't like how it works and do something different, we're not going to be setting a trend; people will just ignore our way and we'll just become less and less compatible with the plugins out there.

One drawback are those VSTs that has internal banks, but isent that transparent in respect to LMMS?

It is transparent to LMMS; that is one of the main uses for chunks.

Ultimately, most hosts support most plugins quite well, and if they can, there's no reason we shouldn't be able to. Sometimes there are tricky corner cases like this, but we need to work out a compromise, rather than being stubborn, running away from the standard and putting off users (who are the reason we write this software).

@PhysSong
Copy link
Member

PhysSong commented Sep 1, 2018

I worded that badly, sorry - what I mean is to change the last if to an else if in VstPlugin::loadSettings:

So does that mean you're going to make LMMS set the program only if there's neither a chunk or a parameter dump?
And just a random idea: how about setting the program before loading chunks/dumps? It seems to work a little bit better.

@musikBear
Copy link

@DomClark -okey -good arguments 👍

@DomClark
Copy link
Member

DomClark commented Sep 4, 2018

So does that mean you're going to make LMMS set the program only if there's neither a chunk or a parameter dump?

Correct.

And just a random idea: how about setting the program before loading chunks/dumps? It seems to work a little bit better.

I originally discounted this option because the program would be overwritten by the chunk/dump, but on second thoughts overwriting it wouldn't hurt, and this has the same behaviour as my suggestion when no chunk/dump is present. I think this is probably the best solution. Shall I implement this in #4540?

@DomClark
Copy link
Member

DomClark commented Sep 7, 2018

Done.

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

Successfully merging a pull request may close this issue.

6 participants