Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending sysex is broken #262

Closed
jleben opened this issue May 6, 2012 · 1 comment
Closed

Sending sysex is broken #262

jleben opened this issue May 6, 2012 · 1 comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. os: Linux
Milestone

Comments

@jleben
Copy link
Member

jleben commented May 6, 2012

[Issue migrated from SourceForge | ID: 3513294 | Submitted by 'mariermartin']
[http://sourceforge.net/support/tracker.php?aid=3513294]

// from the MIDIOut help file:
MIDIClient.init;
m = MIDIOut(0);
m.sysex(Int8Array[0xf0, 0x00, 0x20, 0x3c, 0x02, 0x00, 0x61, 21, 54, 0xf7]);

// yields
ERROR: Primitive '_SendSysex' failed.
Wrong type.
RECEIVER:
Instance of MIDIOut {    (0x5747958, gc=F0, fmt=00, flg=00, set=02)
  instance variables [3]
    port : Integer 0
    uid : Integer 0
    latency : Float 0.200000   9999999A 3FC99999
}
PATH: /home/marierm/Documents/matevina/matevina.scd
CALL STACK:
        MethodError:reportError   0x5d34208
                arg this = <instance of PrimitiveFailedError>
        Nil:handleError   0x622e858
                arg this = nil
                arg error = <instance of PrimitiveFailedError>
        Thread:handleError   0x6231608
                arg this = <instance of Thread>
                arg error = <instance of PrimitiveFailedError>
        Object:throw   0x563cd68
                arg this = <instance of PrimitiveFailedError>
        Object:primitiveFailed   0x5cf1358
                arg this = <instance of MIDIOut>
        Interpreter:interpretPrintCmdLine   0x6ec9258
                arg this = <instance of Interpreter>
                var res = nil
                var func = <instance of Function>
                var code = "m.sysex(Int8Array[0xf0, 0x00..."
                var doc = <instance of ScelDocument>
        Process:interpretPrintCmdLine   0x5df78c8
                arg this = <instance of Main>
-----------------------------

Yes, confirmed in Linux.

As far as I can see, the problem is here:

         // rcvr, uid, packet
         PyrSlot* args = g->sp - 2;

The comment seems to indicate that the sysex-sending primitive expects

m.sysex(device_uid, packet)

But the method definition in MIDIOut takes only "packet" as an argument.

I'm not sure of the fix myself. The primitive needs to get the uid from somewhere but I don't know the internal object structures well enough to know where it should come from.

hjh

@timblechmann
Copy link
Contributor

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. os: Linux
Projects
None yet
Development

No branches or pull requests

2 participants