Cubase-VST-Problem - no setChunk() called - and fix


#1

If someone has the same problem, here is the solution:

An old version of my plugin had used version-number “1.1” (in the old days, this was defined in PluginCharacteristics) - which was translated to 1.1.0.0 in Cubase (i didn’t get finally why…)

After this fix ( http://juce.git.sourceforge.net/git/gitweb.cgi?p=juce/juce;a=history;f=modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp;h=9fb82bcc008675080849884808a762e10282346a;hb=99088bd0d7d837d9326cef5c9384666ee83b9648 )

the newer version of my Plugin, where i set the version to “2.5.0” in introjucer, this was translated to “2.5.0” in Cubase, which is right, but which intends Cubase not to load the plugin state infomation with setChunk (when loading an older project which used the older version), because the newer number is smaller.

Solution: just add a “.0” Version to the version-Number in Introjucer, if you update from an older juce Version, to be sure that your newer plugin has a higher version-number.


#2

oops i forget i disabled also the convertHexVersionToDecimal function to get it run, without that change newer plugins wont load the plugin state of older versions.

[code] static inline VstInt32 convertHexVersionToDecimal (const unsigned int hexVersion)
{
return (VstInt32) hexVersion;

/*	return (VstInt32) (((hexVersion >> 24) & 0xff) * 1000
                       + ((hexVersion >> 16) & 0xff) * 100
                       + ((hexVersion >> 8)  & 0xff) * 10
                       + (hexVersion & 0xff));*/
}

[/code]

and just removing the one change here, will not correct the problem, because cubase get the version-number with different methods…

http://juce.git.sourceforge.net/git/gitweb.cgi?p=juce/juce;a=history;f=modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp;h=9fb82bcc008675080849884808a762e10282346a;hb=99088bd0d7d837d9326cef5c9384666ee83b9648


#3

jules, could you check something in like this in

[code] static inline VstInt32 convertHexVersionToDecimal (const unsigned int hexVersion)
{

#ifdef JUCE_VST_USE_HEX_VERSIONNUMER
return (VstInt32) hexVersion;
#else

 return (VstInt32) (((hexVersion >> 24) & 0xff) * 1000
                       + ((hexVersion >> 16) & 0xff) * 100
                       + ((hexVersion >> 8)  & 0xff) * 10
                       + (hexVersion & 0xff));

#endif
}[/code]


#4

thanks, just saw you added the JUCE_VST_RETURN_HEX_VERSION_NUMBER_DIRECTLY - flag


#5

Wooaaah, thank you so much for pointing this out!

I can confirm this, we had exactly this issue - all worked fine in Live and Reaper, but Cubase refused to load previous versions. So, setting "JUCE_VST_RETURN_HEX_VERSION_NUMBER_DIRECTLY=1" solved the issue.