Sysex on Windows 10

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Sysex on Windows 10

JohanZ
Dear all,

a long time lurker here.

I am trying to get Supercollider to write text to the LCD of my Push 1
by sending sysex messages to Push. It works nicely on MacOS,
but I have problems on Windows 10.

I ran this code with the compiled SC-version 3.8.0 :
// SC code start

MIDIClient.init;

//   m.free;

// Use for MacOS
//m = MIDIOut.newByName("Ableton Push", "User Port");

// Use for Windows 10
m = MIDIOut.newByName("MIDIOUT2 (Ableton Push)", "MIDIOUT2 (Ableton Push)");

// 240 71 127 21 {line} 0 69 0 {ASCII char1} {ASCII char2} … {ASCII char68} 247

// Write to first row

(

m.sysex(Int8Array[240, 71, 127 , 21 , 24 , 0 , 69 , 0]);

m.sysex('Welcome to       '.ascii.as(Int8Array));
m.sysex('Supercollider!   '.ascii.as(Int8Array));
m.sysex('Let\'s test some  '.ascii.as(Int8Array));
m.sysex('ASCII signs:      '.ascii.as(Int8Array));

m.sysex(Int8Array[247]);

)

// SC code end

On MacOS, this resulted in the first row of the LCD being updated properly.
On Windows 10, the code caused some pads to light up (at random), while
the LCD remains unchanged. This is from post window


*** Welcome to SuperCollider 3.8.0. *** For help press Ctrl-D.
SCDoc: Indexing help-files...
SCDoc: Indexed 1841 documents in 3.23 seconds
MIDI: device 0 3 930619808  (Microsoft GS Wavetable Synth)
MIDI: device 1 4 930619816  (Ableton Push)
MIDI: device 2 5 930619824  (MIDIOUT2 (Ableton Push))
MIDI Sources:
        MIDIEndPoint("Ableton Push", "Ableton Push")
        MIDIEndPoint("MIDIIN2 (Ableton Push)", "MIDIIN2 (Ableton Push)")
MIDI Destinations:
        MIDIEndPoint("Microsoft GS Wavetable Synth", "Microsoft GS Wavetable Synth")
        MIDIEndPoint("Ableton Push", "Ableton Push")
        MIDIEndPoint("MIDIOUT2 (Ableton Push)", "MIDIOUT2 (Ableton Push)")
-> MIDIClient
-> a MIDIOut
ERROR: Primitive '_SendSysex' failed.
Failed.
RECEIVER:
Instance of MIDIOut {    (000001F4E9221D88, gc=EC, fmt=00, flg=00, set=02)
  instance variables [3]
    port : Integer 2
    uid : Integer 2
    latency : Float 0.200000   9999999A 3FC99999
}
CALL STACK:
        MethodError:reportError   000001F4E78FA878
                arg this = <instance of PrimitiveFailedError>
        Nil:handleError   000001F4E81A5598
                arg this = nil
                arg error = <instance of PrimitiveFailedError>
        Thread:handleError   000001F4E821E718
                arg this = <instance of Thread>
                arg error = <instance of PrimitiveFailedError>
        Object:throw   000001F4E81DE7C8
                arg this = <instance of PrimitiveFailedError>
        Object:primitiveFailed   000001F4E7AFC578
                arg this = <instance of MIDIOut>
        < closed FunctionDef >  (no arguments or variables)
        Interpreter:interpretPrintCmdLine   000001F4E8A2F838
                arg this = <instance of Interpreter>
                var res = nil
                var func = <instance of Function>
                var code = "(

m.sysex(Int8Array[240, 71..."
                var doc = nil
                var ideClass = <instance of Meta_ScIDE>
        Process:interpretPrintCmdLine   000001F4E7E92428
                arg this = <instance of Main>
^^ The preceding error dump is for ERROR: Primitive '_SendSysex' failed.
Failed.
RECEIVER: a MIDIOut


Is there a problem with sysex on Windows 10?
Sound and standard MIDI messages appears to work properly.

Kind regards

Johan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sysex on Windows 10

Luis Lloret
Hi, can you open an issue on github, and I'll have a look when I'm back from holidays?
Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sysex on Windows 10

Luis Lloret
In reply to this post by JohanZ
Hi, Johan,

can you try to send all the sysex data in just one function call? So that everything between the "240" and "247" is sent in just one go. I think the way things are handled in the MIDI library that is used for Windows might break otherwise.

Let me know how it goes,
Luis
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sysex on Windows 10

JohanZ
It worked!

The call

m.sysex(Int8Array[240, 71, 127 , 21 , 26 , 0 , 69 , 0,
65, 66, 67, 80,80,80,80,80,
80,80,80,80, 80,80,80,80,
80,80,80,80, 80,80,80,80,
80,80,80,80, 80,80,80,80,
80,80,80,80, 80,80,80,80,
80,80,80,80, 80,80,80,80,
80,80,80,80, 80,80,80,80,
80,80,80,80, 80,80,80,80,
80,80,80,80, 247]);

gave the desired result, i.e. a lot of letters was written to the third line of the LCD.

Thanks a lot!

Johan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sysex on Windows 10

Luis Lloret
Great! I am glad that it worked.

Loading...