Hello, community. I’m hoping someone can help me improve my multi-instance troubleshooting workflow.
Running Windows 11 and GP 5.
I have four instances of GP running (the main instance, plus one for pianos, one for strings, one for Hammond, and one for horns). I’m using GP Relayer to send MIDI from the main instance to the secondary instances, and to send audio back from the secondary instances to the main instance. I have a batch file which starts up all the instances. I always start with a clean restart of Windows. Sometimes everything works fine on the first go, but sometimes one or more of the secondary instances don’t receive any MIDI messages. There aren’t any error messages that I’m aware of. The main instance looks like it thinks it’s sending MIDI, but the receiving instance doesn’t see any.
I’m always eventually able to get it to work via some combination of quitting and restarting the main instance, quitting and restarting the secondary instances, and restarting Windows. However, this process feels like shooting in the dark, and sometimes it takes a long time. I need to streamline my startup process so that I can be up and running in less than 15 minutes.
In your batch file, have you put any delay in between the load of each instance? It is safer to make sure each instance loads before loading another one.
I’ve tried to replicate what you were describing and I haven’t been able to yet. My batch file has a timeout /t 20 in between the load of each instance, and I haven’t found any issues with MIDI not being received by Relayer in any of the instances.
Sure.
In this example I have a main instance and 2 additional instances named aaa and bbb.
There’s a 20 second delay in between the load of each instance.
Copy the text into your text editor, and save as a .bat file.
(Note: the reason my main instance is running as a named instance (“main”) rather than as the nameless default instance is because I want it to remember my audio device and audio settings between sessions. At home, I often run GP with a different audio interface, but on stage I always want it to remember the audio interface that I use on stage so that I don’t have to manually change settings every time I’m setting up to perform.)
Interesting… now that I have the “timeout” commands in the batch script, which means that the window doesn’t vanish after executing, I can see that I get the message “cannot resolve resource: application_ENG” after invoking the last instance.
This error apparently doesn’t negatively affect the operation of the program; all instances (including the one that threw the error) seem to have started just fine and are all communicating fine too.
However, if I then close the terminal window, then all instances of GP except for the last one crash. I’m left with only my “horns” instance running. Is that to be expected? Should I just minimise the window?
You can create a .vbs file with the following code, reference the .bat file, and run that .vbs file instead. It will run invisibly, with no command window.
Copy the following lines to Notepad.
Set WshShell = CreateObject("WScript.Shell") WshShell.Run chr(34) & "C:\Batch Files\syncfiles.bat" & Chr(34), 0 Set WshShell = Nothing
Note: Replace the batch file name/path with your .bat file path/name
Save the file with .VBS extension, say launch_bat.vbs
Double-click to run the launch_bat.vbs file, which in-turn launches your .bat file invisibly.
Also, in regards to the timeout and launch order discussed above - note that some MIDI devices can be acquired by a single instance only, so the first instance that attempts to access it will have the access while the others not.
This can explain the case that sometimes the main instance has no access to the MIDI device.