I have the following patch that is working on my Mac.
I upload it to my Pi 2 and when I try to open it pd crashing and close itself.
Can someone see what the issue might be?
-
pd keep crashing when open a patch on Pi 2
-
@KMETE You shouldn't need to reboot, although you can of course.
Discussion here.... https://stackoverflow.com/questions/696839/how-do-i-write-a-bash-script-to-restart-a-process-if-it-dies
David. -
@whale-av said:
this is a little above my head.. How can I make it work for my pd patch?
there is more than 1 answer in that thread. Could you please direct me to one of them?Thanks
-
Hi,
Ideally you should write a systemd config file and let the system restart your patch when neededCreate a new service with
sudo systemctl edit --force --full my_puredata.service
paste this code and customize it
[Unit] Description=My PureData service [Service] Type=simple LimitNOFILE=1000000 ExecStart=/usr/bin/puredata -open /home/pi/mypatch.pd WorkingDirectory=/home/pi User=pi Group=pi Restart=always # Restart service after 10 seconds if service crashes RestartSec=10 [Install] WantedBy=multi-user.target
then run
sudo systemctl enable my_puredata.service
to enable autorun at rpi start
and
sudo systemctl start my_puredata.service
to launch it just nowWork in progress : FCPD a FreeCAD PureData connexion
-
@FFW
Thanks for your help!
my pd patch is already autostart. I don't remember how I did it, I think via the 'lxsession' as I found in that thread .
How can I disabled my way of autostart my pd patch?just to make sure I understand your script -
It will autostart my patch when first powering the pi as well restart it when it crashed?
Another question I regarding opening the pd patch without gui. Do you think is needed? it can help with something? if so - I can I load the pd patch without gui?
Thanks!
-
With systemd you don't need to open a user session. It saves resource and help to keep puredata reactive.
NB : I think you can't launch a GUI with systemd as the X server may not be launched when the service starts.
so you have to append the -nogui option to the ExecStart line.$ pd -help […] -nogui -- suppress starting the GUI […]
Work in progress : FCPD a FreeCAD PureData connexion
-
*edit: I have found it inside the lxesession folder .
*How can I find how and where my pd patch is starting and cancel it? :/ I don't want to write your script before I'm cancelling my autostart of the patch I have already made in the past. -
@FFW said:
then run
sudo systemctl enable my_puredata.service
to enable autorun at rpi start
and
sudo systemctl start my_puredata.service
to launch it just nowwhen I run the last line of code it should autostart my pure data patch if I did everything the right way? because it did not start my patch..
-
I have change the path in yellow to be the correct path where my pd patch is located.
What about the lines in purple and blue? Do I need to change them as well? because I did not.
If so - how can I know to what I should change them?Thanks
-
@KMETE
/usr/bin/puredata is the path to the executable, you can check it withwhereis puredata
WorkingDirectory is not used by PD but it's good to point to a user writable place.
-nogui is mandatory (I just test) as the systemctl process has no right on X server to start a GUI
You can see information about failure with
sudo systemctl stop my_puredata.service sudo systemctl status my_puredata.service
Work in progress : FCPD a FreeCAD PureData connexion
-
@FFW said:
-nogui is mandatory (I just test) as the systemctl process has no right on X server to start a GUI
Where do I add the -nogui command? inside the "MY PureData service" script?
-
@KMETE yes, in the ExecStart line
[Unit] Description=My PureData service [Service] Type=simple LimitNOFILE=1000000 ExecStart=/usr/bin/puredata -nogui -open /home/pi/mypatch.pd WorkingDirectory=/home/pi User=pi Group=pi Restart=always # Restart service after 10 seconds if service crashes RestartSec=10 [Install] WantedBy=multi-user.target
Work in progress : FCPD a FreeCAD PureData connexion
-
So here is the script I try to run with "sudo systemctl enable my_puredata.service"
I got the following error:
Do you see where my mistake is?
Thanks
-
@FFW
Thanks. No error now but the patch is not playing when I reboot my Pi.
Here is the command line after running:sudo systemctl status my_puredata.service
When I opened the same patch "mypatch.pd" with gut (I double clicked the pd patch) the sound is indeed coming out and everything is working.
Can you see where is my mistake?Thanks
-
I run again to check the status and I'm getting lots of errors now:
-
@FFW
I will try asap. (without the Pi now)I have another two question. One is related to Raspberry Pi.
-
Is it possible to load mp3 files instead of wav file or the tableread~ object can read only wav?
-
when I'm transferring audio files to the Pi (to the Documents folder for example) - Do they stored on the sd card? or on the internal Pi memory?
Thanks
-
-
Hi,
-
Try to search "mp3" on the forum: https://forum.pdpatchrepo.info/search/mp3?in=titlesposts&sortBy=timestamp&sortDirection=desc&showAs=posts
-
RPi has RAM and SD card. Until you create a tmpfs for your documents they're stored in the card.
Work in progress : FCPD a FreeCAD PureData connexion
-
-
my pd patch is larger then my screen size (need to scroll down and to the right in order to see the full patch)
However, when the patch is open in the pi I have no option to scroll in order to see the full patch.
How can I fix this?