Script for launching PD patch with MIDI without aconnect

ah ha, I have found a solution, though it feels terrible…

after my launch command, if I do this it works:
sleep 3 aconnect 'Teensy MIDI':0 'Pure Data':0
but this feels like a bad solution, since I guess it’s just waiting for long enough that hopefully the patch will be launched and the MIDI ports in Pure Data will be available.