Old 02-01-2017, 04:01 AM   #1
Vlada
Human being with feelings
 
Join Date: Jan 2017
Posts: 2
Default VST3 Host preset selection is wrong (SOLVED)

While testing one of our new plugin with 14 host presets, I have found there could be a bug in VST3 host preset menu handling. The normalized value sent to plugin from Reaper seems to be wrong this way:
- the first preset sends 0.f - OK.
- the second preset sends 1.f/14.f - BAD,
- ...
- the last preset sends 13.f/14.f - BAD.

This causes troubles when trying to select presets from the second half where normalized->int value denormalisation gets wrong indexes.

So the problem is in the divider value that should be 13.f (the number of presets -1). This is the way it works correctly for example in Cubase.

System info:
Reaper 5.311 both in Win (7/10) and Mac (10.6.8-10.12).
Vlada is offline   Reply With Quote
Old 02-01-2017, 05:02 AM   #2
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,174
Default

I believe you can handle this in your plugin by having IEditController:: plainParamToNormalized() return whatever you think it should return. REAPER calls that function with the preset index, and only normalizes the value if the plugin's plainParamToNormalized() doesn't do anything.
schwa is offline   Reply With Quote
Old 02-01-2017, 06:49 AM   #3
Vlada
Human being with feelings
 
Join Date: Jan 2017
Posts: 2
Default

Quote:
Originally Posted by schwa View Post
I believe you can handle this in your plugin by having IEditController:: plainParamToNormalized() return whatever you think it should return. REAPER calls that function with the preset index, and only normalizes the value if the plugin's plainParamToNormalized() doesn't do anything.
Thank you for fast response. I have fixed it the way you advised, it works now.

Thanks a lot.
Vlada is offline   Reply With Quote
Old 02-05-2017, 03:59 AM   #4
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 495
Default

Quote:
Originally Posted by schwa View Post
I believe you can handle this in your plugin by having IEditController:: plainParamToNormalized() return whatever you think it should return. REAPER calls that function with the preset index, and only normalizes the value if the plugin's plainParamToNormalized() doesn't do anything.
Same here, works now perfectly, thank you :-)
__________________
www.tb-software.com/TBProAudio

Last edited by TBProAudio; 02-05-2017 at 09:50 AM.
TBProAudio is offline   Reply With Quote
Old 03-11-2017, 05:44 AM   #5
wibem
Human being with feelings
 
Join Date: Feb 2017
Posts: 37
Default

I think that I have the same issue with a vst3-instrument (Halion Sonic3), which doesn't react to program-change-messages . Can someone explain, where to find the IEditController and what are the steps to repair this issue.

Last edited by wibem; 03-11-2017 at 05:57 AM.
wibem is offline   Reply With Quote
Old 03-11-2017, 06:04 AM   #6
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,472
Default

If even Steinberg's own VST3 plugin handles this issue in a way incompatible to Reaper's implementation, I suppose the next Reaper update will take care of it.

-Michael
mschnell is offline   Reply With Quote
Old 03-11-2017, 07:33 AM   #7
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,162
Default

Quote:
Originally Posted by wibem;1816086+
Can someone explain, where to find the IEditController and what are the steps to repair this issue.
This is something only the developer of the plugin can do. Not user.
EvilDragon is offline   Reply With Quote
Old 03-11-2017, 08:22 AM   #8
ivansc
Human being with feelings
 
Join Date: Aug 2007
Location: Near Cambridge UK and Near Questembert, France
Posts: 18,804
Default

I just copied and pasted this to Antares. Who knows? I my finally get presets that work in Harmony Engine after several years of malfunctioning....
__________________
Brexit Schmexit. Lets have a violent revolution instead. Bagsy the first go with a nuke! (Here, Moggy Moggy...)
ivansc is offline   Reply With Quote
Old 07-04-2019, 09:52 AM   #9
earlevel
Human being with feelings
 
Join Date: Dec 2015
Posts: 304
Default

Quote:
Originally Posted by schwa View Post
I believe you can handle this in your plugin by having IEditController:: plainParamToNormalized() return whatever you think it should return. REAPER calls that function with the preset index, and only normalizes the value if the plugin's plainParamToNormalized() doesn't do anything.
You need to implement normalizedParamToPlain too, if the plugin implements the norm of 1 being the last menu item, otherwise Reaper will ask for the wrong preset name for display and menu item checkmark.
earlevel is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.