kazeko
February 21, 2025, 7:28pm
1
hi there
i am running headless PD on patchbox os 2024 on rpi5
my pd patch consists midi processing and for that amidiminder take cares of it
as for audio part of my patch i cannot make it work while started from rc.local
but just after boot is complete,i do htop and i can see pd and jack process running but no sound is coming out
when ssh to it ,sudo killall pd ,and then pd -nogui -open “mypatch”,it works right away
any ideas?
,i have spent whole day allready trying everything i found/can ,and it seems there is only problem when i try to launch it from rc.local
What’s the contents of your rc.local
?
It might be simpler to launch it as Pure Data module via patchbox
, place your PD file in /usr/local/puredata-patches/<your_subfolder>/main.pd
kazeko
February 22, 2025, 11:04am
3
my rc.local
#!/bin/sh
#temp
sudo modprobe snd-virmidi index=5 midi_devs=1
#temp
sleep 10
#temp
amidiminder -f /etc/amidiminder.rules -C
#pd -noaudio -midiindev 1,2,3,4 -midioutdev 1,2,3,4 -alsamidi -nogui -path ~/Documents/Pd/externals/else -lib else -nrt -verbose -d 4 /home/pd/pi4midi.pd &
#temp
pd -jackconnect -midiindev 1,2,3,4,5 -midioutdev 1,2,3,4,5 -alsamidi -nogui -path /home/patch/Documents/Pd/externals/ -lib else /home/pd/pi4midibox.pd &
#pd -noaudio -midiindev 1,2,3,4 -midioutdev 1,2,3,4 -alsamidi -nogui -nrt -batch &
#temp
amidiminder -f /etc/amidiminder.rules -C
sudo systemctl restart amidiminder
sudo systemctl restart raveloxmidi.service
exit 0
kazeko
February 22, 2025, 11:46am
4
when i try patchbox modules pd i get this
i did update patch os before
kazeko
February 22, 2025, 6:34pm
6
notice
i installed Pi os 64 bookworm lite with pulseaudio,and run pd with -pa and this way it works
bests
Fixed this in patchbox-cli
package, the fix is available since version 1.4.0-5
. You can run:
sudo apt update
sudo apt install patchbox-cli
to get the fix.
Btw, in our experience, the Jack audio backend provides the lowest audio latency, in case there’s any such issues with Pulse Audio, try Jack instead, otherwise, if it works, it works.
1 Like
kazeko
February 24, 2025, 2:37pm
9
it just does not want to work when from rc.local
all good from command line but not from rc.local
i stick with pi os lite,for now
maybe i come back to this later on cause would be nice to have patchbox since it is audio dedicated distro
thx!
kazeko
March 10, 2025, 11:47pm
10
i think i found it
well it seems that running in RC.LOCAL does not load the settings from /home/pi/.pdsettings
so you need to tell pd to load it when from RC.LOCAL by using -prefsfile /home/pi/.pdsettings
and vua la
all the externals and settings is loaded as it should be
1 Like
I prefer to use the [declare] object in .pd file with the required library paths, for externals that come through .deb, this way, if you were to share the .pd file with someone else with a Debian compatible system, it should just work, as long as the necessary PD exernal debs are installed, without any additional per-user setup.