JAPP Posted June 8, 2019 Share Posted June 8, 2019 Hello la_saucisse, Welcome to the forum and your English is fine. In the interest of solidarity - I have had the same experience as you. I could find and select my devices and could get the notes working, but couldn't get any farther. I eventually gave up - I hope you have better luck. If you can make some headway with this maybe I'll be able to dust off my old stuff and get working on it again! Best of luck. Link to comment Share on other sites More sharing options...
shuptuu Posted March 31, 2021 Share Posted March 31, 2021 Hi, I know this is an old thread, but I spent quite a long time to figure out sysex sending, so I want to share the solution I found: Func SendSysex($HEXmessage) Local $data="0xF0" & $HEXmessage & "F7" Local $dbinary= Binary($data) Local $dlen=BinaryLen($dbinary) Local $stPreparedMidiHdr=_MidiOutPrepareHeader($hMidiOut2,$dbinary,$dlen,$dlen,"",0x03) ; 0x03 for "MHDR_PREPARED" _MidiOutLongMsg($hMidiOut2, $stPreparedMidiHdr) EndFunc Enjoy! Link to comment Share on other sites More sharing options...
shuptuu Posted March 31, 2021 Share Posted March 31, 2021 take care, my code is for a secondary midi out called $hMidiOut2 If you just have one midi out with device name $hMidiOut, try this: Func SendSysex($HEXmessage) Local $data="0xF0" & $HEXmessage & "F7" Local $dbinary= Binary($data) Local $dlen=BinaryLen($dbinary) Local $stPreparedMidiHdr=_MidiOutPrepareHeader($hMidiOut2,$dbinary,$dlen,$dlen,"",0x03) ; 0x03 for "MHDR_PREPARED" _MidiOutLongMsg($hMidiOut, $stPreparedMidiHdr) EndFunc Link to comment Share on other sites More sharing options...
shuptuu Posted April 1, 2021 Share Posted April 1, 2021 Sorry, forgot to change in the _MidiOutPrepareHeader... And can't find the way to modify my post.... So the good code: Func SendSysex($HEXmessage) Local $data="0xF0" & $HEXmessage & "F7" Local $dbinary= Binary($data) Local $dlen=BinaryLen($dbinary) Local $stPreparedMidiHdr=_MidiOutPrepareHeader($hMidiOut,$dbinary,$dlen,$dlen,"",0x03) ; 0x03 for "MHDR_PREPARED" _MidiOutLongMsg($hMidiOut, $stPreparedMidiHdr) EndFunc Link to comment Share on other sites More sharing options...
binbinhfr Posted October 26, 2021 Share Posted October 26, 2021 sorry to wake up this thread, but this UDF is very interesting. I manage to send some MIDI to the output, but I did not succeed in receiving MIDI messages (simple and complex ones like SYSEX). Does anybody have an example of MIDI receive to share ? Thanks Link to comment Share on other sites More sharing options...
JAPP Posted November 2, 2021 Share Posted November 2, 2021 Hello binbinhfr, Take a look at my MasterRouter script, it may be of some help. Good luck! - MasterRouter.au3JAPP binbinhfr 1 Link to comment Share on other sites More sharing options...
binbinhfr Posted November 2, 2021 Share Posted November 2, 2021 (edited) 1 hour ago, JAPP said: Hello binbinhfr, Take a look at my MasterRouter script, it may be of some help. Good luck! - MasterRouter.au3JAPP Hi @JAPP Thanks fo your help. It's exactly what I needed ! Edited November 2, 2021 by binbinhfr Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now