Re: [LAU] how can I send a midi command from bash through jack to my HW controller?

From: David Kastrup <dak@email-addr-hidden>
Date: Sun Oct 08 2017 - 13:07:26 EEST

Athanasios Silis
<athanasios.silis-Re5JQEeQqe8AvxtiuMwx3w@email-addr-hidden> writes:

> So even though I thought this would be easy , I am stuck somewhere.
>
> The command I am trying to use is
> amidi -p"14:0" -S <3x bytes depicting the midi CC command>

amidi uses hardware ports, not sequencer ports.

They look like

dak@email-addr-hidden:/usr/local/tmp/lilypond$ amidi -l
Dir Device Name
IO hw:1,0,0 UM-4 MIDI 1
IO hw:1,0,1 UM-4 MIDI 2
IO hw:1,0,2 UM-4 MIDI 3
IO hw:1,0,3 UM-4 MIDI 4

> now port "14" SHOULD be the "Midi Through port as it appears in qjackctl's
> "midi" tab. I got it from
> $ aconnect -i -o
> client 0: 'System' [type=kernel]
> 0 'Timer '
> 1 'Announce '
> client 14: 'Midi Through' [type=kernel]
> 0 'Midi Through Port-0'
> client 16: 'TerraTec DMX6Fire' [type=kernel]
> 0 'MIDI-Front DMX6fire 0'
> 32 'Wavetable DMX6fire 0'
> client 24: 'Hoontech SoundTrack Audio DSP24' [type=kernel]
> 0 'MIDI-1 Hoontech/STA DSP24 2'
> 32 'MIDI-2 Hoontech/STA DSP24 2'
> client 28: 'Hoontech SoundTrack Audio DSP24' [type=kernel]
> 0 'MIDI-1 Hoontech/STA DSP24 3'
> 32 'MIDI-2 Hoontech/STA DSP24 3'
> client 32: 'BCR2000' [type=kernel]
> 0 'BCR2000 MIDI 1 '
> 1 'BCR2000 MIDI 2 '
> 2 'BCR2000 MIDI 3 '
>
> but running "amidi -p14:0 -S <hexbytes>" returns
> cannot open port "14:0": No such file or directory

I have no idea why you would not use 32:0 if the BCR2000 is explicitly
listed as such. However, again those are sequencer ports, not hardware
ports.

On my system, I'd see

dak@email-addr-hidden:/usr/local/tmp/lilypond$ 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: 'UM-4' [type=kernel,card=1]
    0 'UM-4 MIDI 1 '
    1 'UM-4 MIDI 2 '
    2 'UM-4 MIDI 3 '
    3 'UM-4 MIDI 4 '

But I would not use 20:0 for amidi but rather hw:1,0,0 . "UM-4 MIDI 1"
doesn't work either: it's just there for informational purposes.

dak@email-addr-hidden:/usr/local/tmp/lilypond$ amidi -p 20:0 -d
ALSA lib rawmidi.c:286:(snd_rawmidi_open_noupdate) Unknown RawMidi 20:0
cannot open port "20:0": No such file or directory
dak@email-addr-hidden:/usr/local/tmp/lilypond$ amidi -p hw:1,0,0 -d
^C
0 bytes read
dak@email-addr-hidden:/usr/local/tmp/lilypond$ amidi -p "UM-4 MIDI 1" -d
ALSA lib rawmidi.c:286:(snd_rawmidi_open_noupdate) Unknown RawMidi UM-4 MIDI 1
cannot open port "UM-4 MIDI 1": No such file or directory

-- 
David Kastrup
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
https://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Sun Oct 8 16:15:01 2017

This archive was generated by hypermail 2.1.8 : Sun Oct 08 2017 - 16:15:01 EEST