Need help with scripting

Hi @Leroy, welcome on board!
But, how could the community help if you don’t post your gig file with the GPScript you are working on?

Hi Leroy,
as a new user, it could be that you are not (yet) allowed to upload files to the forum… but you should try to upload your gig file. If the upload doesn’t work, we will help you with that.
It also would be very helpful if you could give us the link to that other thread you were referring to and if you told us what errors you encountered when you tried to use that script…
Please help us to help you! :slight_smile:

I tried to upload a gig file/script but as a “New user” I’m not allowed… I just thought someone may be able to give me a script template to work with.

I just edited my post, here’s the right post I’m referring to.

https://community.gigperformer.com/t/cc-messages-automation-for-audio-player/2249

Here is the rig now that I’m allowed to attach files.

Rackspace_1.rackspace (10.4 KB)

Hi @Leroy. Do you have Ableton Live (even the Lite version)? Although you can do so much with scripting, GP isn’t a timeline based app, so it could get quite fiddly trying to use scripting to trigger things in sync with an audio file.

There was a similar topic below, and I provided a few screenshots from Live. Also, are you Windows or Mac?

It’s also worth a read of this below, as ultimately it will provide more flexibility using different rackspaces for your different sounds, rather than trying to send PC messages to your plugin to change its internal presets.
https://gigperformer.com/rackspaces-vs-program-changes/

maybe that helps

I don’t have Ableton, I’m using Studio One 5 or Reaper. I’ll have to look into Ableton.

Any DAW would work. It’s the same concept: add your audio file to one track, and use another track to send out midi messages to GP using a virtual midi port to trigger the changes.

Thanks, I’ll read through it and see what I can do.

Thanks, I’ve done a lot with Reaper, I just thought it would be great to do it with just GP.

Ok, i had a closer look to your rackspace and the script, but i guess the script is only a fragment.
It lacks many variable definitions, initialization and so on…
I picked up the script as it was and i added some code to the script and some widgets to the panel…
The changing of variations now happens on those points that are defined in the script.
Have a look at the rackspace - maybe it does now what you wanted it to do… :wink:
If you have questions, don’t hesitate to ask.
leroy_corrected.rackspace (16.9 KB)

4 Likes

Right on thanks! I’ll check it out later today and let you know how it goes.

I forgot about this, but immediately changed your status as user rather new user :wink:

1 Like

Hi, schamass, I tried your script and it works but its strange because as the variations switch with the automation my guitar VST does not switch. Yet if I switch it manually it switches fine. There must be something I’m missing.

Thank you!

What exactly are you trying to switch? Is it a parameter that you’ve mapped in Native as a host automation parameter, or do you want to do something else like send it a PC message to change presets?

Hi Leroy,
“variations” in GigPerformer only store/recall the states of the widgets that are used on the corresponding rackspace panel - so if you don’t have any widgets in your rackspace there will be nothing to store or recall.
Since i don’t have your soft- and hardware and i literally know almost nothing about it, it is quite difficult to say something helpful. That’s why i’d like to propose to build a common base to work with, because i guess there are still some missunderstandings on how things work.
I built a small rackspace with two VSTs from BlueCat Audio, which are both free of charge and which you can download here:
https://www.bluecataudio.com/Download/Products/
I used the FreeAmp and the Chorus VSTs (they are available for WIN and MAC).
Please install both as a normal (64bit) VST and then have a look at this rackspace:
guitar_rack_3V.rackspace (38.7 KB)

There are three rackspace variations, and as you switch through them, the widgets will get diffrent settings - and that is all that’s happening: A variation only recalls the settings of a bunch of widgets.

So, since those widgets are connected (“learned”) to some parameters of the VSTs, the change of a widget setting will also change the corresponding VST-parameter and so it will change the sound.

What is NOT stored within a variation, is anything that is not somehow presented by a widget, so any other parameter or program/patch of a VST that is not “caught” by a widget will not be changed by a variation - these things are stored within the rackspace itself.

At this point there is still no midi connection needed to make things work.
You can now MIDI-learn a widget to a hardware controller, so that using this controller will then change the state of the widget, which will then change the VST-parameter, which will change the sound. Get it? :slight_smile:
As an example: Midi-learn the pedal-widget to your hardware pedal (i guess your device might have one). Now that the widget “catches” the MIDI-parameter you learned it to, you might be able to change the main volume with your controller pedal.

If you have a look at the connection view, you will notice, that there is actually no MIDI-connection to the plugin blocks but everything does work nevertheless. This is because we are using widgets - they work as something as a “go-between”, or a connection element between the hardware world and the software world. The connection between hardware and widget happens via MIDI, but the connection between the widgets and the VSTs happens via “Host Automation”, which is something completely diffrent - but you don’t have to worry about this, because THIS is the job that GigPerformer will do for you.

Hmm… this has become longer than expected. Nevermind. :sunglasses: :nerd_face:
I hope, this might help you to better understand how things work with GigPerformer.
And again, if you have questions: Ask!

4 Likes

I really don’t know what make you think that! :nerd_face:

1 Like

Hi schmass, thanks for your reply, I do understand fully what you have explained. What I am trying to do at this point is just turn on my guitar VST overdrive on and off via automation with scripting while a backing track is playing. I got the variations switching while the backing track is playing but what is happening is the actual FX (overdrive) is not turning on and off when the variation switches. Every once in a while it will work as expected but then when the automation turns the overdrive off it stays on. Now if I switch the variations with my mouse in the left hand column it will work as expected most of the time but just now doing more testing it was not switching manually with the mouse click ether. It’s very buggy. Just to clarify when the variation turns on the overdrive the light on the widget turns on but the FX does not turn on and when the FX does turn on (rare) it won’t turn off after the variation switches back to the off state though the light on the widget turns off. I’ll keep playing with it but I’m not sure there’s much else I can do. This has become longer than expected… :wink:
I do appreciate you helping me!