Callback when a plugin is opened/closed

I was wondering if something like this is possible.

My use case is that I want to make my new script much leaner than my old script.
I have 9 faders on my controller board, which I like to have several functions:

  • 9 hammond drawbars
  • 8 volumes of an audio mixer (maybe using more than 1 mixer, when needing more than 8 sounds)

Currently, I have a variable that sets the ‘mode’ which I can change via a button, hammond or audio mixer 1, 2 and 3 (thus 4 modes).

However, it would be very nice if there is a callback function which is called, so whenever a plugin opens, I can ‘remap’ the faders to 8 (or 9) values on that plugin. Of course the plugin has to have gpscript enabled.

But maybe, there are solutions I didn’t think of. Do you have better solutions, or share this usecase ?

(Some background info: I started with a big script, like 1000 lines which I’m still using. However, that script got quite complicated, so I tried to make an Extension. That also worked, but it got so complicated, that I prefer to go back to a script. Btw, the reason the Extension was so complicated, was the amount of functionality I wanted to be in it. I was almost mimicing/reproducing the entire audio mixer. So in the new script/wiring I prefer to open up the audio mixer itself).

If you mean showing the plug-in’s interface by ‘opening’, then you could assign a button widget to the open/close plugin parameter and process the value change of the widget in script?

1 Like

I don’t understand — why does a plugin window have to be open to be able to map parameters? As long as you have the plugin handle, you can map parameters. And what would happen if you have two plugin windows open?

I’d like to avoid making any more significant changes to the system beyond bug fixing and finishing actions so that we can get the next release out. While adding simple function calls to the SDK is not complicated, setting up new callbacks is a much bigger deal.

If you really need this functionality, create a timer and just use Windows functions to see if a new window has been opened with the appropriate name.

Why?

That sounds like a good idea, thanks

It does not have to be open to map parameters, however, I like to use the faders for the currently (or last opened) audio mixer (or organ drawbars / plugin). However, Paul gave already an existing solution (using the open/close plugin parameters).

And it was not my intention for a feature request, just asking if some solution is already available, or when not, if others had a similar use case.

Since I can use a widget callback, I can implement it already with the existing script functions.
Btw, I’m not using an SDK anymore. For my previous plan it was indeed a good idea, I implemented some parts but it costed about 10,000 lines to gave it the flexibility I wanted, and then I rethought it out and decided, I should go ‘back to basic’, well some kind of scripts are needed, but not as much as I had.

Well, it started gradually. First I thought: I need to be able to change the volumes of an audio mixer (well more of them), so I added widgets for that. I also wanted to enable/disable channels (hence: mute). Then I wanted also to see the levels, and well, then I had almost the audio mixer functionality. So I’m busy creating as much using regular widgets. Still thinking about ‘global rackspace’ VSTs. Maybe I also skip those.