infratec, Bitblazer
I can do a snd_rawmidi_write(hnd, @buffer, len) or snd_rawmidi_read(hnd, @buffer, len) with sysex strings upto several kBytes. But that specific string is absolutely no midi data -p hw:1,0,0 -r /dev/null -t 1
Besides, this part hw:1,0,0 is formed by the specific midi port, which I also can determine and select.
But how to handle the rest, -p and -r /dev/null -t 1, how to send that complete thing via midi ?
Maybe Bitblazer's way can be of help, if I can get it figured out like should (didn't succeed with many try outs).
But as I can handle all types of midi data, I prefer doing it that way.
Code: Select all
Compiler = RunProgram("/usr/bin/xterm", "", "", #PB_Program_Open | #PB_Program_Read) ; |#PB_Program_Write|#PB_Program_Connect)
Output$ = "amidi -p hw:1,0,0 -r /dev/null -t 1"
If Compiler
While ProgramRunning(Compiler)
If AvailableProgramOutput(Compiler)
WriteProgramString(Compiler, Output$, #PB_UTF8)
;Output$ + ReadProgramString(Compiler) + Chr(13)
EndIf
Wend
Output$ + Chr(13) + Chr(13)
Output$ + "Exitcode: " + Str(ProgramExitCode(Compiler))
CloseProgram(Compiler) ; Close the connection to the program
EndIf
MessageRequester("Output", Output$)
Usage: amidi options
-h, --help this help
-V, --version print current version
-l, --list-devices list all hardware ports
-L, --list-rawmidis list all RawMIDI definitions
-p, --port=name select port by name **************
-s, --send=file send the contents of a (.syx) file
-r, --receive=file write received data into a file **************
-S, --send-hex="..." send hexadecimal bytes
-d, --dump print received data as hexadecimal bytes
-t, --timeout=seconds exits when no data has been received
for the specified duration **************
-a, --active-sensing include active sensing bytes
-c, --clock include clock bytes
-i, --sysex-interval=mseconds delay in between each SysEx message