Hello everyone!
I am trying to connect my arduino leonardo, which acts like a midi usb device, to puredata on startup. I can manually connect the device with aconnectgui, but nothing I have tried connects the device on startup.
I have a thread on raspberry pi forums about this -> Rasberry Pi forum
Please help me.
-
Connecting midi device with pd on startup
-
qjackctl and patchage can store and recall patch configurations for audio and midi. You can also use aconnect to complete patches through the shell. Something like this could keep it all in the patch:
[loadbang]
|
[aconnect 130:0 129:0(
|
[shell]any technology distinguishable from magic
is insufficiently advanced. -
I use ttymidi and pd. To connect both on startup, you have to create .desktop file on rpi and .sh file
The .desktop file tut: https://learn.sparkfun.com/tutorials/how-to-run-a-raspberry-pi-program-on-startup/allfor the .sh put this code:
#!/bin/bash
ttymidi -s /dev/ttyUSB0 -v &
echo "start pd ptach"
(
sleep 2.5
echo "Connecting MIDI"
aconnect ttymidi:0 "Pure Data:0"
aconnect "Pure Data:1" ttymidi:1
) &
/usr/bin/pd /home/patch/you_folder/your_puredata_file.pd -
Thank you! I'll try these methods out and let you know!
-
You can also check IOhannes' [aconnect] external object, it works great!