Patch launching issue via the app

The button click and launching via the app share the same script to launch PD. The app should end up executing:

/usr/local/pisound-ctl/puredata/puredata_launch.sh /usr/local/puredata-patches/analog-style/analog-style.pd

and what puredata_launch.sh does, is it loads /usr/local/pisound/scripts/common/start_puredata.sh and uses start_puredata.

What is the output of running these commands:

cd /usr/local/pisound
git status
git log -1 --format=%cd

git status

On branch master
Your branch is up-to-date with ‘origin/master’.
nothing to commit, working directory clean

git log -1 --format=%cd

Fri Jun 15 17:00:08 2018 +0300

What output do you get if you run:

/usr/local/pisound-ctl/puredata/puredata_launch.sh /usr/local/puredata-patches/analog-style/analog-style.pd

?

pi@raspberrypi:~ $ /usr/local/pisound-ctl/puredata/puredata_launch.sh /usr/local/puredata-patches/analog-style/analog-style.pd
Using display :0
/usr/local/puredata-patches/analog-style/analog-style.pd
2018-06-15.23:35:19: Killing all Pure Data instances!
2018-06-15.23:35:19: Giving 3 seconds for Pure Data to start up before connecting MIDI ports.
2018-06-15.23:35:19: Launching Pure Data.
2018-06-15.23:35:19: Pure Data started!
Opened Alsa Client 129 in:1 out:1
GEM: Graphics Environment for Multimedia
GEM: ver: 0.93.3
GEM: compiled: Feb 3 2015
GEM: maintained by IOhannes m zmoelnig
GEM: Authors : Mark Danks (original version)
GEM: Chris Clepper
GEM: Cyrille Henry
GEM: IOhannes m zmoelnig
GEM: with help by Guenter Geiger, Daniel Heckenberg, James Tittle, Hans-Christoph Steiner, et al.
GEM: found a bug? miss a feature? please report it:
GEM: homepage http://gem.iem.at/
GEM: bug-tracker GEM: Graphics Environment for Multimedia download | SourceForge.net
GEM: mailing-list GEM-dev Info Page
open: /etc/pd/gem.conf: No such file or directory
open: /home/pi/.pd/gem.conf: No such file or directory
open: ./gem.conf: No such file or directory
GEM: compiled for SIMD architecture: none
KontrolRack: device = kontrol
pi@raspberrypi:~ $ 2018-06-15.23:35:22: Connecting all MIDI ports to and from Pure Data.
invalid destination address Pure Data
invalid sender address Pure Data:1

Basically it is the same thing as via app expect that now Pd loads with GEM (and cyclone) libraries (as it does when starting it from desktop)

As we’re both online at the moment, let’s take this to the chat on https://blokas.io, it should be faster to get to the bottom of this issue. :slight_smile:

Next thing to try would be to run as root, to mimic the environment when executed via the app:

sudo /usr/local/pisound-ctl/puredata/puredata_launch.sh /usr/local/puredata-patches/analog-style/analog-style.pd

It’s weird however, the button should launch as root too and use the same command line options as launching by the app. Could you try using instead of “/usr/local/puredata-patches/analog-style/analog-style.pd” the path to the patch that gets launched when you click the button?

Did you try launching other patches than analog-style ?

pi@raspberrypi:~ $ sudo /usr/local/pisound-ctl/puredata/puredata_launch.sh /usr/local/puredata-patches/analog-style/analog-style.pd
Using display :0
/usr/local/puredata-patches/analog-style/analog-style.pd
2018-06-16.15:56:55: Killing all Pure Data instances!
2018-06-16.15:56:55: Giving 3 seconds for Pure Data to start up before connecting MIDI ports.
2018-06-16.15:56:55: Launching Pure Data.
2018-06-16.15:56:55: Pure Data started!
Opened Alsa Client 129 in:1 out:1
KontrolRack: device = kontrol
pi@raspberrypi:~ $
pi@raspberrypi:~ $ 2018-06-16.15:56:58: Connecting all MIDI ports to and from Pure Data.
invalid destination address Pure Data
invalid sender address Pure Data:1

