Amidiminder utility

where should I find the log file?

Got it:

-- Boot 9940650adba14d5abf4edc3c636a3031 --
Feb 21 19:43:22 patchbox systemd[1]: Started ALSA MIDI minder daemon.
Feb 21 19:43:22 patchbox amidiminder[498]: reading rules from /etc/amidiminder.rules
Feb 21 19:43:22 patchbox amidiminder[498]: adding rule .hw --> .app
Feb 21 19:43:22 patchbox amidiminder[498]: adding rule .app --> .hw
Feb 21 19:43:22 patchbox amidiminder[498]: adding rule Axiom 49:0 --> Axoloti Core:0
Feb 21 19:43:22 patchbox amidiminder[498]: adding rule Axiom 49:0 --> Arturia BeatStep Pro:1
Feb 21 19:43:22 patchbox amidiminder[498]: adding rule Axiom 49:0 --> Arturia BeatStep Pro:0
Feb 21 19:43:22 patchbox amidiminder[498]: adding rule Arturia BeatStep Pro:1 --> Axoloti Core:0
Feb 21 19:43:22 patchbox amidiminder[498]: adding rule Arturia BeatStep Pro:0 --> Axoloti Core:0
Feb 21 19:43:22 patchbox amidiminder[498]: adding rule *:* -x-> RtMidiIn Client:*
Feb 21 19:43:22 patchbox amidiminder[498]: adding rule RtMidiOut Client:* -x-> *:*
Feb 21 19:43:22 patchbox amidiminder[498]: port added Arturia BeatStep Pro:Arturia BeatStep Pro Arturia Be [20:0]
Feb 21 19:43:22 patchbox amidiminder[498]: port added Arturia BeatStep Pro:Arturia BeatStep Pro BeatStepPr [20:1]
Feb 21 19:43:22 patchbox amidiminder[498]: port added Axoloti Core:Axoloti Core Axoloti Core [24:0]
Feb 21 19:43:22 patchbox amidiminder[498]: connecting Arturia BeatStep Pro:Arturia BeatStep Pro BeatStepPr [20:1] --> Axoloti Core:Axoloti Core Axoloti Core [24:0], by rule: Arturia BeatSt>
Feb 21 19:43:22 patchbox amidiminder[498]: connecting Arturia BeatStep Pro:Arturia BeatStep Pro Arturia Be [20:0] --> Axoloti Core:Axoloti Core Axoloti Core [24:0], by rule: Arturia BeatSt>
Feb 21 19:43:22 patchbox amidiminder[498]: port added Axoloti Core:Axoloti Core Axoloti Core [28:0]
Feb 21 19:43:22 patchbox amidiminder[498]: connecting Arturia BeatStep Pro:Arturia BeatStep Pro BeatStepPr [20:1] --> Axoloti Core:Axoloti Core Axoloti Core [28:0], by rule: Arturia BeatSt>
Feb 21 19:43:22 patchbox amidiminder[498]: connecting Arturia BeatStep Pro:Arturia BeatStep Pro Arturia Be [20:0] --> Axoloti Core:Axoloti Core Axoloti Core [28:0], by rule: Arturia BeatSt>
Feb 21 19:43:22 patchbox amidiminder[498]: port added Midi Through:Midi Through Port-0 [14:0]
Feb 21 19:43:22 patchbox amidiminder[498]: port added Arturia BeatStep Pro:Arturia BeatStep Pro Arturia Be [20:0]
Feb 21 19:43:22 patchbox amidiminder[498]: port added Arturia BeatStep Pro:Arturia BeatStep Pro BeatStepPr [20:1]
Feb 21 19:43:22 patchbox amidiminder[498]: port added Axoloti Core:Axoloti Core Axoloti Core [24:0]
Feb 21 19:43:22 patchbox amidiminder[498]: port added Axoloti Core:Axoloti Core Axoloti Core [28:0]
Feb 21 19:43:34 patchbox amidiminder[498]: port added RtMidiIn Client:TouchOSC Bridge [130:0]
Feb 21 19:43:34 patchbox amidiminder[498]: port added RtMidiOut Client:RtMidiIn Client:TouchOSC Bridge 130:0 [131:0]
Feb 21 19:43:34 patchbox amidiminder[498]: observed connection "RtMidiOut Client":"RtMidiIn Client:TouchOSC Bridge 130:0" --> "Arturia BeatStep Pro":"Arturia BeatStep Pro Arturia Be"
Feb 21 19:43:34 patchbox amidiminder[498]: observed connection "RtMidiOut Client":"RtMidiIn Client:TouchOSC Bridge 130:0" --> "Axoloti Core":"Axoloti Core Axoloti Core"
Feb 21 19:43:34 patchbox amidiminder[498]: observed connection "RtMidiOut Client":"RtMidiIn Client:TouchOSC Bridge 130:0" --> "Axoloti Core":"Axoloti Core Axoloti Core"
Feb 21 19:43:34 patchbox amidiminder[498]: observed connection "RtMidiOut Client":"RtMidiIn Client:TouchOSC Bridge 130:0" --> "RtMidiIn Client":"TouchOSC Bridge"
Feb 21 19:43:35 patchbox amidiminder[498]: observed disconnection Arturia BeatStep Pro:Arturia BeatStep Pro Arturia Be [20:0] --> Axoloti Core:Axoloti Core Axoloti Core [24:0]
Feb 21 19:43:35 patchbox amidiminder[498]: observed disconnection Arturia BeatStep Pro:Arturia BeatStep Pro Arturia Be [20:0] --> Axoloti Core:Axoloti Core Axoloti Core [28:0]
Feb 21 19:43:35 patchbox amidiminder[498]: observed disconnection Arturia BeatStep Pro:Arturia BeatStep Pro BeatStepPr [20:1] --> Axoloti Core:Axoloti Core Axoloti Core [24:0]
Feb 21 19:43:35 patchbox amidiminder[498]: observed disconnection Arturia BeatStep Pro:Arturia BeatStep Pro BeatStepPr [20:1] --> Axoloti Core:Axoloti Core Axoloti Core [28:0]
Feb 21 19:43:35 patchbox amidiminder[498]: observed disconnection RtMidiOut Client:RtMidiIn Client:TouchOSC Bridge 130:0 [131:0] --> Arturia BeatStep Pro:Arturia BeatStep Pro Arturia Be [2>
Feb 21 19:43:35 patchbox amidiminder[498]: observed disconnection RtMidiOut Client:RtMidiIn Client:TouchOSC Bridge 130:0 [131:0] --> Axoloti Core:Axoloti Core Axoloti Core [24:0]
Feb 21 19:43:35 patchbox amidiminder[498]: observed disconnection RtMidiOut Client:RtMidiIn Client:TouchOSC Bridge 130:0 [131:0] --> Axoloti Core:Axoloti Core Axoloti Core [28:0]
Feb 21 19:43:35 patchbox amidiminder[498]: observed disconnection RtMidiOut Client:RtMidiIn Client:TouchOSC Bridge 130:0 [131:0] --> RtMidiIn Client:TouchOSC Bridge [130:0]
lines 2956-3008/3008 (END)

Ok, we see it notices the disconnections, something must be executing something like aconnect -x that disconnects everything. It might be a patchbox module or something else.

What’s the output of:

systemctl status patchbox-init

Also, what’s the output of:

cat /etc/environment

systemctl status patchbox-init:

Feb 22 17:02:39 patchbox systemd[1]: Started Patchbox Init.
Feb 22 17:02:39 patchbox patchbox[795]: 2023-02-22.17:02:39: Pisound MIDI device not found!
Feb 22 17:02:39 patchbox patchbox[795]: 2023-02-22.17:02:39: Blink.
Feb 22 17:02:39 patchbox patchbox[795]: 2023-02-22.17:02:39: Killing all Pure Data instances!
Feb 22 17:02:39 patchbox patchbox[809]: puredata: no process found
Feb 22 17:02:39 patchbox patchbox[795]: 2023-02-22.17:02:39: Done, flashing LEDs.
Feb 22 17:02:39 patchbox patchbox[795]: 2023-02-22.17:02:39: Blink.
Feb 22 17:02:39 patchbox patchbox[795]: 2023-02-22.17:02:39: Blink.
Feb 22 17:02:39 patchbox systemd[1]: patchbox-init.service: Succeeded.
Feb 22 17:02:39 patchbox systemd[1]: patchbox-init.service: Consumed 1.136s CPU time.

cat /etc/environment:

JACK_PROMISCUOUS_SERVER=jack
PATCHBOX_MODULE_ACTIVE=/usr/local/patchbox-modules/puredata/

Run patchbox module deactivate, it should sort this out.

It did fix it. What if I want autorun pd patches headless?

Is it possible to autoconnect midi devices to RtMidiIn Client:TouchOSC.

Im trying but I cant get the rule to route the connection. Everything else is working with the touchOSC.

I just need to route manually the devices via aconnect Gui after booting. And I really would like to just create rule for it to be done with Amidiminder.

reading rules from /etc/amidiminder.rules
adding rule .hw → .app
adding rule .app → .hw
adding rule Axiom 49:0 → Axoloti Core:0
adding rule Axiom 49:0 → Arturia BeatStep Pro:1
adding rule Axiom 49:0 → Arturia BeatStep Pro:0
adding rule Arturia BeatStep Pro:1 → Axoloti Core:0
adding rule Arturia BeatStep Pro:0 → Axoloti Core:0
adding rule Arturia BeatStep Pro:0 → RtMidiIn Client:0
adding rule 132:0 → 131:0
adding rule : -x-> RtMidiIn Client:*
adding rule RtMidiOut Client:* -x-> :
patch@patchbox:~ $ aconnect -i -o
client 0: ‘System’ [type=kernel]
0 'Timer ’
1 'Announce ’
client 14: ‘Midi Through’ [type=kernel]
0 ‘Midi Through Port-0’
client 20: ‘Axiom 49’ [type=kernel,card=1]
0 ‘Axiom 49 Axiom USB Out’
1 ‘Axiom 49 DirectLink Out’
2 ‘Axiom 49 Axiom Ext In’
client 24: ‘Arturia BeatStep Pro’ [type=kernel,card=2]
0 ‘Arturia BeatStep Pro Arturia Be’
1 ‘Arturia BeatStep Pro BeatStepPr’
client 28: ‘Axoloti Core’ [type=kernel,card=3]
0 ‘Axoloti Core Axoloti Core’
client 32: ‘Axoloti Core’ [type=kernel,card=4]
0 ‘Axoloti Core Axoloti Core’
client 131: ‘RtMidiIn Client’ [type=user,pid=800]
0 'TouchOSC Bridge ’
client 132: ‘RtMidiOut Client’ [type=user,pid=800]
0 ‘RtMidiIn Client:TouchOSC Bridge 131:0’

I wonder if I have wrong rules for the TouchOSC

I just want the Beatstep Out to go to TouchOSC bridge.

I got it working, just had some wrong Rules :confused: Sorry for hyperactive forum behavior :grimacing:

It shouldn’t be running aconnect -x on Patchbox OS - could you check the output of these commands:

cd /usr/local/pisound/
git status