Getting Gig Performer to know which sound card to use

I use two different sound cards for two different purposes. For my digital guitar, I use an RME Babyface Pro. For my Alesis Wireless key-tar, I use an NI Traktor Audio 2. When I switch from the digital guitar to the keytar, GP insists on using trying to use the sound card from the previous instrument. The Traktor card is more difficult than the Babyface card and resists letting go. I have asked about this before, but would It be possible to have a script whereby GP is able to think on boot up, “Ah, ha. I see he has his keytar plugged in, so I need to use the Traktor soundcard”. To me, this would be logical as the drivers for both sound cards are already installed. But GP baulks every time and I have to go into options and select the correct soundcard, whereupon, GP then reboots and all is well. Would this be a possibility, scriptwise?

You know that you don’t need a different audio interface for each of your MIDI controllers?
:stuck_out_tongue_winking_eye:
More seriously, why don’t you keep always the RME for your gigs on the same computer?

OK, this doesn’t answer your question. But if I remember well my tests with different audio interfaces, the Gig files remains the last audio interface used when you saved it (no more 100% sure about that). You probably don’t have the same Gig files when playing with one or the other controller? Or did I misunderstood?..

[quote=“David-san, post:2, topic:2940”]
You know that you don’t need a different audio interface for each of your MIDI controllers?
:stuck_out_tongue_winking_eye:
More seriously, why don’t you keep always the RME for your gigs on the same computer?

Simplicity. The Traktor is kept in the keytar bag as it’s small and light and is a quick and easy setup. The Babyface is more studio oriented and is better when I have a full on guitar based gig.

No, GP Script does not offer any possibilities to change the sound interface. This makes sense because scripts are meant to run during performance but changing the audio interface (as you have discovered) always requires a reload of all plugins in the current gigfile during which the performance will be paused.

I would recommend to you the following: In the GP settings, activate the option not to load the most recent gig on program startup so Gig Performer always starts with an empty gig with zero plugins. After startup, choose your preferred audio interface - the empty gig file will reload very quickly. After that, load the „big“ gig file you want to actually play. Your audio interface will be kept so you only have to load the big gig file once.

Does this seem feasible to you?

I already had the load last gig turned off. And yes, loading an empty gig file first is a good idea, but it’s not really that much faster loading a 20 Rackspace gig file. But thanks for the suggestion anyway.

This is the solution I use (I too use different audio interfaces for different contexts). There are of course other options to achieve audio interface switching, but they come with some extra complexity (which I personally try to avoid):

  • you could use multiple instance support for your different contexts. Each instance comes with its own set of global settings. By the way: @djogon @dhj is it possible to specify an instance to start with a command line option? There’s nothing in the manual about it, but the -nosave option isn’t mentioned there either…

  • you could use a virtual sound card like VoiceMeeter as your GP output device and route the sound independently of GP to your physical outs. For the described use case, this option would not be worth the hassle with the added complexity to me.

It is possible - you’d have to use the “-in” option with the instance name.
For example -in=new-instance

Of course - we cannot officially support usage of this option directly, but it should work.

Do you have a list of all the available command line options ?

I am thinking of solutions to switch from one GP instance to another without keyboard computer. But it is would probably be much cleaner to find a solution within GP for this
:thinking:

On Windows:
Alt-Tab will swap between the two last visited programs. Suppose you have running programs A, B, C, and D, and D is currently in focus. Now, you want to start swapping between D and B:

  1. Press and hold Alt key,
  2. Press Tab key till you get to B,
  3. Release both keys.

Now, you would be with B in focus.

If you press ALT-Tab once, you go to D. If you press ALT-Tab again, you return to B (and so forth).

Mabye that helps:

Thanks @pianopaul, but I would like to have a direct access to any specific GP instance. With ALT-TAB you switch in a circular way between all the opened applications. Doing this, most of the time I miss the application I need :grimacing: (quite easy, especially when they all have a GP icon).

I dream of a SwitchToInstance GP script function :innocent:

If you‘re willing to put some programming effort in yourself, you could accomplish this by writing an AutoIt script that finds the window of your desired GP instance and puts it in the foreground.
You could trigger that script in various ways, like MIDI or OSC which essentialy gives you instance window from GP Script.

Thank you, very good advice, together with the MIDIKEY2KEY from @pianopaul, I have a way to do it. The only annoying thing is that it is OS dependent and perhaps not that easy for every GP users, while it is not the first time that some users would like to have the possibility to work with a different GP instance for each keyboard controller.

But, I will definitely test the OS level scripting option ASAP.

=> I also had the secret hope that I could implement in a GP script to get the focus and full screen display of a GP instance, when some specified widgets of this instance are moved (I am also thinking of this kind of behavior to center a rackspace on the screen when they are to much to be displayed at the same time on the screen)