<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hey friends,</div>

<div>i have a raspberry pi that executes a bash script on startup. Inside this bash script I want two things to happen.</div>

<div>1) start my pd patch</div>

<div>2) connect my launchpad mini (connected via usb) to pd using the aconnect-command</div>

<div> </div>

<div> </div>

<div>..i think i have to use aconnect because in pd itself i only see alsa midi as a midi device. </div>

<div> </div>

<div> </div>

<div>At the moment, my bash script only looks like this:</div>

<div> </div>

<div>
<p>#!/bin/bash</p>

<p>sudo /usr/local/bin/pd -nogui -rt -open /home/pi/Documents/RSP/RSP/myPatch.pd</p>

<p>aconnect <b>'Pure Data'</b>:1 <b>'Launchpad Mini'</b>:0</p>

<p>aconnect <b>'Launchpad Mini'</b>:0 <b>'Pure Data'</b>:0</p>

<p> </p>

<p>The problem is that the aconnect-commands seem to be not executed or executed too early because the virtual midi connections are not made.</p>

<p>The aconnect-commands have to be done after pd is started, so how could I change the script to wait until pd is done loading?</p>

<p>Thanks!</p>
</div></div></body></html>