Premium Membership - All Voxengo Plugins at a Fixed One-Time Fee - Click Here For More Info
Forums     Discussions     Announces, Releases and Discussions REAPER VST Extensions


Oops, yes, that's a typo in the Cockos doc, it should read "index == effString2Parameter" instead of "index == effGetParamDisplay", and the example implementation is stupid as well, it should just read something like: sprintf(ptr,"%f",atof(ptr)); (hopefully modulo some general safety practices).

But as I said in what was quoted above, this is a specialized use that we (Cockos) haven't even implemented for most of our own plugins.



OK, just let me somebody know when it's well documented - it's not a problem to implement.

OK, this page should be correct now:

Thanks for catching the error.

Thanks, but I still do not get it.  You are calling the function String to parameter (automation value intended), yet the function converts floating point value to string.

case effVendorSpecific:

if (index == effString2Parameter && ptr)


if (value>=0 && value<NUM_PARAMS)


float val = atof(ptr);

double normval = (val-minval)/(maxval-minval);

sprintf(ptr, "%f", normval);

return 0xbeef;



Any news here?  Doesn't work yet with Stero Touch 2.2 ...

Dandruff, as I have noted above, this extension does not make sense - Reaper developers should fix this first.  Namely, there is no parameter index used in the example, and I'm not quite sure why "sprintf" is required at all.

Yeah, my question was for schwa too.  I've bumped to wake him up ;)

For a more complete example, say the plugin parameter number 7 has two formatted values that the plugin displays: "mono" which maps to parameter value 0.0f, and "stereo" which maps to parameter value 1.0f.

The host has some interface where the user can type in the value they want to set for the parameter, say the user types in "mono." The host then calls the plugin:

opcode: effVendorSpecific

index: effString2Parameter

value: 7

ptr: "mono"

The plugin would return

ptr: "1.0"

by doing something like this:

if (!stricmp(ptr, "mono")) { strcpy(ptr, "0.0"); return 0xbeef; }

if (!stricmp(ptr, "stereo")) { strcpy(ptr, "1.0"); return 0xbeef; }

return 0;

That's what we have implemented.  But, if you have a better suggestion for how to implement this (converting the user's string to a parameter value without changing the current value of the parameter), that would be fine too, we can change the implementation.

OK, thanks for refining this to me!  I will implement this feature soon.  I thought that a direct "*(float*)ptr=value;" copy would be a more straight-forward way to return values.

BTW, I've just posted a fixed Beeper plug-in (Global settings window open bug fixed) which includes implementation for this "set point value" function in Reaper.
This topic was last updated 180 days ago, and thus it was archived.  Replying is disabled for this topic.