Old 08-02-2021, 03:04 PM   #1
mazegeek999
Human being with feelings
 
mazegeek999's Avatar
 
Join Date: Jan 2015
Posts: 225
Default Comparing two instances of FX plugin

Hi there,

I am looking to write a method that compares two instances of the same FX plugin (on the same track) and to see if they are fundamentally identical in form, separate from any automatable parameters.

For example, ReaEQ - the plugin can have a variable amount of parameters depending on the number of bands used. There are also a few checkboxes for things like "Enabled", "Log-scale automated frequencies", "Show tabs", etc, which cannot be automated.

So my script compares these two instances of ReaEQ and sees if they are identical in form, by temporarily setting all automatable parameters to a normalized 0 value in both plugin instances, then comparing the binary data of each FX (via track chunking) and returning whether the two strings of binary data are equivalent. This does work for ReaEQ.

However, other plugins - such as my EW Spaces Reverb plugin - do not seem to work the same way. The binary data between the two plugins seems to be vastly different even after all parameters are set to 0 and all else is supposedly equal. I've trying simply copying the FX via Reaper's GUI manually and then comparing the two binary strings and they are still quite different. Any ideas why, and any ideas on how I could achieve these FX comparisons?

...By the way - the purpose of this task is so that I can create various little setups on my control surface that control various plugins. But of course, having a ReaEQ with 8 bands vs. having a ReaEQ with 4 bands would require a different amount of channels on my control surface, and thus different setups may be necessary for the same plugin.
mazegeek999 is offline   Reply With Quote
Old 08-02-2021, 09:29 PM   #2
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,984
Default

Loop through parameters rather than comparing binary data?
mpl is offline   Reply With Quote
Old 08-02-2021, 09:42 PM   #3
mazegeek999
Human being with feelings
 
mazegeek999's Avatar
 
Join Date: Jan 2015
Posts: 225
Default

Quote:
Originally Posted by mpl View Post
Loop through parameters rather than comparing binary data?
The idea here is that it doesn't matter if the parameter values are the same - this is why I temporarily set those values to 0 to compare everything else in the plugin.

Although, if you're saying loop through the parameters in order to count the number of parameters and/or compare the names of each parameter, that could work in some situations where the number of parameters are variable, like the bands in ReaEQ. But for example, in the same plugin (ReaEQ) there is the "Log-scale automated frequencies" checkbox, which returns different frequency parameter values depending on whether that option is checked, and thus my control surface faders would react differently depending on the value of that checkbox. Ideally, my script checks for non-automatable aspects of the plugin to ensure all else is the same besides the automatable parameters.

Last edited by mazegeek999; 08-02-2021 at 09:53 PM.
mazegeek999 is offline   Reply With Quote
Old 08-02-2021, 10:00 PM   #4
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,984
Default

For ReaEQ you can compare formatted parameters (so you get frequency directly, not a normalized value). Same for plugins which support that.
mpl is offline   Reply With Quote
Old 08-02-2021, 10:17 PM   #5
mazegeek999
Human being with feelings
 
mazegeek999's Avatar
 
Join Date: Jan 2015
Posts: 225
Default

Quote:
Originally Posted by mpl View Post
For ReaEQ you can compare formatted parameters (so you get frequency directly, nor a normalized value).
I see, I'll have to experiment with that.

In any case I'm moreso looking for a general method of comparison because there are plenty of cases where I cannot think of any other solution besides comparing binary data.

Another example (sticking with stock plugins) would be ReaVerb. Ideally I would like to have multiple instances of the ReaVerb plugin with different IR generations. Because those parameters within each IR aren't automatable (as well as the IRs themselves), I would like to save these as separate setups to easily access and switch to.

I just realized that perhaps this could be achieved by saving FX presets... but when saving two identical FX instances as 2 separate presets, opening the .ini file of the plugin results in 2 different long strings of data. So same problem there.
mazegeek999 is offline   Reply With Quote
Old 08-03-2021, 02:31 PM   #6
mazegeek999
Human being with feelings
 
mazegeek999's Avatar
 
Join Date: Jan 2015
Posts: 225
Default

I will update and say that I'm unfortunately more convinced that this isn't quite possible.

For example, a reverb plugin. The plugin is loaded with IR Sample A. I save the preset. Then I switch to IR Sample B within the VST, and then switch back to IR Sample A. I save the preset again (with the same name, through a script as opposed to Reaper's GUI). But the presets have vastly different data.

I did try things like simply saving two presets right after each other with slightly different names "test1, test2" and those actually produce the same preset data (save for the preset name which seems to be coded at the end of the string). But it seems that whenever you do anything to a plugin, the internal data is forever changed.

Essentially, it seems you can't save a reverb with a particular IR sample loaded, and have Reaper recognize when that specific sample is loaded into the plugin. Or you can't save a compressor with a checkbox ticked, and have Reaper recognize that the checkbox is ticked. And so on. It seems ultimately you can only compare automatable parameters within a VST, and you're out of luck comparing the rest of the plugin.

If anyone has any ideas I'd love to hear them.
mazegeek999 is offline   Reply With Quote
Old 08-03-2021, 02:38 PM   #7
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,984
Default

Quote:
Originally Posted by mazegeek999 View Post
For example, a reverb plugin. The plugin is loaded with IR Sample A. I save the preset. Then I switch to IR Sample B within the VST, and then switch back to IR Sample A. I save the preset again (with the same name, through a script as opposed to Reaper's GUI). But the presets have vastly different data.
you can get impulse for ReaVerb by
Quote:
v5.40 - March 24 2017
+ ReaVerb: support TrackFX_SetNamedConfigParm and similar API functions with ITEMx, DONE
This can be tricky for 3rd party plugin, though it is base64 encoded and can be somehow parsed. How binary state is stored - depending on plugin developer, so there isn`t universal way to do what you want at this level.
mpl is offline   Reply With Quote
Old 08-03-2021, 02:49 PM   #8
mazegeek999
Human being with feelings
 
mazegeek999's Avatar
 
Join Date: Jan 2015
Posts: 225
Default

Quote:
Originally Posted by mpl View Post
This can be tricky for 3rd party plugin, though it is base64 encoded and can be somehow parsed. How binary state is stored - depending on plugin developer, so there isn`t universal way to do what you want at this level.
Yeah that seems to be the problem. I was thinking perhaps there's pieces of data in some effects like a time value (time since last modified or something like that) that would make identifying unique presets nearly impossible.
mazegeek999 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 02:06 PM.


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