Old 12-18-2013, 05:17 PM   #1
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default Q: Getting plug-in parameter names?

I am writing a few JS FX (surprise!) that will use lists of plug-in parameter names.

Is there any way of extracting that list from plug-ins into a text file? Reaper does it (for the Automation window etc), so perhaps I need to ask JCS to do something special for me.

Or ... ?

At the moment I'm faced with the prospect of opening the Automation window and typing each one - that's too horrible to contemplate.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...

Last edited by DarkStar; 08-17-2016 at 02:07 PM.
DarkStar is online now   Reply With Quote
Old 12-19-2013, 12:10 AM   #2
EnkelMagnus
Human being with feelings
 
Join Date: Feb 2010
Posts: 96
Default

Are you going to populate the list in "real time" or is it a static list ?
If the latter you could do an OSC script that ask for all the parameter names on the plugin in the first slot of track 1 and write that to a text file.

Insert the plugin you want the names of in that slot and run the script.

In Python for example.
https://pypi.python.org/pypi/python-osc

Last edited by EnkelMagnus; 12-19-2013 at 12:20 AM. Reason: Xtra info
EnkelMagnus is offline   Reply With Quote
Old 12-19-2013, 02:02 AM   #3
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

I only need the static lists (I will use them with the forthcoming JS FX string functions or my own string-handlers.

I was rather hoping to avoid having to install / learn / write Python.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is online now   Reply With Quote
Old 12-19-2013, 09:15 AM   #4
EnkelMagnus
Human being with feelings
 
Join Date: Feb 2010
Posts: 96
Default

I'll have a look at it see if i can't whip something up. Thing is i'm kinda swamped 'til Sunday so probably nothing before that,if at all.

You should install Python anyways me thinks. ReaScript depends on it.
It's a simple install IIRC.
EnkelMagnus is offline   Reply With Quote
Old 12-19-2013, 09:49 AM   #5
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Thank you. I haven't needed ReaScript so far, so no constrictor snakes here.

It'll take me until Sunday at least to work out the potential of the JSFX string functions.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is online now   Reply With Quote
Old 12-19-2013, 02:08 PM   #6
beyond
Human being with feelings
 
Join Date: Jun 2007
Location: Palm Beach FL
Posts: 265
Default

with beyond.Reaper

Code:
import beyond.Reaper
import beyond.Reaper.Track
import beyond.Screen


@ProgramStart
def Main():

  with Reaper as r:

    for T in r.ProjectSelected.TracksSelected:
      
      T.Receive()

      for E in T.Effects:

        Say("Effect:", E.Name)

        E.Parameters.Receive(Names = True)

        for P in E.Parameters:

           Say(" Parameter:", P.Name, P.Value, P.Minimum, P.Maximum, P.Default)

        Say()
beyond is offline   Reply With Quote
Old 12-20-2013, 03:29 PM   #7
EnkelMagnus
Human being with feelings
 
Join Date: Feb 2010
Posts: 96
Default

Install Python. Go to Reaper preferences and make sure it sees the Python installation. It's under Plugins/ReaScript. If you use the default location (C:/Python32) i believe it finds it automatically. Otherwise you need to point it at the Python.dll.

Make a new textfile and rename it GetParameterNames.py or something similar.

Copy/Paste the following:

from reaper_python import *

tr = RPR_GetTrack(0, 0)
numParams = RPR_TrackFX_GetNumParams(tr, 0)
f = open('C:\\reaperParameters.txt', 'w')
for i in range (0 , numParams):
name = RPR_TrackFX_GetParamName(tr, 0, i, "", 128)[4]
f.write(name)
f.write('\n')

f.close()


and save the file. It doesn't matter where but it's convinient to have them in the Scripts folder. %appdata%\REAPER\Scripts
Go to Actions ReaScript New/Load and load the script. And the choose run and voila! There a new file at C: called ReaperParameters.txt with the stuff you want.
EnkelMagnus is offline   Reply With Quote
Old 07-08-2014, 04:34 AM   #8
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Anybody like to convert this ^^^^ to a self-contained EEL script? (if that is indeed possible)
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is online now   Reply With Quote
Old 07-08-2014, 05:37 AM   #9
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by DarkStar View Post
Anybody like to convert this ^^^^ to a self-contained EEL script? (if that is indeed possible)
This might work:

Code:
function msg_s(m)
(
  ShowConsoleMsg(m);
  //ShowConsoleMsg("\n");
);

function write_fx_param_names_to_file(file_name)
(
  (tr = GetTrack(0, 0)) && (num_params = TrackFX_GetNumParams(tr, 0)) ? ( //get first track and first FX
    (file = fopen(file_name, "w")) ? (
      i = 0;
      loop(num_params,
        TrackFX_GetParamName(tr, 0, i, #param_name) ? (
          #param_name += "\n";
          //msg_s(#param_name); // show parameter names
          fwrite(file, #param_name, 0);
        );
        i += 1
      );
      fclose(file);
    );
  );
);

file_name = "C:/EEL scripts/Parameter names.txt"; // (it seems that single backslashes don't work in "file_name")
write_fx_param_names_to_file(file_name);
spk77 is offline   Reply With Quote
Old 07-08-2014, 06:54 AM   #10
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Thank you - at the moment I'm getting the Bypass and Wet parameter names, but not others.

I changed the path name to:
file_name = "C:\\Users\\DarkStar\\AppData\\Roaming\\REAPER\\Sc ripts\\Parameter names.txt"; and that worked.

---------------
D'oh! I did not notice that it runs on the first track. Looks like I'm good to go!
__________________
DarkStar ... interesting, if true. . . . Inspired by ...

Last edited by DarkStar; 07-08-2014 at 07:22 AM.
DarkStar is online now   Reply With Quote
Old 07-08-2014, 07:11 AM   #11
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by DarkStar View Post
Thank you - at the moment I'm getting the Bypass and Wet parameter names, but not others.
Hmm..I think TrackFX_GetParamName gets only the names that can be seen when f.ex opening the FX parameter list in FX window.

I get these parameter names (ReaEQ as the first FX in track 1)
Code:
1-Freq (Low )
1-Gain (Low )
1-Q (Low )
2-Freq (Band)
2-Gain (Band)
2-Q (Band)
3-Freq (Band)
3-Gain (Band)
3-Q (Band)
4-Freq (High)
4-Gain (High)
4-Q (High)
Bypass
Wet
spk77 is offline   Reply With Quote
Old 07-08-2014, 07:14 AM   #12
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by DarkStar View Post
D'oh! I did not notice that it runs on the first track. Looks like I'm goo to go!
Very nice
spk77 is offline   Reply With Quote
Old 07-08-2014, 07:17 AM   #13
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

I think it would be better to change

tr = GetTrack(0, 0)
to
tr = GetSelectedTrack(0, 0)

to get the first selected track
spk77 is offline   Reply With Quote
Old 07-08-2014, 07:30 AM   #14
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Snazzy And I added this:
Code:
    TrackFX_GetFXName(tr, 0, #FX_name);
    #FX_name +=" - - - - - - - - - - - - \n";
    msg_s(#FX_name);
and this:
Code:
    fwrite(file, #FX_name, 0);
__________________
DarkStar ... interesting, if true. . . . Inspired by ...

Last edited by DarkStar; 07-08-2014 at 07:36 AM.
DarkStar 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 01:58 PM.


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