1- # amidiminder
2- ALSA utility to keep your MIDI devices connected
1+ # amidiminder & amidiview
2+ ** amidiminder:** an ALSA utility to keep your MIDI devices connected
3+ ** amidiview:** a tool for managing connections
34
45### The problem
56
@@ -25,16 +26,64 @@ ALSA utility to keep your MIDI devices connected
2526 ... But when the MIDI port comes back - ` amidimider ` 's got your back and
2627 will connect them right back up again just as they were.
2728
29+ ### A bonus
30+
31+ ` amidiview ` provides an interactive terminal interface for looking at, and
32+ modifying the connections on your system. Try it... you won't regret it!
33+
34+ ``` sh
35+ & amidiview
36+ ```
37+
38+ Further, it includes all the functionality of ` aconnect ` (list, connect,
39+ disconnect), but allowing you to use ` amidiminder ` 's easy syntax for
40+ specifying ports. Often you can just use a part of the device name:
41+
42+ ``` sh
43+ & amidiview list
44+ Ports:
45+ MicroMonsta 2 : MIDI 1 [ 32:0] < ->
46+ Midi Through : Port-0 [ 14:0] < ->
47+ Midihub MH-1Z109TZ : MIDI 1 [ 36:0] < ->
48+ Midihub MH-1Z109TZ : MIDI 2 [ 36:1] < ->
49+ Midihub MH-1Z109TZ : MIDI 3 [ 36:2] < ->
50+ Midihub MH-1Z109TZ : MIDI 4 [ 36:3] < ->
51+ Pure Data : Midi-In 1 [130:0] < --
52+ Pure Data : Midi-Out 1 [130:1] -->
53+ Connections:
54+
55+ & amidiview connect Pure Monsta
56+ Connected Pure Data:Midi-Out 1 [130:1]+ --> MicroMonsta 2:MIDI 1 [32:0]+
57+
58+ & amidiview connect hub:2 Pure
59+ Connected Midihub MH-1Z109TZ:MIDI 2 [36:1] --> Pure Data:Midi-In 1 [130:0]+
60+
61+ & amidiview list
62+ Ports:
63+ MicroMonsta 2 : MIDI 1 [ 32:0] < ->
64+ Midi Through : Port-0 [ 14:0] < ->
65+ Midihub MH-1Z109TZ : MIDI 1 [ 36:0] < ->
66+ Midihub MH-1Z109TZ : MIDI 2 [ 36:1] < ->
67+ Midihub MH-1Z109TZ : MIDI 3 [ 36:2] < ->
68+ Midihub MH-1Z109TZ : MIDI 4 [ 36:3] < ->
69+ Pure Data : Midi-In 1 [130:0] < --
70+ Pure Data : Midi-Out 1 [130:1] -->
71+ Connections:
72+ Midihub MH-1Z109TZ:MIDI 2 [36:1] --> Pure Data:Midi-In 1 [130:0]+
73+ Pure Data:Midi-Out 1 [130:1]+ --> MicroMonsta 2:MIDI 1 [32:0]+
74+ ```
75+
2876
2977## Building
3078
3179Prerequisites:
32- * g++, 6 or later
80+ * g++, 8 or later
3381 * make
3482 * libasound2-dev
83+ * libfmt-dev
3584
3685``` sh
37- sudo apt install g++ make libasound2-dev
86+ sudo apt install g++ make libasound2-dev libfmt-dev
3887```
3988
4089Clone this repo and run ` make ` :
@@ -43,12 +92,13 @@ Clone this repo and run `make`:
4392git clone https://github.com/mzero/amidiminder.git
4493cd amidiminder
4594make
95+ make deb
4696```
4797
4898Outputs:
4999
50- - build executable is in ` build/amidiminder ` .
51- - deb package is in ` build/amidiminder.deb ` .
100+ - build executables: ` build/amidiminder ` & ` build/amidiview ` .
101+ - deb package, which is placed in the directory above .
52102
53103
54104## Install
@@ -57,39 +107,13 @@ Installing the built deb package will install a systemd service that runs
57107` amidiminder ` at startup.
58108
59109``` sh
60- sudo dpkg -i build/amidiminder .deb
110+ sudo apt install ../amidiminder_ * .deb
61111```
62112
63113That's it. — It's installed. — It's running — You're done!
64114
65115## Configuration
66116
67- ` amidiminder ` reads a rules file from ` /etc/amidiminder.rules ` . If you edit
68- that file, you can first check it is legal:
69-
70- ``` sh
71- amidiminder -C # checks the rules and then quits
72- ```
73-
74- Then, restart the service:
75-
76- ``` sh
77- sudo systemctl restart amidiminder
78- ```
79-
80- ### Rules Format
81-
82- Example:
83- ```
84- nanoKEY2 --> Circuit
85- # connects the first port for each device as shown
86-
87- bicycle <-- Launchpad Pro MK3
88- bicycle <-- Launchpad Pro MK3:2
89- bicycle:synths --> Circuit
90- # the port direction can go which ever way is convienent for you
91- # ports can be specified by number or by name
92- ```
93117
94118---
95119
0 commit comments