play a note from bash command

37 views
Skip to first unread message

Jeronym Klimes

unread,
Aug 2, 2021, 5:15:26 PM8/2/21
to mididings
I have a simple situation:
A keybord currently controlled by mididings router.
And now I want to trigger via cron a bash script saying:

#!/bin/bash
mididings "play noteoneven port=20 Ab3 velocity, etc. "
sleep 3 seconds
mididings "play noteoffeven port=20 Ab3 velocity, etc. "
exit # the bash script

I am missing this trivial example in documentation or I am unable to get it out of it.

aconnect -l
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 20: 'CH345' [type=kernel,card=1]
    0 'CH345 MIDI 1    '
    Connecting To: 128:0
    Connected From: 128:1
client 128: 'Mididings Router' [type=user,pid=437]
    0 'in_1            '
    Connected From: 20:0
    1 'out_1           '
    Connecting To: 20:0

Thank you for the help.

:-)
jk

STEFETS - https://github.com/stefets/live-config/

unread,
Aug 13, 2021, 1:50:15 PM8/13/21
to mididings
Hi, I would use send_midi in your use case. It comes with mididings.

http://dsacre.github.io/mididings/doc/tools.html

send_midi

send_midi is a simple utility to send MIDI events to any ALSA or JACK MIDI client, using a terse command line format:

$ send_midi LinuxSampler:0 NOTEON,1,60,127 CTRL,2,7,66 $ send_midi -J mididings:in_.* PROGRAM,1,42 $ send_midi 14:0 SYSEX,F0,23,42,F7

See send_midi --help for a list of all command line options.

Stéphane Gagnon 

Reply all
Reply to author
Forward
0 new messages