# Script for launching PD patch with MIDI without aconnect

**URL:** <https://community.blokas.io/t/script-for-launching-pd-patch-with-midi-without-aconnect/1010>\
**Category:** Support\
**Created:** [February 8, 2019, 2:27pm UTC](https://community.blokas.io/t/script-for-launching-pd-patch-with-midi-without-aconnect/1010 "2019-02-08T14:27:46Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Giedrius](https://community.blokas.io/letter_avatar_proxy/v4/letter/g/6a8cbe/32.png) [@Giedrius](https://community.blokas.io/u/Giedrius)\
**Post date:** [February 8, 2019, 2:51pm UTC](https://community.blokas.io/t/script-for-launching-pd-patch-with-midi-without-aconnect/1010/3 "2019-02-08T14:51:13Z")

</div>

Hey! We see the same difficulty of setting up MIDI software connections over and over again, so we’ve come up with a tiny program running in the background which we haven’t announced yet, but will do that soon 🙂

What it does is it sits in the background, waiting for MIDI software / hardware ports to appear in the system, then it automatically connects the very first Input / Output pair of software and hardware ports together.

Anyway, I think your scenario is perfect to give it a try, you can find the code here: [https://github.com/BlokasLabs/amidiauto](https://github.com/BlokasLabs/amidiauto)

To install (you may have to first install `libasound2-dev` via apt-get):

```auto
git clone https://github.com/BlokasLabs/amidiauto
cd amidiauto
make
sudo make install

```

Then to get it started automatically, add to the script you use to start PD, above `puredata` line:

`amidiauto &`

(the & makes it run in the background)

---

_[View the full topic](https://community.blokas.io/t/script-for-launching-pd-patch-with-midi-without-aconnect/1010)._
