Author Topic: Boss MS-3 - MIDI over USB Sysex Reverse Engineering  (Read 965 times)

0 Members and 1 Guest are viewing this topic.

Offline MrHaroldA

Re: Boss MS-3 - MIDI over USB Sysex Reverse Engineering
« Reply #75 on: October 29, 2017, 11:55:42 AM »
The MS-3 is possibly only sending back the same value you are changing.

I know, but the MS-3 should return everything I set. I do have to check if the MS-3 also returns something if there was no change in state, for example by enabling the same effect twice.

But I'm watching Hello Kitty with my daughter right now ;)

I plan to release my MS-3 library soon, so I'll look into publishing it later this evening...

Offline MrHaroldA

Re: Boss MS-3 - MIDI over USB Sysex Reverse Engineering
« Reply #76 on: October 29, 2017, 02:30:34 PM »
I know, but the MS-3 should return everything I set. I do have to check if the MS-3 also returns something if there was no change in state, for example by enabling the same effect twice.

Hello Kitty is finished, daughter is sleeping, and watched a Stranger Things with the wife ... 8)

I've checked the replies, and while they are consistent they seem random over different effect sets.

I'll now clean up my library a little and write an example implementation.

Offline MrHaroldA

Re: Boss MS-3 - MIDI over USB Sysex Reverse Engineering
« Reply #77 on: October 29, 2017, 03:46:08 PM »
Here's my MS-3 library: https://github.com/MrHaroldA/MS3

I've added a really simple example to show how to use the library.

I would really love your remarks on this! Note that I don't really know what I'm doing, I'm just a simple php scripter by daytime ;)

Offline MrHaroldA

Re: Boss MS-3 - MIDI over USB Sysex Reverse Engineering
« Reply #78 on: October 30, 2017, 03:55:30 PM »
What happens if you change the order of the data you are requesting?
Is it certain addresses that do not respond? If you request data that does not exist, you will not get an answer.

Any chance you could give us a look at your code?

I've just added an effect_state example, which also misses out on a lot of effect states ... unless you enable debug/verbose mode!  ???

Code: [Select]
// Uncomment this to enable verbose debug messages.
#define MS3_DEBUG_MODE // *** Enable this!

It seems I have severe timing issues?

Offline MrHaroldA

Re: Boss MS-3 - MIDI over USB Sysex Reverse Engineering
« Reply #79 on: November 01, 2017, 07:39:28 AM »
I've updated  effect_state example to keep trying to gather all data. The initial check is quite high, but I guess my queue overloads severely ;) Fixed in the latest revision.

All checks after that average around 150 tries to get 13 effect states ...

Code: [Select]
Ready!


Found all 13 effect states in 19560 tries.
FX1:  OFF
MOD1: OFF
L1:   OFF
L2:   OFF
L3:   OFF
FX2:  ON
MOD2: OFF
DLY:  OFF
REV:  OFF
NS:   ON
SOLO: OFF
CTL1: OFF
CTL2: OFF

Loaded patch 1. Checking all effect states.

Found all 13 effect states in 143 tries.
FX1:  ON
MOD1: ON
L1:   ON
L2:   ON
L3:   ON
FX2:  ON
MOD2: ON
DLY:  ON
REV:  ON
NS:   ON
SOLO: OFF
CTL1: OFF
CTL2: OFF

Loaded patch 2. Checking all effect states.

Found all 13 effect states in 143 tries.
FX1:  OFF
MOD1: OFF
L1:   OFF
L2:   OFF
L3:   OFF
FX2:  OFF
MOD2: OFF
DLY:  OFF
REV:  OFF
NS:   OFF
SOLO: OFF
CTL1: OFF
CTL2: OFF

Loaded patch 3. Checking all effect states.

Found all 13 effect states in 189 tries.
FX1:  OFF
MOD1: OFF
L1:   OFF
L2:   OFF
L3:   OFF
FX2:  OFF
MOD2: OFF
DLY:  OFF
REV:  OFF
NS:   OFF
SOLO: OFF
CTL1: OFF
CTL2: OFF

This now is quite a good test for measuring how much incoming data my implementation, or even the midi host library loses.
« Last Edit: November 01, 2017, 07:47:34 AM by MrHaroldA »

Offline MrHaroldA

