Is there a script to find incoming wires?

I have the following portion of a wiring diagram:

image

Is there a GP script function to find out if there is a wire connected to an input (and which)?

Something like

IsInputConnected(p: PluginBlock, inputPin: integer) : boolean

Or even better:

GetPluginOfInputPin(p: PluginBlock, inputPin: integer): PluginBlock

(and similarly for output)

I could not find a related function in the documentation, but maybe I missed something.

Of course there could be multiple input plugins connected to an input or output, so maybe return the first one, or an array.

My ideas to use this is to:

  • Set the volume of unconnected mixer channels to 0
  • Automatically enable MUTE
  • Copying the name of the connected widget to the mixer channel label

For output I don’t have any use case yet, but I guess when having this feature for the inputs, it is easy to copy it for outputs.

If some functions like this do not exist, is there any workaround to know more about the connected wires?

I guess not.

You are right

1 Like

I consider that the ‘solution’ for my question, not what I hoped for, but ok :slight_smile: I’m a softawre engineer, always wanting more flexibility :slight_smile:

In the ‘rackscript template’ script I’m writing it would be useful, but now I programmed it in a kind hardcoded way.

Sorry – -while we do continue to improve GP Script, there has to be some validity for the larger userbase for something like this to make sense, i.e. a more general use case.

1 Like

I fully agree, and I do understand you will not spend development time on a single user request, but maybe there would be some alternative.

No need to say sorry. Actually, now I programmed a quite big script myself, I see the advantage and flexibility of such a programming language in GigPerformer.

Actually, it’s not because it’s a single user request but more because I don’t see how this generalizes into something needed by a significant number of users.

For example, why do you need to set the volume of unconnected mixer channels to 0? If there’s nothing coming in, nothing will go out.

As for copying the name of the connected widget, what happens if there is more than one widget connected?

1 Like

I’m intending to use 9 sliders as template of all songs, where 8 will be the sliders coupled to an audio mixer (or Hammond drawbars,but that’s out of context for this story). And the make the sliders as clearly as possible, they will be invisible when not connected. And to make the audio mixer equally, I like to mute the unused channels and to set the volumes to 0, and reset the balance.

Actually, I even would like to clear the audio channel strip (label)s, or even better, to copy the name of the (first, and in my case always only) plugin that is coupled to that label.

About the last sentence, in my case the first connected plugin/widget would be good enough, but otherwise an array could be used.

So you want a template which automatically checks the connections and make widget visible, unmute etc?
This - for me - only makes sense when you could connect wires at runtime via scripting.

What would that be useful for?

Depending on which channels in an audio mixer plugin are active, I want to hide the widget (volume) for that channel. And to make it even more clear when I open the plugin, I like to mute that channel, reset the balance, mute it and reset the solo button. Actually, I also would like to remove the label strip info, but there is no access. It would be even better if I could find out to which plugin it is connected but that’s another post :slight_smile:

So you want a “Super-Rackspace” wich dynamically reacts on what you did in Wiring View?
What about scripting?
When you also want set plugin Parameters dynamically this will not work as you have to give GPSCript handles to the plugins.

I think this approach opens the door for many issues you don’t want to have live.

2 Likes

Yes you can call it like that, a super rackspace, well at least the scripting part. I already made the script It’s about 400 lines now, a draft can be seen in this post: First good looking panel layout - General discussion about Gig Performer - Gig Performer Community … it will be the basis for an article.

And plugin with handles I wouldn’t mind either, although I will not ask to implement pointers to plugins :slight_smile:

As you can see I’m not afraid of scripting. The intention is include this script in all songs and automatically get a mixer/hammond control, expression pedal functionality (and in the future more). So it needs to be fixed, but with the flexibility of the changes needed.

Of course I will find things I cannot do yet (and I can post about it), but I understand that GP will not just add all my wishes, just for me. So I use kind of workarounds (like setting the used channels in a function returning it).