Hello,
please someone (Stefan?) apply this patch (2 lines added to
source/lang/LangSource/SC_AlsaMIDI.cpp). It should allow output of midi
system exclusive messages on linux now (see my mail on 2004-01-14).
Jens
### START OF PATCH
--- source/lang/LangSource/SC_AlsaMIDI.cpp~ 2004-12-02
12:15:39.000000000 -0500
+++ source/lang/LangSource/SC_AlsaMIDI.cpp 2007-01-16 23:05:11.000000000
-0500
@@ -693,6 +693,7 @@
{
if (!gMIDIClient.mHandle) return errFailed;
snd_seq_event_t evt;
+ evt.type = SND_SEQ_EVENT_SYSEX; // MIDIOut.sysex patch 2007-01-16
snd_seq_ev_set_variable(&evt, length, data);
return gMIDIClient.sendEvent(port, uid, &evt, 0.f);
}
@@ -919,6 +920,7 @@
definePrimitive(base, index++, "_DisconnectMIDIIn",
prDisconnectMIDIIn, 3, 0);
definePrimitive(base, index++, "_SendMIDIOut", prSendMIDIOut, 9, 0);
+ definePrimitive(base, index++, "_SendSysex", prSendSysex, 3, 0); //
MIDIOut.sysex patch 2007-01-16
cleanUpMIDI();
}
### END OF PATCH
Jens Gulden wrote on 2004-01-14:
> Hello,
>
> am I missing some more initialization work for sending MIDI-SysEx data
> here?:
>
> MIDIClient.init(1, 1);
>
> //---'evaluate region':
> (
> MIDIClient.list.destinations.collect(_.name);
> i = MIDIClient.destinations[1];
> o = MIDIOut(0, i.uid);
>
> MIDIIn.sysex = { arg src, sysex; "IN SysEx:".postln; sysex.postln; };
>
> a=Int8Array[ 16rF0, 16r41, 16r10, 16r3F, 16r11, 16r01, 16r70, 16r5A,
> 16r00, 16r01, 16r0E, 16r26, 16rF7 ];
>
> o.noteOn(0, 60, 100); // for testing, works
>
> "OUT SysEx:".postln;
> a.postln;
> o.sysex( i.uid, a); // ### DOESN'T WORK, see below
> )
> //---eof
>
> The output is:
>
> OUT SysEx:
> Int8Array[ -16, 65, 16, 63, 17, 1, 112, 90, 0, 1, 14, 38, -9 ]
> ERROR: A primitive was not bound. 0 496
> Instance of Method { (B78996C0, gc=01, fmt=00, flg=11, set=04)
> instance variables [15]
> raw1 : Float 1.7800794579653544e-307 0040000C 00000000
> raw2 : Float 3.522961154659544e-294 03020003 00000300
> code : instance of Int8Array (B7899800, size=1, set=1)
> selectors : nil
> constants : nil
> prototypeFrame : instance of Array (B78997B0, size=3, set=2)
> context : nil
> argNames : instance of SymbolArray (B7899770, size=3, set=1)
> varNames : nil
> sourceCode : nil
> ownerClass : class MIDIOut (B7896E30)
> name : Symbol 'sysex'
> primitiveName : Symbol '_SendSysex'
> filenameSymbol : Symbol
> '/UNIONFS/usr/local/share/SuperCollider/SCClassLibrary/Common/Control/MIDIOut.sc'
>
> charPos : Integer 8304
> }
>
> Is sending system exclusive data supposed to work like this? Receiving
> works fine via the above MIDIIn.sys = ... (Build is from CVS today.)
>
> Thanks for hints,
> Jens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: midiout_sysex_patch_20070116.patch
Type: text/x-patch
Size: 729 bytes
Desc: not available
Url : http://www.create.ucsb.edu/pipermail/sc-users/attachments/20070116/fe4c40df/midiout_sysex_patch_20070116.bin