[Cin] From depth of time ... Cinelerra + midi control!
randrianasulu at gmail.com
Thu Jan 21 18:43:09 CET 2021
В сообщении от Thursday 21 January 2021 20:29:12 Phyllis Smith via Cin написал(а):
> This is way beyond my knowledge but I did see the following:
Not sure if it does what we want ? (more like internal midi re-router?)
I found one thing too:
This cannot be done without some programming.
First, test how to detect MIDI events. Go to a terminal, and run aseqdump -l to list the MIDI ports; this outputs something like this:
$ aseqdump -l
Port Client name Port name
0:0 System Timer
0:1 System Announce
14:0 Midi Through Midi Through Port-0
24:0 Xonar D2 Xonar D2 MIDI
32:0 Yamaha DS-1E (YMF754) Yamaha DS-1E (YMF754) MIDI
Then run it with the client name to check whether events arrive:
$ aseqdump -p "Xonar D2"
Waiting for data. Press Ctrl+C to end.
Source Event Ch Data
24:0 Note on 0, note 64, velocity 86
24:0 Note on 0, note 48, velocity 80
24:0 Note off 0, note 48
24:0 Note on 0, note 68, velocity 84
24:0 Note on 0, note 52, velocity 88
24:0 Note off 0, note 64
24:0 Note off 0, note 52
24:0 Note off 0, note 68
Second, to simulate key strokes, you need xdotool. If you do not yet have it installed, run sudo apt-get install xdotool. You can use type to type text, or key to simulate special keys:
xdotool type Hello, World!
xdotool key ctrl+p
Please note that not all special keys are handled correctly by xdotool. And Ctrl+Alt+Del is handled very specially by the kernel and probably does not work when simulated; try running sudo reset instead of xdotool.
Finally, tie everything together with a script. Put this into a text file, for example, ~/bin/midi-to-keys:
aseqdump -p "Xonar D2" | \
while IFS=" ," read src ev1 ev2 ch label1 data1 label2 data2 rest; do
case "$ev1 $ev2 $data1" in
"Note on 64" ) xdotool type hello ;;
"Note on 48" ) xdotool key ctrl+j ;;
Make it executable (chmod +x ~/bin/midi-to-keys), and run it (~/bin/midi-to-keys). Now, pressing E-5 or C-4 should have some effect.
Change or add lines of the form "Note on x" ) command ;; to do whatever you want.
edited Jan 23 '17 at 7:12
and there was second answer leading to
===== description ====
m2i(midi to input) is a small service like application that runs scripted actions in response to to midi events. Actions can be mouse, keyboard events, commands and more midi events. m2i can receive midi events from either the ALSA and or Jack midi sequencer.
I hope qt5 dependency is optional :}
> On Thu, Jan 21, 2021 at 10:21 AM Andrea paz via Cin <
> cin at lists.cinelerra-gg.org> wrote:
> > For windows there is "Bome MIDI translator Pro" which allows you to
> > bind the keys of any MIDI device to work in various NLEs.
> > https://www.bome.com/products/miditranslator
> > Is there something like this for Linux?
> > --
> > Cin mailing list
> > Cin at lists.cinelerra-gg.org
> > https://lists.cinelerra-gg.org/mailman/listinfo/cin
More information about the Cin