Re: Boss MS-3 - MIDI over USB Sysex Reverse Engineering
« Reply #80 on: November 02, 2017, 03:26:05 PM »
Found it! I was adding double items to the queue before the queue was empty, and I was picking up items from the queue before the timeout was over ...  ::)

Code: [Select]
Ready!

Loaded patch 0. Found all 13 effect states in 13 tries.
FX1:  OFF
MOD1: OFF
L1:   OFF
L2:   OFF
L3:   OFF
FX2:  ON
MOD2: OFF
DLY:  OFF
REV:  OFF
NS:   ON
SOLO: OFF
CTL1: OFF
CTL2: OFF

Loaded patch 1. Found all 13 effect states in 13 tries.
FX1:  ON
MOD1: ON
L1:   ON
L2:   ON
L3:   ON
FX2:  ON
MOD2: ON
DLY:  ON
REV:  ON
NS:   ON
SOLO: OFF
CTL1: OFF
CTL2: OFF

Loaded patch 2. Found all 13 effect states in 13 tries.
FX1:  OFF
MOD1: OFF
L1:   OFF
L2:   OFF
L3:   OFF
FX2:  OFF
MOD2: OFF
DLY:  OFF
REV:  OFF
NS:   OFF
SOLO: OFF
CTL1: OFF
CTL2: OFF

Loaded patch 3. Found all 13 effect states in 13 tries.
FX1:  OFF
MOD1: OFF
L1:   OFF
L2:   OFF
L3:   OFF
FX2:  OFF
MOD2: OFF
DLY:  OFF
REV:  OFF
NS:   OFF
SOLO: OFF
CTL1: OFF
CTL2: OFF

Is anybody reading along my monolog? You all seem awfully quiet ...

Offline Elantric

Re: Boss MS-3 - MIDI over USB Sysex Reverse Engineering
« Reply #81 on: November 02, 2017, 03:42:19 PM »
I read each and every post

( click here:  and bookmark)

Show All Recent Posts
http://www.vguitarforums.com/smf/index.php?action=recent


glad to hear you located your problem

Offline gumtown

Re: Boss MS-3 - MIDI over USB Sysex Reverse Engineering
« Reply #82 on: November 02, 2017, 04:09:31 PM »
Me too,  ;)
Free "GR-55 FloorBoard" editor software from http://sourceforge.net/projects/grfloorboard/

Offline MrHaroldA

Re: Boss MS-3 - MIDI over USB Sysex Reverse Engineering
« Reply #83 on: November 09, 2017, 03:40:38 PM »
Well, I think i'm kinda done with the library ;) I even made some sort of Wiki for it!

Receiving bulk data is still an issue, but debugging and improving the USB Host library is out-of-scope for now.

I'll try to focus on implementing the library and actually using my MS-3 now  ;)


Anybody looked at, or tried my library yet?

Offline MrHaroldA

Re: Boss MS-3 - MIDI over USB Sysex Reverse Engineering
« Reply #84 on: November 10, 2017, 03:15:19 AM »
The same thing may happen that also happens with the Arduino midi library. There is only one buffer used for midi in messages. The buffer is filled through an interrupt routine triggered by receiving midi data. So it could be that the code is reading a message, but while it is processing the data it is written over by the next message through the interrupt routine.

I have seen this happen with the VController when it is reading Zoom devices. I am considering changing the midi library to support multiple midi buffers. But I am still investigating the issue.

@sixeight, can you please log an issue on the USB_Host_Shield_2.0 issue queue for this? I think I run into this regularly, but I have no idea how to fix this nicely.


And @vit3k, your input is requested here: https://github.com/felis/USB_Host_Shield_2.0/issues/313#issuecomment-340712691

Offline sixeight

Re: Boss MS-3 - MIDI over USB Sysex Reverse Engineering
« Reply #85 on: November 10, 2017, 08:52:00 AM »
@sixeight, can you please log an issue on the USB_Host_Shield_2.0 issue queue for this? I think I run into this regularly, but I have no idea how to fix this nicely.

I don't have a USB host shield, so it is not a good idea to post an issue or fix if I am unable to test any of it.

It may be a better idea to post your problem and your code on the Arduino or Teensy forum.

I have not changed the serial midi sysex queue in the midi library after all. I was able to solve my problems by improving the loop time and do a check on expected length of sysex answers. In some cases the VController will ask for the same data twice now on serial3, but at least things are running ok again.


 

Blog