Amidiauto on latest Raspbian

I’ve just installed a fresh copy of Raspbian “Buster” Lite on a spare raspberry pi for the first time.

I would ideally like to use the amidiauto system for using MIDI devices easily, but it doesn’t seem to compile correctly on this new version of the OS. Or at least I think it isn’t working, I’m not very experienced in compiling.

When I clone the amidiauto and run “sudo make install” it gives me this error:
cp: cannot create regular file ‘/usr/lib/systemd/system/’: Not a directory
make: *** [Makefile:38: install] Error 1

I recognise that I could install Patchbox instead, but I’d rather not at the moment for various reasons. I also recognise that this OS has only been out for a few days! Any tips for getting it working?

Try doing:

sudo mkdir -p /usr/lib/systemd/system/

then run sudo make install again.

I haven’t tried the new Raspbian myself yet, so not sure if this will really fix it.

great minds think alike, I just tried that! restarting now…

ok well it didn’t throw any errors on install, and it put the amidiauto.service file in that folder, but I don’t think it’s actually working - my PD patches that use midi input aren’t working, and the normal messages that I’ve seen before when using amidiauto aren’t coming up.

so there might be some bigger issues to do with the new Raspbian OS that are making this difficult?

I’m reasonably sure that it did install, if I run amidiauto -version then it shows me “Version 1.01” etc.

Is PD configured to use ALSA MIDI? What is the output of aconnect -l when MIDI gear is connected, and PD is running?

oh right, I was being kind of dumb and forgetting to launch amidiauto correctly.

when I do that, it gives me this error:
Reading ‘/etc/amidiauto.conf’ failed! (-2)

sure enough, amidiauto.conf does not seem to be in the /etc/ folder.

oh wait I have it working! I don’t know why yet.

/etc/amidiauto.conf is optional, you can write custom rules there, if this file does not exist or its contents are invalid, amidiauto defaults to connect all software and hardware ports together.

following up on this: it’s sort of working, though it’s a little strange.

I have the following lines at the bottom of /etc/profile

amidiauto &

sudo puredata -stderr -nogui -alsa -alsamidi -channels 2 -mididev 1 ys.testmidi.pd

When I reboot the Pi the MIDI doesn’t work until I log into it over SSH, at which point the patch starts running with the USB MIDI device working correctly.

If I use that startup script to open a patch that doesn’t use MIDI (just a test tone) it works correctly without having to log in via SSH. So I suppose the act of logging in via SSH seems to be triggering the midi connections to happen somehow? Does that make any sense?

amidiauto should install itself as a systemd service, so you don’t need to explicitly run it, it should start on its own. I’ll look into amidiauto on latest Raspbian when working on updating our OS images once we have the new RPi4. :slight_smile:

Heya, I know it’s been a while but I’m revisiting this now. Has anyone managed to get this amidiauto system working with the latest OS (“Buster”)?

When I try to compile it I get the following error:
amidiauto.cpp:24:10: fatal error: alsa/asoundlib.h: No such file or directory
#include <alsa/asoundlib.h>

ok it looks like installing libasound2-dev may have allowed me to compile…I haven’t actually tried using it yet but fingers crossed

1 Like

That should do the trick :slight_smile: