From: Jeff W. <jww...@ya...> - 2004-08-24 13:06:45
|
Hiroo, About your question, "Does not SysexMessage.setMessage throw InvalidMidiDataException? It's interesting.": You're right, it does throw InvalidMidiDataException, but the setMessage call is in a try/catch block and the catch block just calls ErrorMsg.reportStatus(e). About your comment, "The method I sent you returns an array of MidiMessage (if it works as I expect:-)). You can send each of them by using driver.send().": Thanks, I'll give that a try. I'll let you know how it goes. About your question, "How did you list up the lots of drivers of the kind?": I'm doing my development on a Mac using the XCode tool. XCode has a few nice features, one of which is a find/grep function that lets me search through whole projects or frameworks. I just searched the Synthdrivers directory looking for the string "SysexSender" to see which drivers were subclassing it. But then I only actually looked at about 3 or 4 of them and none of the ones I happened to look at were sending CC messages. Maybe I should have looked at little harder? Thanks, Jeff Hiroo Hayashi <hir...@co...> wrote: From: Hiroo Hayashi To: JSynthLib Development Subject: Re: [Jsynthlib-devel] Sending CC Messages and Disabled Edit Menu Date: Mon, 23 Aug 2004 21:47:34 -0500 Jeff, I assumed that SysexMessage[] MidiUtil.byteArrayToSysexMessages() was used and I made a replacement for it. Sorry for confusing you. Jeff> I'm not sure I understand your message. I don't think Jeff> the problem is in the SysexSender but rather in the Jeff> SysexWidget.sendSysex method. To restate my original Jeff> message, first SysexWidget.sendSysex calls my generate Jeff> method. When the call returns, SysexWidget.sendSysex Jeff> calls setMessage(sysex, sysex.length). Because Jeff> setMessage expects a valid sysex string and not a CC Jeff> messages, it throws away the CC message and just Jeff> returns the 0xF0 and 0xF7 sysex delimiters. Does not SysexMessage.setMessage throw InvalidMidiDataException? It's interesting. Jeff> Are you suggesting adding something like the code Jeff> snippet you sent to the SysexWidget.sendSysex method? Jeff> Jeff> I suppose you could do something like check the first Jeff> byte of the data and if it's equal to 0xF0, call Jeff> setMessage, else have it continue through a case Jeff> construct and test for the various other types of MIDI Jeff> data. Is this what you're suggesting? The method I sent you returns an array of MidiMessage (if it works as I expect:-)). You can send each of them by using driver.send(). But as you see, the code which convert byte array into an array of MidiMessage is very inefficient. Driver can easily send short messages without using SysexSender by using one of Driver.send() methods now. I started thinking that it might be better to fix drivers which use SysexSender for non-sysex message. How did you list up the lots of drivers of the kind? -- Hiroo Hayashi ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Jsynthlib-devel mailing list Jsy...@li... https://lists.sourceforge.net/lists/listinfo/jsynthlib-devel --------------------------------- Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. |