QLC4.12.3 on OSX catalina here.
i need to send MIDI Program change _AND_ MIDI CC Messages from QLC, and since i found no way to do that,
i made a bash script, that upon every invocation outputs a new set of Bank select and Program change MIDI commands to a MIDI-connected Laser Synthesizer( Radiator , https://www.neoncaptain.com/#/).
The script reads two values from another file(called "scene.txt"), sends them via sendmidi (https://github.com/gbevin/SendMIDI) and increments a counter in a third file("pointer.txt").
For testing purposes, i send MIDI data to the free PROTOKOL MIDI Monitor.
This script takes no arguments and works well, when i start it on the command line.
But when i start it from within QLC via the Script editor function"systemcommand" with no arguments, the computer says "test", but no MIDI data are written.
Assigning MIDI output to any universe does not make a difference.
Anyway, QLC should be unaware of any MIDI Data, since its not sending or receiving them.
how do i get my script to perform as intended?
this is the script:
Code: Select all
#!/bin/bash
# reads next position from $Pointer,
# then outputs the 2 values of that postion in
# $scene
say "test" # <-------THIS WORKS , but not the rest !
workdir="/Users/dirk/"
# file holding pointer to next line to read:
pointer="pointer.txt"
# file holding banks and programs:
scene="./scene.txt"
# output device:
dev="Protokol"
#dev="USB2.0-MIDI Anschluss 2"
#dev="Unitor8/AMT8 Port 1"
read -r linecnt < $pointer
read -r max_count < <(sed "1!d; q" $scene)
echo " max_count: $max_count linecnt: $linecnt "
read -r bank_change program_change < <(sed "$linecnt!d; q" $scene)
echo "bank_change: $bank_change program_change: $program_change"
/usr/local/bin/sendmidi dev $dev cc 32 "$bank_change" PC "$program_change"
if [ $linecnt -gt $max_count ]
then
let linecnt=1
fi
echo $((linecnt + 1)) > $pointer
Code: Select all
521
0 00
0 01
0 02
0 03
0 04
0 05
0 06
0 07
0 08
0 09
0 10
0 11
0 64
0 65
0 66
9 99