|
|
|
10-16-2008, 03:35 AM
|
#1
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,681
|
Real FX parameter values
Some (all?) VSTi(s) can provide "real" parameter values to the host. By "real" I mean using the units relevant to the parameter. Can we have the same in Reaper? This would make the VST(i)s much easier to set and use, imo.
At the moment, the envelope values are all in the range 0.00 to 1.00, which can be difficult to interpret in terms of, say, Cutoff Frequency, Q value, delay time, attack time, decay time, step size etc etc.
Here's a couple of screenshots of the same VST (Voxengo's Tempo Delay, wrapped in asseca's mGUI) in Reaper and XT2. I have automated the Left Delay and Left Feedback parameters:
[IMG]http://img384.**************/img384/9185/dsr252fxparms01bd5.th.png[/IMG][IMG]http://img384.**************/images/thpix.gif[/IMG]
[IMG]http://img413.**************/img413/5180/dsxt2fxparms01ke8.th.png[/IMG][IMG]http://img413.**************/images/thpix.gif[/IMG]
Big pics:
http://img384.**************/img384/9...parms01bd5.png
and
http://img413.**************/img413/5...parms01ke8.png
- the VST reports the "real" parameter values to the mGUI wrapper in both hosts
- XT2 receives the "real" values and displays them
- Reaper uses the 0.00 to 1.00 scale
-----
While I'm here, a related FR:
A Preference to display the envelope point values in a multiline pop-up window
- I find that these are easier to read (less eye movement?)
- I have mocked up a couple of suggestions, at the bottom of the Reaper screenshot.
I've also posted a related BR:
http://forum.cockos.com/showthread.php?t=27423
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
10-16-2008, 04:45 AM
|
#2
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 15,821
|
Believe it or not, there is *no way* in VST to get the formatted (real) value of a parameter without actually changing the VST parameter and then asking the plugin for the formatted value. Reaper shows the formatted value in contexts where it's OK to change the plugin knob while displaying the value, but not otherwise.
If there's a difference between Reaper and other hosts in the same exact context, it's because those other hosts are moving the plugin knob to get the formatted value, and then maybe moving it back. This can cause problems if the knob actually shouldn't be moving at that exact instant in time.
There is a Reaper extended-VST plugin call "tell the host the formatted value without actually moving the knob", which Reaplugs and a few 3rd party plugins support. But that's really all we can do.
Last edited by schwa; 10-16-2008 at 04:48 AM.
|
|
|
10-16-2008, 08:27 AM
|
#3
|
Human being with feelings
Join Date: Apr 2007
Location: Portugal
Posts: 21
|
Quote:
Originally Posted by schwa
Believe it or not, there is *no way* in VST to get the formatted (real) value of a parameter without actually changing the VST parameter and then asking the plugin for the formatted value. Reaper shows the formatted value in contexts where it's OK to change the plugin knob while displaying the value, but not otherwise.
If there's a difference between Reaper and other hosts in the same exact context, it's because those other hosts are moving the plugin knob to get the formatted value, and then maybe moving it back.
|
What I do in mGUI and asHost is first use effGetParamName() and then effGetParamDisplay() for the published value and effGetParamLabel() for the published units.
And NO, I don't "change the plugin knob" or use any other nasty trick ... ;-)
This seems to work with most plugins which follow the full VST specification, even with Synthedit plugins.
However it appears SynthMaker does not return anything using the standard effGetParamDisplay()/effGetParamLabel().
|
|
|
10-16-2008, 08:36 AM
|
#4
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
Yeah, please bring real plugin values to the envelope. Afaik this works fine in Cubase with most plugins.
|
|
|
10-16-2008, 08:46 AM
|
#5
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 15,821
|
This has come up a million times. As far as I know, you can get the display (formatted) value for the current knob setting. You can ask the plugin, "what is the formatted value for the current knob setting in the units that you show to the user." What you can't say is, "what would the formatted value for this knob be if we moved it here", unless you actually move the knob.
Here are the relevant lines from the VST SDK:
effGetParamDisplay, ///< [ptr]: char buffer for parameter display
case effGetParamDisplay: getParameterDisplay (index, (char*)ptr); break;
The spec is "here is the knob index, give me the formatted value for that knob." The spec would need to be "here is the knob index and the proposed knob value, give me the formatted value without changing the knob."
In other words, all you can get is the formatted value for the current knob setting.
So, if you're in a context where you don't want to actually move the knob (like, if you're adjusting anything but the current automation node, while playing back), you can't get the formatted value from the plugin, unless you do some awful workaround like, testing a bunch of knob values at startup time and remembering the formatted values.
The Reaper VST extended calls ( http://www.reaper.fm/sdk/vst/) include this one, which solves the problem for plugins that support it:
effVendorSpecific(effGetParamDisplay, parm, buf, val)
Gets the formatted display of a particular value for a parameter. This REAPER uses for example when displaying the value of a VST's automated parameter on an envelope tooltip.
Last edited by schwa; 10-16-2008 at 08:51 AM.
|
|
|
10-16-2008, 08:54 AM
|
#6
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
Quote:
Originally Posted by schwa
What you can't say is, "what would the formatted value for this knob be if we moved it here", unless you actually move the knob.
|
What means "move the knob"? Do you have to move it to a different value, or is it also possible to make a "fake" move from say "2" to "2" to get the formatted value without really moving the knob?
|
|
|
10-16-2008, 09:09 AM
|
#7
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 15,821
|
No, that's my whole point, you can't do a "fake" move.
|
|
|
10-16-2008, 09:13 AM
|
#8
|
Human being with feelings
Join Date: Apr 2007
Location: Portugal
Posts: 21
|
I get the feeling we have a "Babelonic" confusion here:
A host can only show the formatted parameter-value for the CURRENT value of each parameter, BUT a host CANNOT show formatted parameter-values for on a time-line (i.e. a fake knob-move) ... ;-))
[edit]I just checked: eXT2 shows the CURRENT parameter value, the other values on the Time-Line(Envelope) are not shown at all.[/edit]
Last edited by asseca; 10-16-2008 at 09:29 AM.
|
|
|
10-16-2008, 09:14 AM
|
#9
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
I'm not sure how it works in other hosts, but even asseca said he doesn't need to move a knob for it!?
Quote:
Originally Posted by asseca
And NO, I don't "change the plugin knob" or use any other nasty trick ...
|
|
|
|
10-16-2008, 09:16 AM
|
#10
|
Human being with feelings
Join Date: Apr 2007
Location: Portugal
Posts: 21
|
Quote:
Originally Posted by Dstruct
I'm not sure how it works in other hosts, but even asseca said he doesn't need to move a knob for it!?
|
Please read post #8 ... ;-)
|
|
|
10-16-2008, 09:49 AM
|
#11
|
Human being with feelings
Join Date: Apr 2007
Location: Portugal
Posts: 21
|
Quote:
Originally Posted by schwa
|
Excellent idea ... :-))
I am afraid very few plugins will support this, unless these kind of calls are supported by multiple hosts, i.e. this becomes some kind of extension-standard ... :-((
Theoretically there is a way around this, but it will be a bit akward to code and use:
-- the host needs to record, say 1000 string values (0.1% accuracy), and keep these in a table in memory for each displayed parameter time-line ...
|
|
|
10-16-2008, 11:47 AM
|
#12
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
Quote:
Originally Posted by schwa
The Reaper VST extended calls ( http://www.reaper.fm/sdk/vst/) include this one, which solves the problem for plugins that support it:
effVendorSpecific(effGetParamDisplay, parm, buf, val)
Gets the formatted display of a particular value for a parameter. This REAPER uses for example when displaying the value of a VST's automated parameter on an envelope tooltip.
|
Aleksey from Voxengo doesn't really seem to be interested in implementing these extensions:
http://www.voxengo.com/forum/ar/1926
Claes from Vember Audio said he might implement it some day. But until now nothing happened: http://forum.vemberaudio.se/index.php/topic,1018.0.html
|
|
|
10-16-2008, 12:24 PM
|
#13
|
Human being with feelings
Join Date: May 2006
Posts: 2,373
|
Quote:
Originally Posted by Dstruct
|
I started putting the Cockos effGetParamDisplay into my new VSTs . Does that make me any cool?
Anyway I think that this issue is just another proof that the VST plug-in (de facto) standard isn't well thought trough, however it is at least a standard for FX plug-ins.
|
|
|
10-16-2008, 01:01 PM
|
#14
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,746
|
Quote:
Originally Posted by LOSER
I started putting the Cockos effGetParamDisplay into my new VSTs . Does that make me any cool?
Anyway I think that this issue is just another proof that the VST plug-in (de facto) standard isn't well thought trough, however it is at least a standard for FX plug-ins.
|
Well it is indeed extensible, the real problem is that developers aren't willing to cooperate... If some plug-in authors said "hey we have extensions to do X" and it was something useful, we'd totally use it. but noooooo....
|
|
|
10-18-2008, 05:31 AM
|
#15
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 15,821
|
|
|
|
10-18-2008, 05:38 AM
|
#16
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
Yeah, cool
|
|
|
11-03-2008, 10:19 AM
|
#17
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
Justin, schwa:
Quote:
Originally Posted by Aleksey Vaneev
Well, what a pity to implement the feature just to find out that Reaper does not use it - my plug-in does not receive any "vendor specific" calls at all from Reaper.
|
http://www.voxengo.com/forum/ar/1926
|
|
|
11-04-2008, 03:50 AM
|
#18
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
Quote:
Originally Posted by Aleksey Vaneev
By the way, I have just posted Overtone GEQ 1.5.3 beta version which supposedly implements support of this extension.
|
http://www.voxengo.com/files/Voxengo...nVST_setup.zip
Hopfully you can help Aleksey to get it working ...
FIXED (Overtone GEQ 1.8)
Last edited by Dstruct; 02-25-2010 at 11:05 AM.
|
|
|
11-20-2008, 09:14 AM
|
#19
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
bump
any hints?
|
|
|
11-20-2008, 10:06 AM
|
#21
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
Thanks schwa!
FIXED (Overtone GEQ 1.8)
Last edited by Dstruct; 02-25-2010 at 11:06 AM.
|
|
|
11-21-2008, 05:49 AM
|
#22
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 15,821
|
Looks like Voxengo has this working. Hooray!
|
|
|
11-21-2008, 10:16 AM
|
#23
|
-blänk-
Join Date: Jun 2008
Posts: 11,359
|
Cool stuff! How can we convince more plug-developers to use that method?
|
|
|
09-23-2009, 07:47 AM
|
#24
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 15,821
|
from http://forum.cockos.com/project.php?issueid=713:
Quote:
Originally Posted by mabian
But I can tell you that SONAR can show correct values for plugins that don't show correctly in REAPER.
Create envelopes in SONAR 8.3.1 and REAPER 3.11 for Cakewalk Channel Tools Gain L (dB scale) parameter or Tone2 Warmverb Fx1Par (percentage scale) parameter.
In SONAR envelope tooltips show correct "real" values, in REAPER they are always 0.00-1.00; so there must be a more compatible way to do it...
|
It's possible other hosts have their own unofficial communication with their own plugins to solve this problem.
As described in detail above, the problem can be solved with the Reaper extended VST calls, which are supported by Reaplugs, Schwa and Stillwell, LOSER, some Voxengo plugins and others. I am not aware of any other open solution.
|
|
|
10-04-2009, 05:50 AM
|
#25
|
Moderator
Join Date: Aug 2007
Location: Italy
Posts: 4,327
|
Ok, but then I have a question: why the REAPER "generic UI" mode for VST GUIs shows correct scaled values (for many VSTs) but the same VST shows 0.0->1.0 values in envelopes?
- Mario
|
|
|
10-04-2009, 07:35 AM
|
#26
|
Human being with feelings
Join Date: Jun 2009
Location: South, UK
Posts: 14,218
|
Quote:
Originally Posted by mabian
Ok, but then I have a question: why the REAPER "generic UI" mode for VST GUIs shows correct scaled values (for many VSTs) but the same VST shows 0.0->1.0 values in envelopes?
- Mario
|
Good point
|
|
|
10-06-2009, 08:27 AM
|
#27
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 15,821
|
Explaining why this bug report was closed as unfixable: http://forum.cockos.com/project.php?issueid=1294
Reaper extends the VST spec to allow displaying the correctly formatted value on the envelope, but there's no way to go the other way, to convert the user's typed-in string back to a normalized value.
For example for a program change envelope, the "formatted value" would be the name of a preset, but if a user types some words in the value box, there's no way to get an envelope value from the words.
Also Mabian, do you have an example of a VST plugin that is inconsistent in the way you describe?
|
|
|
10-06-2009, 08:34 AM
|
#28
|
Moderator
Join Date: Aug 2007
Location: Italy
Posts: 4,327
|
Quote:
Originally Posted by schwa
Explaining why this bug report was closed as unfixable: http://forum.cockos.com/project.php?issueid=1294
Reaper extends the VST spec to allow displaying the correctly formatted value on the envelope, but there's no way to go the other way, to convert the user's typed-in string back to a normalized value.
For example for a program change envelope, the "formatted value" would be the name of a preset, but if a user types some words in the value box, there's no way to get an envelope value from the words.
Also Mabian, do you have an example of a VST plugin that is inconsistent in the way you describe?
|
Kjaerhus Classic Reverb, freebie. Melda Production MVibrato, freebie (example rate parameter in the latter). They show correct values in "no GUI" mode, but wrong value in envelopes.
Actually, most VSTs I tried do the same.
- Mario
|
|
|
10-06-2009, 08:41 AM
|
#29
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 15,821
|
Sorry, I misunderstood your point mabian.
The generic UI shows the correct value because you are setting the value at that moment when you move the slider.
Reaper says: plugin, please set your parameter to 0.234234234. What formatted value is that? "-35dB left"? OK we will write that next to the slider.
For an envelope tooltip, Reaper can't say that. Reaper has to say: plugin, what would the formatted value be if I set your parameter to 0.234234234? If the plugin says "duh, I dunno" then all Reaper can do is write 0.234234234. If the plugin says "I support number one top most excellent Cockos VST extensions and therefore I can tell you the answer is -35dB left!" then Reaper can write that.
Which is the whole point of this thread
|
|
|
10-06-2009, 08:55 AM
|
#30
|
Moderator
Join Date: Aug 2007
Location: Italy
Posts: 4,327
|
Quote:
Originally Posted by schwa
Sorry, I misunderstood your point mabian.
The generic UI shows the correct value because you are setting the value at that moment when you move the slider.
|
Uhm, but I don't move the slider and the values are already there... maybe the work is done when reloading the project and setting plugin parameters?
Thanks,
Mario
|
|
|
10-06-2009, 09:59 AM
|
#31
|
Human being with feelings
Join Date: Sep 2009
Posts: 262
|
Got this nasty dev idea while reading the thread:
- Instantiate the non-Cockos VST Ext compatible plugin in a very basic VST host to tweak all parameters of from 0.0 to 1.0 and retrieve the "value to string" conversion scheme (at least the easy ones: dB, Left/right %d, on-off, etc)
- Implement Cockos VST extension "effGetParamDisplay" in a new .cpp. Just the extension, nothing else.
- Create an appropriate VST project to combine the current plugin .dll with this new piece of code.
- There you go, extended plugin!
Quite a boring task, may not work on a few plugins with specific copy prevention systems, but if someone is really dying for "real values" envelopes this could be one way to go...
(I wont!)
Last edited by Padre_PC; 10-06-2009 at 10:02 AM.
|
|
|
01-28-2010, 07:36 PM
|
#32
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
While doing some VST hosting experiments, I came up with something like this :
Code:
if (m_aeffect)
{
m_vstParamIndex=paramIndex;
char paramDisplay[256] = {0};
m_aeffect->dispatcher (m_aeffect, effGetParamDisplay, m_vstParamIndex, 0, paramDisplay, 0);
if (m_paramValueLabel)
m_paramValueLabel->setText(paramDisplay);
// store current param value from plugin
qreal val=m_aeffect->getParameter(m_aeffect,m_vstParamIndex);
m_vstParamMapping.clear();
for (int i=0;i<1000;i++)
{
qreal normalizedVal=1.0/999.0*i;
m_aeffect->setParameter(m_aeffect,m_vstParamIndex,normalizedVal);
m_aeffect->dispatcher (m_aeffect, effGetParamDisplay, m_vstParamIndex, 0, paramDisplay, 0);
QString dispStr(paramDisplay);
// we hope dividing the parameter display string by spaces mostly works
QStringList sl=dispStr.split(" ");
bool ok;
for (int j=0;j<sl.size();j++)
{
qreal value=sl[j].toDouble(&ok);
if (ok)
{
m_vstParamMapping.append(QPair<qreal,qreal>(normalizedVal,value));
// if the first valid number found isn't the correct one,
// there's hardly any point in finding more numbers, we could not
// decide anyway (easily) what is the correct one
// perhaps could scan for only changing number elements in the string, though
break;
}
}
}
qDebug() << m_vstParamMapping;
qDebug() << "vst param"<<m_vstParamIndex<<"produced"<<m_vstParamMapping.size()<<"scaled values";
// restore param in plugin
m_aeffect->setParameter(m_aeffect,m_vstParamIndex,val);
}
This needs to be done for each parameter in the VST plugin. The current code can completely fail if the parameter strings outputted by the plugin are not suitable. However, the string scanning code could of course be refined further. This could potentially cost a lot of memory per plugin too. Think of a plugin that has 10000 parameters. Each will be scanned for 1000 values which might all end up in the tables. edit : Still, this would be more memory efficient in many cases than storing all 1000 values as text strings, assuming the strings would on average be longer in memory than 2 floating point values. Obvious downside with this approach is that the plugin parameter unit names are not displayable.
edit : Anyway, I just posted this here to demonstrate the somewhat involved nature of the problem. (Not suggesting Cockos to use something like the above code to hack around the problem with usual VST plugins! )
Cockos VST extensions by the way work great for envelope tooltips and such! I only wish more developers besides Loser and Voxengo would support it...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Last edited by Xenakios; 01-29-2010 at 03:54 AM.
|
|
|
02-04-2010, 06:50 AM
|
#33
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
Quote:
Originally Posted by schwa
Looks like Voxengo has this working. Hooray!
|
But still not fully!
When editing envelope point values in REAPER (rightclick -> Set point value) the latest Voxengo plugins (Stereo Touch 2.1 for example) still just report 0.000-1.000 range.
The envelope display is fine (correct ranges there). Why can't REAPER just use that display range in the edit fields too?
Aleksey also says that this should already work:
Quote:
Originally Posted by Dstruct
Aleksey,
could you also please integrate that second extension:
effVendorSpecific(0xdeadbef0, parm, rangeptr, 0.0)
Queries the range of a parameter (allowing the plug-in to use more than the 0.0...1.0 range that VST defines). The host does something like:
double range[2]={0,1};
if (effect->dispatcher(effect, effVendorSpecific, 0xdeadbef0, parm_index, range, 0.0)>=0xbeef)
{
// range[0]..range[1] is the range instead of 0..1
}
Or, to implement it on the plug-in side (in addition to responding to effCanDo/"hasCockosExtensions"):
case effVendorSpecific:
if (index == 0xdeadbef0 && ptr && value>=0 && value<NUM_PARAMS)
{
((double *)ptr)[0] = min_val;
((double *)ptr)[1] = max_val;
return 0xbeef;
}
?
Currently when editing envelope point values in REAPER (rightclick -> Set point value) your latest plugins still just report 0.000-1.000 range.
Would be cool to have the correct ranges in the edit field too. Thanks!
|
Quote:
Originally Posted by Aleksey Vaneev
Seems to be a "strange" extension. Reaper could use that first extension to query extreme values. I find it this second extension a bit unstable, because it can't represent arbitrary values like compressor ratio "1:10".
Maybe you are not quite understood this extension. Voxengo (and most VST) plug-ins expect 0..1 automation values - while this extension seems to try to allow bigger range for some esoteric reason. I do not think it's related to representation of extreme values. I suggest you to ask Reaper folks to fix that 0.000 and 1.000 reading in Reaper - nothing stops them from getting real values.
|
http://www.voxengo.com/forum/ar/1926/?offset=20
FIXED (Stereo Touch 2.3)
Last edited by Dstruct; 02-25-2010 at 11:06 AM.
|
|
|
02-04-2010, 07:15 AM
|
#34
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 15,821
|
The envelope point editing requires a new addition to the extended VST calls. It's explained here: http://www.cockos.com/reaper/sdk/vst...xt.php#vst_ext , under "effString2Parameter".
The issue is that in that context, the user can enter a new value for that envelope point, so the plugin needs to be able to convert parameter values to strings, and also convert strings back to parameter values without actually setting the parameter.
This is a fairly specialized use, in fact we haven't even implemented it for all Reaper plugins. ReaControlMIDI is the only one that comes to mind, per this issue ticket: http://forum.cockos.com/project.php?issueid=1294 .
|
|
|
02-04-2010, 07:21 AM
|
#35
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
Ok. Complicated shit. I'll post it in the Voxengo forums.
FIXED (Stereo Touch 2.3)
Would be nice if you could update all the Cockos plugins with that too ...
Last edited by Dstruct; 02-25-2010 at 11:06 AM.
|
|
|
02-04-2010, 09:56 AM
|
#36
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
Quote:
Originally Posted by schwa
The envelope point editing requires a new addition to the extended VST calls. It's explained here: http://www.cockos.com/reaper/sdk/vst...xt.php#vst_ext , under "effString2Parameter".
The issue is that in that context, the user can enter a new value for that envelope point, so the plugin needs to be able to convert parameter values to strings, and also convert strings back to parameter values without actually setting the parameter.
|
New reply:
Quote:
Originally Posted by Aleksey Vaneev
Well, there's obviously a mistake in effString2Parameter "plug-in side" implementation, because I have this implementation in "vendor specific" part already - it's for different purpose.
|
http://www.voxengo.com/forum/ar/1926/?offset=20
|
|
|
02-20-2010, 04:26 AM
|
#37
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
Schwa, Aleksey needs more details!
Quote:
Originally Posted by Alexsey Vaneev
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;
}
}
|
Quote:
Originally Posted by Alexsey Vaneev
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.
|
http://www.voxengo.com/forum/ar/1926/?offset=30
DONE
Last edited by Dstruct; 02-25-2010 at 10:55 AM.
|
|
|
02-20-2010, 06:04 AM
|
#38
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 15,821
|
I replied at http://www.voxengo.com/forum/ar/1926/?offset=30:
Quote:
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.
|
|
|
|
02-20-2010, 06:27 AM
|
#39
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
Thanks!
DONE
Last edited by Dstruct; 02-25-2010 at 10:55 AM.
|
|
|
02-25-2010, 11:09 AM
|
#40
|
Human being with feelings
Join Date: Jul 2006
Posts: 12,482
|
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 03:42 AM.
|