Multiple instances of Cabbage for the one user? (JACK2 with multiple users)

Hi Rory,

I tried again to get two instances of Cabbage run by the same user to work.

A likely cause of the failure would be the second instance not being able to open the config file for writing. The config file directory name is in /Source/Application/CabbageDocumentWindow.cpp. I could have altered this and rebuilt, but instead hacked the binary by finding the string “~/.config/Cabbage2” and changing the final character to ‘0’ with a hex editor (bless). The hacked binary runs fine on its own and with an ordinary binary running for another user. However, when I run it while the ordinary binary is already running for the same user, it writes its own config file (if it did not already exist) or presumably reads it OK, but then fails with:

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

I don’t know how applications work with JACK, but JACK is configured to work fine with the same application running in multiple instances, one for each user, so I wonder why it might object to working with two copies of the same application for the same user.

If this is not a fundamental limitation of JACK, then it must be something in Cabbage. If so, can you suggest where in the source I might look to make each CabbageN instance appear distinct to JACK or do whatever is required to make them all work, if run from the same user.

That would be great to be able to patch in various plugins in addition to the Csound CSD files.

My reason for wanting to run multiple instances of Cabbage on the same machine is that there might be multiple quite different reasons for running it; each CSD file (or perhaps all the CSD files in a patch) will be running on one core, so limiting the total amount of work which can be done; the machines have 12 cores; and with four of them I will be able to run lots of Cabbage instances.