Amidiauto on latest Raspbian

#1

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?

0 Likes

#2

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.

0 Likes

#3

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

0 Likes

#4

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?

0 Likes

#5

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

0 Likes

#6

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

0 Likes

#7

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.

0 Likes

#8

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

0 Likes

#9

/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.

0 Likes

#10

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?

0 Likes

#11

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:

0 Likes