For various reasons I’d like to launch a PD patch on my raspi with the Pisound without pressing the button - I’d like to have it run on startup. I’m using a headless Pi running the latest “lite” raspbian and the latest PD version.
My patch includes MIDI input. I’m currently able to get this working by launching the patch in the background, and then using aconnect
to connect the MIDI input (either from the Pisound DIN connectors or USB) to my PD patch.
At the moment I am putting the following line at the bottom of /etc/profile to get it to launch at startup:
puredata -stderr -nogui -alsa -audioadddev pisound -alsamidi -channels 2 -r 48000 -mididev 1 mypatch.pd $@ &
that launches the patch fine, but then I have to type "connect 20:0 128:0
to get the MIDI working. I’d much prefer this to happen automatically. I imagine there’s a good way to script this but I don’t really know what it is, any tips?