zenpho Posted June 18, 2008 Report Share Posted June 18, 2008 Hi there,I built a midibox FM recently, and I should say that I'm extremely grateful to TK for being a groovy kinda guy and making his midibox projects available for people like me to build so openly. Also thanks to SmashTV for organising PCB fabrication for the core and OPL boards that make up the MBFM, and to the midibox forum community in general (where I lurked most heavily before populating the PCBs).----Unfortunately, I'm experiencing some strange problems with using Jsynthlib to edit and store patches on the MBFM.I built and tested the core board sucessfully, uploaded MIOS (v1.9f), and the MBFM program (v1.1a), tested that the default patch works successfully, plugged in a 256 bankstick, and loaded up Jsynthlib.I set up Jsynthlib (JSL) to work through MidiOx and MidiYoke.The Synth driver page of JSL shows:SynthID: FMDevice: MIDIboxFMMidiIN: from MIDI Yoke 2MidiOUT: from MIDI Yoke 1Channel: 1DeviceID: 1The routing page of MidiOX shows:[Midi Yoke 1: IN]---------------------------[uSB Audio Device: OUT][uSB Audio Device: IN]----------------------[Midi Yoke 2: OUT] [MidiOX Event Port]-------------------------[Midi Yoke 2: OUT]The USB Audio Device is a (cheap, but working) Alesis IO/2 interface.----I tried the version of JSL (Snapshot-2006-01-28) on the MBFM page first, since it mentions that it was tested for compatibility with the MBFM specifically in order to fix a bug uploading patches.Unfortunately, it still seems to have a problem uploading patches. I load JSL, load the midibox_fm_presets.patchlib, click the PatchBank (containing default voice patches), pick "Store" - selecting "bank A"JSL thinks for a while whilst MidiOx shows a number of Sysex messages being sent - followed by replies from the MBFM.Unfortunately, looking at the MidiOx input monitor, after every patch dump output from JSL, the MBFM responds with an error message:F0 00 00 7E 49 00 0E 01 F7Which, looking at "midibox_fm_sysex_implementation.txt", translates as:"received less bytes then expected".----I tried JSynthLib-0.20.0_midibox_mod1 (linked from a thread in the forums) - same error "F0 00 00 7E 49 00 0E 01 F7" == "received less bytes then expected".----I also tried JSynthLib-0.20.0 (from the JsynthLib sourceforge page) in a vain hope that maybe it would succeed - but this also didn't work. Same error.----I finally managed to upload the default patches by using TL's MidiboxPatchManger (MBSIDPatch-0.8.exe) - loading the "midibox_fm_voices.syx" resulting in the response:F0 00 00 7E 49 00 0F F7 which translates to an "acknowledge" message. I can receive the uploaded patches with JSL (Snapshot-2006-01-28) again, and all the patchnames and data seem to show up okay. This, to my mind, seems to narrow down the problem to JSL sending data. Anyone here have any ideas what to do next? I'm wondering if this is a purely software issue, but then how come nobody else is posting similar JSL problems... I'm at a loss.Cheers,-Zenpho Quote Link to comment Share on other sites More sharing options...
stryd_one Posted June 19, 2008 Report Share Posted June 19, 2008 Welcome aboard, Excellent troubleshooting work man. (and you tagged right, yay!)Could you try this for me:Send the patch using the working tool, and save the log from midiox, so we can see what it sent.Then, do the same with jsynthlib. We can compare the two to see what's missing. If nothing is missing, this might come down to a problem with midi. Quote Link to comment Share on other sites More sharing options...
zenpho Posted June 19, 2008 Author Report Share Posted June 19, 2008 Thanks for the help stryd_one, good idea!Here's a dump from JSL (2006 snapshot): F0 00 00 7E 49 02 00 00 00 4E 65 77 20 50 61 74 63 68 20 20 20 20 20 20 20 01 00 00 00 06 01 0B 01 01 00 00 00 28 37 14 37 00 00 01 01 00 0C 0A 0D 07 09 04 07 05 09 0A 09 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 05 00 50 40 40 40 40 40 40 40 00 00 00 40 40 00 05 00 70 40 40 40 40 40 40 40 00 00 00 40 40 00 00 20 60 20 20 20 40 20 40 40 40 40 40 40 40 40 02 00 00 00 40 02 00 00 15 17 52 00 00 40 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 78 F7 And Here's a dump from TL's tool: F0 00 00 7E 49 00 02 00 00 00 4E 65 77 20 50 61 74 63 68 20 20 20 20 20 20 20 01 00 00 00 06 01 0B 01 01 00 00 00 28 37 14 37 00 00 01 01 00 0C 0A 0D 07 09 04 07 05 09 0A 09 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 05 00 50 40 40 40 40 40 40 40 00 00 00 40 40 00 05 00 70 40 40 40 40 40 40 40 00 00 00 40 40 00 00 20 60 20 20 20 40 20 40 40 40 40 40 40 40 40 02 00 00 00 40 02 00 00 15 17 52 00 00 40 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 78 F7 It seems that there's a missing byte between the MBFM SysEx ID byte "7E 49" and the patch dump byte "02".----I think I may have found the source of the problem tho, JSL is routed through MidiOx and MidiYoke - but TL's tool is routed directly to the MIDI interface. I remember routing JSL through MidiOX because a page on the midibox ucapps site mentioned a bug in Java, easily corrected by routing MIDI in this way with the added bonus of being able to monitor the bytes sent from JSL in the MidiOX monitors.I noticed that the MidiOx monitors were showing the sysex dump broken into two sections - one of 256 bytes, and another of 12 bytes!Some investigation revealed "low level SysEx buffer" options in MidiOx which were set to 256 bytes with a delay of 60msec between buffers. Increasing the size to 268 seems to solve the problems. JSL now sends and receives patches without failure!I guess the MidiOx buffers were missing out bytes in that 60msec pause.Interestingly: reducing the delay to zero didn't solve the problem, and reducing the buffer size to 64 bytes produced some very interesting (broken) messages in the MidiOx monitors, sysEx messages missing their F0 and F7 markers, random splurges of hex numbers, all sorts of digital nonsense... ;o)----One last problem tho.JSL (2006 snapshot) still doesn't receive a Patch Bank - JSL sends:F0 00 00 7E 49 00 03 00 00 F7and the MBFM replies withF0 00 00 7E 40 06 0E 0B 00 F7 (parameter not available)Interestingly, the reply isn't from the MBFM layer, it has a MIOS "7E 40" SysEx ID.Shouldn't JSL be sending a bunch of F0 00 00 7E 49 00 01 00 <patch> F7 messages with <patch> increasing from 00 to 7F? Quote Link to comment Share on other sites More sharing options...
cimo Posted June 19, 2008 Report Share Posted June 19, 2008 hisorry to drop in without real knowledge of these matters but what about that (in)famous issue with MS Midi drivers?Simone Quote Link to comment Share on other sites More sharing options...
stryd_one Posted June 19, 2008 Report Share Posted June 19, 2008 cimo: that's exactly the problem, but that one is gone now...zenpho you deserve a fricken troubleshooting medal. Interestingly, the reply isn't from the MBFM layer, it has a MIOS "7E 40" SysEx ID.Well spotted, thankyou. F0 00 00 7E 49 00 01 00 <patch> F7 messages with <patch> increasing from 00 to 7F?Going by http://svnmios.midibox.org/trunk/apps/synthesizers/midibox_fm_v1/doc/midibox_fm_sysex_implementation.txt a patch request looks like this: a) F0 00 00 7E 49 <device> 01 <type> <bank> <patch> F7I'm not sure what Jsynthlib is doing :-\Ahh maybe this is a hint: (I followed your hint that MIOS replied, not MBFM, and read http://svnmios.midibox.org/trunk/doc/mios/mios_sysex_implementation.txt : The Select BankStick command (03)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure: F0 00 00 7E 40 <device-id> 03 <bs-number> F7 <device-id>: the MIOS device ID from 00 to 7F <bs-number>: the BankStick number from 0 to 7 This command was used in previous MIOS versions (<V1.8) to select the BankStick before writing or reading. !!! THIS COMMAND IS OBSOLETE !!! The BankStick is now selected with the address extension of the Read/Write command.Sounds like jsynthlib was made for the old MIOS version and is reading direct from the BS. You could try an old MIOS version I guess, otherwise JSL will need updating :(Sorry for the "you found a bug"! Quote Link to comment Share on other sites More sharing options...
zenpho Posted June 19, 2008 Author Report Share Posted June 19, 2008 Hi again,Thanks stryd_one, good detective work on digging out the old style bank-stick request message. It all makes sense now! ;o)I wonder how easy and safe it is to downgrade MIOS? Maybe it'd be safer to stick with it almost-working. Quote Link to comment Share on other sites More sharing options...
stryd_one Posted June 20, 2008 Report Share Posted June 20, 2008 Downgrading MIOS... Uhm I wouldn't try it. Hopefully the mods to JSL aren't too hefty... Quote Link to comment Share on other sites More sharing options...
airmailed Posted June 21, 2008 Report Share Posted June 21, 2008 zenpho you deserve a fricken troubleshooting medal. yes i must say zenpho seems very thorough, welcome to the forum :-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.