Re: SysEx problem ?
Re: SysEx problem ?
- Subject: Re: SysEx problem ?
- From: Pete Gontier <email@hidden>
- Date: Tue, 05 Oct 2004 15:41:49 -0700
circa 10/5/04 12:21 PM, "Peter Krajcik" <email@hidden> wrote:
> I have a problem I'm not able fix : I'm sending SysEx data using enclosed
> SendSYSEXData() routine. Everything works while I'm sending to IAC port , when
> I'm sending to any of MIDIMAN 8x8/s ports I am getting different length of
> sysex data (reported by MIDIMon) let's say $979, $979, and then $978 bytes
> etc. I don't have other MIDI Interface so I couldn't test with different
> device (I have a couple of other MIDIMAN interfaces, but I suppose they are
> driven by the same driver ... if I want to exclude driver bug).
Launch the latest installer for 8x8/s and it should tell you which devices
the MIDI driver also supports. I'd venture to say it supports most USB MIDI
devices shipped under the MIDIMAN and M-Audio brands, but by no means does
it support all of them.
> void SendSYSEXData(Ptr data)
> {
> int offset=0;
> Size sysexLen=0;
> Size size=0;
> Ptr p=NULL;
> OSStatus result=noErr;
>
> if (data==NULL)
> return ;
>
> sysexLen=GetPtrSize(data);
> offset=0;
>
> while (*(data+offset)!=':' && offset < sysexLen)
> offset++;
>
> p=NewPtrClear(sysexLen-offset+3);
> BlockMoveData(data+offset,p+3,sysexLen-offset);
> p[0]=0xF0;p[1]=0x2C;p[2]=0x7F;
>
> gSysExReq->data = p;
> gSysExReq->destination = gOut;
> gSysExReq->bytesToSend = GetPtrSize(p);
> gSysExReq->complete = false;
> gSysExReq->completionProc = BLMIDISysexCompletionProc;
> gSysExReq->completionRefCon=p;
>
> result=MIDISendSysex(gSysExReq);
>
> }
Casual inspection doesn't reveal to me anything actively wrong here, but
there's a lot of information this code doesn't provide, including how you
get the EOX (0xF7) byte stuck onto the end of your data.
--
Pete Gontier
http://www.m-audio.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden