Pisound Button Issue

Hello! I just went through the getting started procedure for pisound, and the button is not behaving as expected. clicking it doesn’t open a pd patch. I also made a main.pd patch and that didn’t help. I checked and i’m set up with the default button behavior. I would love to get some help with this:)

Hey, are you running Raspbian or Patchbox OS?

Could you check if there’s any errors or hints on what’s going on in the logs:

sudo journalctl -u pisound-btn

Hit the ‘end’ key to go to the latest lines, ‘q’ to exit the viewer.

Hi Giedrius,

Thanks for your help, and sorry to be slow to respond. I had to to take a break from it for a little bit, after spending a lot of time tinkering with it to no avail.

Here’s a line that is in the terminal after doing what you advised:

root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/sh -c echo 1 > /sys/kernel/pisound/led

Does this tell you anything that you can use to help me fix the problem? Interestingly, when I have terminal open, the PD patch opens when I hit the button. When I close the terminal window, I still get no result

Hey, ah, actually, looks like the Pure Data patch gets started even if it does not appear on screen, or it appears on a different screen.

What method are you using to see the desktop? Do you have display connected directly to RPi, or are you using VNC?

The problem is that on Linux each different way of viewing the Desktop has its own Virtual Desktop Screen, and the button does not really know on which one it should start Pure Data on, it does its best to guess it, and the terminal running somewhere helps it find it. If none is found, Pure Data is started with -nogui command line argument.

After pressing the button, you can check whether Pure Data is running by executing:

ps -ef | grep puredata

Thanks again for the help. I’m updating my last comment, because I’ve had some developments. I am now running PD 49, and everything seems to be updated. I am having troubles with my raspberry pi freezing and crashing now. I’m hoping maybe you can help me figure out why this is happening? I successfully get my patch open, and the objects are all in there. It doesn’t record into cyclone buffer (which is what i’m trying to do), and freezes up after a short bit. One weird thing is that the print object is not printing anything in the pd window. . .

The output of PD is redirected to ‘stderr’, as the button is mostly meant to be used in ‘headless’ mode, without any GUI, the output instead is made available within the pisound-btn service log, you can access it using:

sudo journalctl -u pisound-btn

add -f to see the latest lines. However, the printing there is buffered, so the messages there appear with a delay, not in real time.

To get print output in the PD window, remove -stderr argument from /usr/local/pisound/scripts/common/start_puredata.sh

Thanks.Does pisound create a new version of puredata? When I run the version that I have on my desktop, the print window works. I’m imagining that it’s just running in headless mode but is still the same program?

I’m back to the same essential difficulty, which is that the [cyclone/buffer~] says that it does not have a file size ( I have tried repeatedly sending it the filesize message, but it doesn’t seem to work. I don’t know who to ask or how to ask the appropriate question to fix this issue, and I would greatly appreciate help in resolving this

Here’s what I posted about this in the puredata fb forum. This documents all the error messages I’m getting when trying to use cyclone/buffer~, which is where I’m stuck

I’m now running puredata 49 on Raspian Stretch. When I run puredata, it prints “priority 6 scheduling failed, running at normal priority”. Then, when I try to run a simple test patch with cyclone/buffer, I get a series of error messages. I also get error messages when I open the cyclone/buffer~ help file.

When the DSP is on, I get a series of messages saying "Warning: [buffer~]'s size not defined

When I ask it to find the last error, it says “last trackable error: no such array ‘o-tom_1003’” (the buffer has been given the name “tom”)

When I open the buffer help file, it says “$2: argument number out of range”

When I ran dmesg, I get a lot of lines like this:

[30392.414319] w1_master_driver w1_bus_master1: Family 0 for 00.124000000000.ba is not registered.
[30444.377823] w1_master_driver w1_bus_master1: Attaching one wire slave 00.924000000000 crc 36
[30444.383364] w1_master_driver w1_bus_master1: Family 0 for 00.924000000000.36 is not registered.

When you click the button, the script closes all puredata processes already running, and launches a new instance with the patch it found and with the command line as provided in the script. It launches the same version of puredata as currently available on the system.

This post may be relevant.

I don’t really know how to get Cyclone working correctly, maybe start a new topic about it here as well, someone in the community may know how to get it running. :slight_smile:

ps -ef | grep puredata

it should be pd not puredata

as for me, hitting the button ONCE does not launch puredata

pi@raspberrypi:~ $ sudo journalctl -u pisound-btn
-- Logs begin at Thu 2019-02-14 11:11:59 CET, end at Sun 2020-12-13 11:43:28 CET. --
Dec 13 11:36:42 raspberrypi systemd[1]: Started Pisound button daemon autostart.
Dec 13 11:43:19 raspberrypi pisound-btn[480]: script = '/usr/local/pisound/scripts/pisound-btn/system/down.sh', args = ''
Dec 13 11:43:19 raspberrypi pisound-btn[480]: script = '/usr/local/pisound/scripts/pisound-btn/system/up.sh', args = ''
Dec 13 11:43:19 raspberrypi pisound-btn[480]: script = '/usr/local/pisound/scripts/pisound-btn/start_puredata.sh', args = ''
Dec 13 11:43:19 raspberrypi pisound-btn[480]: Using display :0.0
Dec 13 11:43:19 raspberrypi pisound-btn[480]: 2020-12-13.11:43:19: Searching for main.pd in USB storage!
Dec 13 11:43:19 raspberrypi pisound-btn[480]: 2020-12-13.11:43:19: No patch found in attached media, trying to mount USB devices...
Dec 13 11:43:19 raspberrypi pisound-btn[480]: 2020-12-13.11:43:19: No patch found in attached media, checking /usr/local/puredata-patches...
Dec 13 11:43:19 raspberrypi pisound-btn[480]: 2020-12-13.11:43:19: No patch found! Doing nothing...
Dec 13 11:43:20 raspberrypi sudo[1778]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/sh -c echo 100 > /sys/kernel/pisound/led
Dec 13 11:43:20 raspberrypi sudo[1778]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 13 11:43:20 raspberrypi sudo[1778]: pam_unix(sudo:session): session closed for user root
pi@raspberrypi:~ $ ps -ef | grep pd
root        62     2  0 11:36 ?        00:00:00 [kswapd0]
pi        1789   998  0 11:43 pts/0    00:00:00 grep --color=auto pd
pi@raspberrypi:~ $ ps -ef | grep puredata
pi        1795   998  0 11:43 pts/0    00:00:00 grep --color=auto puredata

It didn’t find any patch to launch. It looks for a main.pd file in attached USB storage devices, otherwise on /usr/local/puredata-patches/.