I’m unsure how to modify the pisound.conf file but I’ve add simple ‘pd open’ object in my main.pd patch so it will start the analog-style.pd after single button click. I’ve add a delay so I can see that Pd opens. Unfortunately it closes just after the period of the delay

Sidenote: this exact solution works fine when I’m opening my own Pd patches

Hey, it looks like something causes PD to crash on your system, it would be fastest to debug this issue via the support chat on https://blokas.io, just leave a message there saying when you’re going to be online for ~1 hour, and we can work on this. :slight_smile:

Ok, looks like I found the issue, it only happens if running Raspbian ‘Jessie’ which is one release prior to ‘Stretch’.

MEC and KontrolRack.pd_linux & KontrolModule.pd_linux externals get built with -march=armv7-a which is totally fine, however, on Jessie, system libs are built using -march=armv6-a. These two flags (and resulting code) are normally compatible, however, there’s an issue in g++ 4.9 compiler (most up to date version on Jessie) which makes some certain code, in this case std::thread, to crash.

We will release rebuilt mec-blokas.deb and pd-blokas.deb packages tomorrow with the corrected flags, so that Pisound App and server can run on Jessie successfully.

1 Like

Ok, new versions are up, running the following should fix the issue:

sudo apt-get update
sudo apt-get install mec-blokas pd-blokas
1 Like

Pd stays on now, patches from app loads but the ‘control’ tab in the app only shows turning wheel animation (loading)

This can happen if pisound-ctl fails to communicate with MEC, let’s check the versions you have and if it is running, what is the output of these commands:

dpkg-query -l 'pisound*' '*-blokas'

ps -ef | grep mec

Also, are there any errors in the console tab?

It’d be great to see the pisound-ctl log:

sudo journalctl -u pisound-ctl > pisound-ctl.log

could you retrieve the pisound-ctl.log and post it somewhere?

ii pisound 1.03-1
ii pisound-btn 1.05-5
ii pisound-ctl 1.03-2

ii mec-blokas 0.1.1-2
ii pd-blokas 0.1.1-2

root 1151 458 0 22:45 ? 00:00:00 /bin/sh /usr/bin/mec /etc/mec-blokas.json
root 1157 1151 1 22:45 ? 00:00:04 mec-app /etc/mec-blokas.json
pi 1416 1333 0 22:51 pts/0 00:00:00 grep --color=auto mec

I don’t see any errors in console i.e. when loading Analog Style patch.
Last entry is:

Connecting all MIDI ports to and from Pure Data. Connection is already subscribed

pisound-ctl.log:
link

Does the console output after launching the PD patch contain a line saying “Current Values Dump” and a few lines that look like name : value [F] ?

MEC and pisound-ctl seem to run fine. Did you make any modifications to Pisound scripts? What is the output of:

cd /usr/local/pisound
git fetch
git status

Yes it does, “Current Values Dump” and [F] values

edit: all of a sudden when trying to load the Analog Style path once again using the app this time the ‘control’ tap loaded successfully showing five sliders :open_mouth:
Not sure why that happened as I haven’t changed anything since the last few times I’ve tried

Whew! I was running out of ideas of what else could be wrong. :smiley: Let us know if you see any more issues. :slight_smile:

Thank you for the awesome support Giedrius. Hopefully it will still work after reboot. I guess I could have just update my Raspbian to ‘Stretch’ as it seem that nobody else encountered my issue. It seem that after your fix it was just a matter of a couple of restarts.
I’m hoppying to modify some of my patches so I could run the RPi+Pisound headless and use the app to controll it and see the values of the various parameters when playing.
Thanks again :+1:
Pisound support rating: 7/5
:smiley:

1 Like

You probably saw this already, but here’s a guide that should help you to get started, feedback is very welcome!

And a bit more technical documentation on The Pisound App - Pisound Documentation

1 Like