Oh, now i checked the compile script and it does indeed output a new binary, but it is called main. Is this just an old name for mother maybe? Or is main needed too?
I did try to change the script to output mother instead, and to put it in /usbdrive/System as well as in /root but something’s not working. The encoder and the display becomes unresponsive when i use my own version of mother for some reason.
I’m not fluent in c++ so it’s difficult for me to know what to check. I’ve only modified these lines in the runPatch function of UI.cpp file like this:
//sprintf(cmd, PATCHES_PATH"/%s/main.pd", menuItems[selectedPatch]);
sprintf(cmd, PATCHES_PATH"/%s/main.scd", menuItems[selectedPatch]);
printf("Checking for Patch File: %s\n", cmd);
if (checkFileExists(cmd)) {
// check for X,
// run pd with nogui if no X. also use smaller audio buf with nogui
// the rest of the settings are in /root/.pdsettings
if(system("/root/scripts/check-for-x.sh")){
printf("starting in GUI mode\n");
//if (checkFileExists(PATCHES_PATH"/mother.pd")) sprintf(cmd, "/usr/bin/pd -rt -audiobuf 10 "PATCHES_PATH"/mother.pd \""PATCHES_PATH"/%s/main.pd\" &", menuItems[selectedPatch]);
if (checkFileExists(PATCHES_PATH"/main.scd")) sprintf(cmd, "jackd -R -P90 -p16 -t200 -d alsa -dhw:0 -p 128 -r 44100 -s -i2 -o2 \"sclang -D "PATCHES_PATH"/%s/main.scd\" &", menuItems[selectedPatch]);
//else sprintf(cmd, "/usr/bin/pd -rt -audiobuf 10 /root/mother.pd \""PATCHES_PATH"/%s/main.pd\" &", menuItems[selectedPatch]);
else sprintf(cmd, "jackd -R -P90 -p16 -t200 -d alsa -dhw:0 -p 128 -r 44100 -s -i2 -o2 \"sclang -D "PATCHES_PATH"/%s/main.scd\" &", menuItems[selectedPatch]);
}
else {
printf("starting in NON GUI mode\n");
if (checkFileExists(PATCHES_PATH"/main.scd")) sprintf(cmd, "jackd -R -P90 -p16 -t200 -d alsa -dhw:0 -p 128 -r 44100 -s -i2 -o2 \"sclang -D "PATCHES_PATH"/%s/main.scd\" &", menuItems[selectedPatch]);
//if (checkFileExists(PATCHES_PATH"/mother.pd")) sprintf(cmd, "/usr/bin/pd -rt -nogui -audiobuf 4 "PATCHES_PATH"/mother.pd \""PATCHES_PATH"/%s/main.pd\" &", menuItems[selectedPatch]);
//else sprintf(cmd, "/usr/bin/pd -rt -nogui -audiobuf 4 /root/mother.pd \""PATCHES_PATH"/%s/main.pd\" &", menuItems[selectedPatch]);
else sprintf(cmd, "jackd -R -P90 -p16 -t200 -d alsa -dhw:0 -p 128 -r 44100 -s -i2 -o2 \"sclang -D "PATCHES_PATH"/%s/main.scd\" &", menuItems[selectedPatch]);
}
I also tried without the if statement that checks for a mother on the usb, since i believe it’s unnecessary with sc. Easier to do all the OSC communication within the same piece of code.
Another thing i did was to add a killall sclang and killall jackd to the script killpd.sh but i fail to understand how any of these changes could cause the unresponsive encoder/display…