From: Jeff W. <jww...@ya...> - 2004-08-06 17:28:34
|
Thanks to all for your comments about the IPatch interface. Now I have a better idea where you're headed with changes to the API. I think I'm going to go ahead and use ParamModel to do what I need to do at least for the time being. __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail |
From: Jeff W. <jww...@ya...> - 2004-08-04 22:46:00
|
Hiroo, Thanks for your help. When I sat down to write my driver, I went back and forth over whether to convert the whole patch at once or to use a paramModel to do it on the fly as you suggested. Apparently I made the wrong choice. Shouldn't be too much work to change it though. But before I do I would like to get a better understanding of the rest of your message. You said, "By defining your patch class which implements IPatch interface, you will be able to do what you wrote." I took a look at the IPatch interface and I don't really understand how that helps me. Can you explain a little more about what you meant? Thanks, Jeff --- In jsy...@ya..., Hiroo Hayashi <hiroo.hayashi@c...> wrote: > Hi, > > Patch.sysex has to include byte data as same format of Sysex message. > 'Niblize' and 'unniblize' was ParamModel's job. > > But yesterday IPatch interface was checked-in into CVS. By defining > your patch class which implements IPatch interface, you will be able to > do what you wrote. > > On Sat, 31 Jul 2004 17:17:38 +0000 jwweber55434 > <jwweber55434@y...> wrote: > > > I'm currently working on drivers/editors for Line6 products, > > specifically the POD and the Bass POD. These devices have a couple > > of quirks (as I'm sure all devices do). First of all, the response > > to a patch dump sometimes sends two patches along with some garbage > > data. Secondly, the response comes in a "nibbilized" format, where > > all the data is stored in the low order four bits. I have to > > "unnibilize" the data and put all the bytes back together in order > > for my editor to see them properly. I figured out how to solve this > > problem by subclassing Converter and overriding the extractPatch > > method do do all my conversions. I've got all of this working but I > > have a couple of questions. > > > > First of all before I send the data back to the device, I have to > > renibbilize the data. To do this I just added a static method to my > > subclassed Converter, which I call directly from the driver. This > > all seems to work just fine except for the Export functionality. The > > Export works but it saves the data in the unnibbilized form. The > > export needs to save a nibbilized form (the way it comes from the > > device) in order to be compatabile with other patch/ librarian > > software. > > > > I wonder if there's a better solution than just calling a static > > method in the Converter that would solve both problems. I haven't > > been able to find anything in the JSynthlib architecture or any of > > the code for the other devices. I would be really interested to know > > if I'm doing this the "right way" or if anyone has a better > > suggestion. > > -- > Hiroo Hayashi __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail |
From: Hiroo H. <hir...@co...> - 2004-08-05 01:50:03
|
Hi Jeff, Jeff> But before I do I would like to get a better Jeff> understanding of the rest of your message. You said, Jeff> "By defining your patch class which implements IPatch Jeff> interface, you will be able to do what you wrote." I Jeff> took a look at the IPatch interface and I don't really Jeff> understand how that helps me. Can you explain a little Jeff> more about what you meant? Let me try... IPatch interface was just introduced. Some of core classes still access Patch.sysex byte array directly. When the transition will be done, the method call of a patch class implementing IPatch will be the only way to access to patch data. The class can hold its data in any form (for example unnibbled data as you did). When a method of IPatch interface (for example byte[] getByteData()), your patch class can convert the data from its internal form to an external form (ex. byte[] or MidiMessage[]) requested by a core class. -- Hiroo Hayashi |