Old 07-28-2019, 09:09 AM   #1
Erriez
Human being with feelings
 
Join Date: Jun 2010
Location: The Netherlands
Posts: 177
Default Feature request to get units of a FX parameter

I'd like have an API call to retrieve the unit information of a FX parameter.

The following script displays a list of all FX parameters of the last selected FX:

https://github.com/ReaTeam/ReaScript...cused%20FX.lua

The output is for example:

Code:
Listing parameters for VST: ReaGate (Cockos)
	1 - Attack
		Real value: 0.0060000000521541
		Formatted: 3   <= units in ms missing
	...
AFAIK, it is not possible to get the FX unit information string such as "ms". Am I correct?
Erriez is offline   Reply With Quote
Old 07-28-2019, 09:22 AM   #2
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Lua: boolean retval, string buf = reaper.TrackFX_GetFormattedParamValue(MediaTrack track, integer fx, integer param, string buf)

will do it, but it does depend on the FX providing the info:

__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 07-28-2019, 09:59 AM   #3
Erriez
Human being with feelings
 
Join Date: Jun 2010
Location: The Netherlands
Posts: 177
Default

Thanks for your fast reply. I checked this with another non-Reaper plugin and you're right: It depends on the FX plugin if this is supported or not.

Last edited by Erriez; 07-29-2019 at 12:38 PM. Reason: Question not answered
Erriez is offline   Reply With Quote
Old 07-29-2019, 12:36 PM   #4
Erriez
Human being with feelings
 
Join Date: Jun 2010
Location: The Netherlands
Posts: 177
Default

I did some more investigation:



As you can see, the units are correctly displayed of the VST plugins when changing to UI mode:
* TrackFX_GetFXName() returns: "VST: ReaGate (Cockos)"
* TrackFX_GetParamName() returns: "Attack"
* TrackFX_GetFormattedParamValue() returns "3"
* Return unit in "ms" missing.

Reaper displays the units dB, ms Hz etc correctly at the right side of the slider, but I cannot find an API call to retrieve this information.

My feature request is to add a new function like TrackFX_GetParamUnits() to return "dB", "ms, "Hz" etc.
Attached Images
File Type: png GetFXUnits.png (10.0 KB, 197 views)
Erriez is offline   Reply With Quote
Old 07-29-2019, 01:51 PM   #5
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by Erriez View Post

Reaper displays the units dB, ms Hz etc correctly at the right side of the slider, but I cannot find an API call to retrieve this information.

My feature request is to add a new function like TrackFX_GetParamUnits() to return "dB", "ms, "Hz" etc.
Those texts come from the plugin formatted as text, it's not a numeric variable plus a string for the unit name. (At least with standard VST2 plugins.) So there isn't really a possibility to add generally working API support for those. It might be possible for the Reaper bundled plugins.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   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 11:03 AM.


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