From: Daniel R. <dr....@co...> - 2007-12-22 01:42:04
|
Hello all. First off, thanks to those who responded to me privately, who probably meant to reply to the list. The answer to my last questions were "set the checksumOffset, start, and end values." That worked. So now I've advanced quite a bit in my HelloWorld, and now I have the following code super.trimSize = 16; super.checksumOffset = 14; super.checksumStart = 6; super.checksumEnd = 13; byte[] first = new byte[] { (byte)0xF0, // It's a MIDI System exclusive message! 0x41, // Roland ID 0x10, // Device ID 17 (minus one) 0x00,0x2E, // Model ID 2E for HPD-15 0x12, // Command ID (this is data set, could be a request 0x11) 0x01,0x00,0x10,0x00, // the offset for the user kit, pad A1 0x00, 0x00, 0x07,12, // the nibbled data for the shekere 124 (byte)0xFF, // checksum will go here (byte)0xF7 // end }; which works perfectly for ONE parameter change (I'm amazed. I had never nibbled before :). But now I want to send an entire kit (pads A1, A2, etc.). I've tried the two obvious things, making two sysexs back to back (they get trimmed to one, otherwise the checksum would be calculated just once). I've also tried putting in more than one offset and data (message was received but didn't do the right thing). I can send more than one sysex message, but I imagine there's a better way. Thanks in advance for your help! Best, Daniel |
From: Robert W. <wi...@op...> - 2007-12-24 09:15:35
|
Hello Daniel, further action depends perhaps on your sysex device implementation. If there is a sysex which changes several parameters, then use it. Otherwise, there is no other possibility then sending several sysex messages at a time. It requires to write your own sendPatch(Patch) method. I did the same in my Roland JD800 driver (JSynthLib/ synthdrivers/RolandJD800/RolandJD800SinglePatchDriver.java)., Robert. On Dec 22, 2007, at 2:42 AM, Daniel Rosenstark wrote: > Hello all. > > First off, thanks to those who responded to me privately, who > probably meant > to reply to the list. The answer to my last questions were "set the > checksumOffset, start, and end values." That worked. > > So now I've advanced quite a bit in my HelloWorld, and now I have the > following code > > super.trimSize = 16; > super.checksumOffset = 14; > super.checksumStart = 6; > super.checksumEnd = 13; > byte[] first = new byte[] { > (byte)0xF0, // It's a MIDI > System > exclusive message! > 0x41, // Roland ID > 0x10, // Device ID 17 > (minus > one) > 0x00,0x2E, // Model ID 2E for > HPD-15 > 0x12, // Command ID > (this is > data set, could be a request 0x11) > 0x01,0x00,0x10,0x00, // the offset > for the > user kit, pad A1 > 0x00, 0x00, 0x07,12, // the nibbled > data for > the shekere 124 > (byte)0xFF, // checksum > will go here > (byte)0xF7 // end > }; > > which works perfectly for ONE parameter change (I'm amazed. I had > never > nibbled before :). But now I want to send an entire kit (pads A1, > A2, etc.). > I've tried the two obvious things, making two sysexs back to back > (they get > trimmed to one, otherwise the checksum would be calculated just > once). I've > also tried putting in more than one offset and data (message was > received > but didn't do the right thing). > > I can send more than one sysex message, but I imagine there's a > better way. > > Thanks in advance for your help! > > Best, > Daniel > |
From: Daniel R. <dr....@co...> - 2007-12-24 14:51:30
|
Hi Robert, Thank you so much for your answer. In the days since I wrote my message, I kept fiddling and ended up sending several sysex messages with a 40ms delay between each. The biggest problem since then was that the Handsonic said there was a Midi buffer overflow when in fact I had the checksum wrong for the subsequent sysex messages. Now it all works. Never thought I'd be doing this byte-level stuff (and liking it :). Now I have to decide if what I want to write is really a JSynth driver or rather a Handsonic controller that does not even use JSynth (i.e., something like this http://www.ex5tech.com/ex5ubb_cgi/ultimatebb.cgi?f=6&t=000145&ubb=get_topic). I thought JSynth would handle the tricky bits, but it turns out that the javax.sound.midi package handles the hard parts, JSynth structures them in a particular way, and then I have to write the interaction with the Handsonic. At the risk of reinventing the wheel I think that doing the structure myself might be more to the point of what I want to do. Thank you again for all of your help, Daniel On 12/24/07, Robert Wirski <> wrote: > > Hello Daniel, > further action depends perhaps on your sysex device implementation. > If there is a sysex which changes several parameters, then use it. > Otherwise, there is no other possibility then sending several sysex > messages at a time. It requires to write your own sendPatch(Patch) > method. I did the same in my Roland JD800 driver (JSynthLib/ > synthdrivers/RolandJD800/RolandJD800SinglePatchDriver.java)., > Robert. > > > On Dec 22, 2007, at 2:42 AM, Daniel Rosenstark wrote: > > > Hello all. > > > > First off, thanks to those who responded to me privately, who > > probably meant > > to reply to the list. The answer to my last questions were "set the > > checksumOffset, start, and end values." That worked. > > > > So now I've advanced quite a bit in my HelloWorld, and now I have the > > following code > > > > super.trimSize = 16; > > super.checksumOffset = 14; > > super.checksumStart = 6; > > super.checksumEnd = 13; > > byte[] first = new byte[] { > > (byte)0xF0, // It's a MIDI > > System > > exclusive message! > > 0x41, // Roland ID > > 0x10, // Device ID 17 > > (minus > > one) > > 0x00,0x2E, // Model ID 2E for > > HPD-15 > > 0x12, // Command ID > > (this is > > data set, could be a request 0x11) > > 0x01,0x00,0x10,0x00, // the offset > > for the > > user kit, pad A1 > > 0x00, 0x00, 0x07,12, // the nibbled > > data for > > the shekere 124 > > (byte)0xFF, // checksum > > will go here > > (byte)0xF7 // end > > }; > > > > which works perfectly for ONE parameter change (I'm amazed. I had > > never > > nibbled before :). But now I want to send an entire kit (pads A1, > > A2, etc.). > > I've tried the two obvious things, making two sysexs back to back > > (they get > > trimmed to one, otherwise the checksum would be calculated just > > once). I've > > also tried putting in more than one offset and data (message was > > received > > but didn't do the right thing). > > > > I can send more than one sysex message, but I imagine there's a > > better way. > > > > Thanks in advance for your help! > > > > Best, > > Daniel > > > |