[LAU] send a midi CC signal to my midi controller from bash

Athanasios Silis athanasios.silis at gmail.com
Tue Oct 13 11:05:35 UTC 2015


thank you Ralph, i'll look into it.

I took a midi dump (through arecordmidi) from my BCR2000 controller and
realised while reading the midi file that 2 byte values are stored locally
in a midi file lsb first. This is opposite to what I see here
http://www.somascape.org/midi/tech/mfile.html#midi . for example the midi
*MThd* : Header chunk, was written in the midi file as  54 4D 64 68 . and
chunklen as 00 00 06 00 . So this is one thing that I should keep in mind
when I send hex numbers.

also based on your analysis, can I just forget about all those headers when
I send a midi cc command? can I just send the midi even directly?

yes writing a function is not too hard = i do work in low lelvel
programming after all, biut I dunno if by mistake I send some cmd that can
fuck up the controller :)

On Tue, Oct 13, 2015 at 2:05 AM, Ralf Mardorf <ralf.mardorf at alice-dsl.net>
wrote:

> Begin forwarded message:
>
> Date: Tue, 13 Oct 2015 00:57:15 +0200
> From: Ralf Mardorf <ralf.mardorf at alice-dsl.net>
> To: Athanasios Silis <athanasios.silis at gmail.com>
> Subject: Re: [LAU] send a midi CC signal to my midi controller from bash
>
>
> Control Change bits of the three bytes are
>
> Byte 1, nnnn is for channel 0 to 15
>
> 1011 nnnn
>
> Byte 2, ccc cccc number of controller
>
> 0ccc cccc
>
> Byte 3, vvv vvvv value
>
> 0vvv vvvv
>
> It's not too hard to write a function using amidi that allows you to use
> it like that
>
> my_function interface channel controller value
>
> my_function 0 10 7 127
>
> It's comfortable to have a function that alows
> values from -63 to 0 to 64 and
> values from 0 to 127.
>
> Unfortunately I don't have time to search my scripts for such a
> function, but IIRC it wasn't hard to write it.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-user/attachments/20151013/1fd9aaae/attachment.html>


More information about the Linux-audio-user mailing list