Roland_Boss - MIDI over USB Sysex Reverse Engineering

Started by vtgearhead, December 12, 2016, 12:43:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MrHaroldA

Are the "sneaky amps" the only hidden features of the Katana? I'd love to find out if the MS3 also has hidden features like that...
Boss MS-3 and Katana library for Arduino: https://github.com/MrHaroldA/MS3

gumtown

Quote from: MrHaroldA on October 18, 2017, 12:10:59 AM
Are the "sneaky amps" the only hidden features of the Katana? I'd love to find out if the MS3 also has hidden features like that...
The Katana has "Sneaky amps + custom amps", 'Custom' Distortion settings, extra effects types in MOD and FX (including the Terra Echo), and extra Delay types.

I have had a little 'sqwizz' through the MS-3 but not found any "sneaky" features,
it's structure is very different form the Katana/GT-1/GT-001/GT100 which these are based off the same 'cookie cutter model'.
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

MrHaroldA

I just uploaded 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 all your remarks on this! Note that I don't really know what I'm doing, I'm just a simple php scripter by daytime ;)

It would be interesting to know if this library can be used to control the Karana too by changing the HEADER define in MS3.h.
Boss MS-3 and Katana library for Arduino: https://github.com/MrHaroldA/MS3

gumtown

Some trivial information on the effects chain,
no matter which order they are set to, the checksum value will always be "3B".
That is because the bytes summed value is always the same, just the order is different.
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

jwhitcomb3


MrHaroldA

Quote from: MrHaroldA on October 29, 2017, 02:48:20 PM
I just uploaded 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 all your remarks on this! Note that I don't really know what I'm doing, I'm just a simple php scripter by daytime ;)

It would be interesting to know if this library can be used to control the Karana too by changing the HEADER define in MS3.h.

Is there anybody who can check if my library can communicate with a Katana? I'm actually looking into buying one to test this, but I have no further use for it ;)
Boss MS-3 and Katana library for Arduino: https://github.com/MrHaroldA/MS3

gumtown

#181
Something I would like to try sometime soon,
just need to get a USB Host shield.

Once I get my Katana Android editor finished (stuck on Android c++ >> jni >> java midi stuff),
https://sourceforge.net/projects/fxfloorboard/files/experimental/Tablet-FxFloorBoard/

I might put aside the software editor stuff for a while, and pickup on some of my half finished hardware projects.

I was doing a Roland/Boss gear "V-Tone" Arduino midi knob box.
Very easy to adapt for the Katana or MS-3
https://github.com/gumtown/V-tone



and the MKii version using larger 4 line lcd and rotary encoders
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

alancarl

Does anybody know if it's possible how to change the Katana SYSEX Device ID?
I have 2 Katana heads that I am controlling with 2 iPads and one computer and I want to try to use unique Device ID's as a way to separate the editing commands that I am sending down the pipe.
Thanks!
AL

vtgearhead

Quote from: alancarl on March 12, 2018, 05:46:05 PM
Does anybody know if it's possible how to change the Katana SYSEX Device ID?
I have 2 Katana heads that I am controlling with 2 iPads and one computer and I want to try to use unique Device ID's as a way to separate the editing commands that I am sending down the pipe.
Thanks!
AL

I'm not aware of any way to do that with the current firmware.  I think the only answer might be to always connect the first and second head in the same sequence, noting the MIDI endpoints that are assigned.  Then hard-code for those addresses.

alancarl

Quote from: vtgearhead on March 13, 2018, 04:50:54 AM
I'm not aware of any way to do that with the current firmware.  I think the only answer might be to always connect the first and second head in the same sequence, noting the MIDI endpoints that are assigned.  Then hard-code for those addresses.
Thanks MR GearHead for your reply:-)
I am doing the consistent order of connection for now...but I had this rig on a gig where the generator was shut down for some really strange reason and it took me quite a bit a messing around to get back up online. Some things stayed on with their bukt in batteries and of course the Katanas took a break, Once the power was on again it ultimately took some forced exits of the programs only MBP and a hard boot of it and the Katanas.
I also am not aware of any way to hard-code within MIDIDesigner for the MIDI routings.

Perhaps Roland might share with us if there is a way to setup unique SYSEX ID's for multiple Katana amps.
I still really prefer the iPad and MIDIDesigner for adjusting various parameters for the Katana amps so for now I will deal with boot up dependencies.
Thanks Again vt!
Al

sixeight

OK, so far I am quite succesful in saving and loading patches in the VController. I have been able to limit patch size to 160 bytes, by just saving and loading the parameters that contain relevant data. I do this by just saving the parameters of the mod and fx block of the active effect. So if mod is set to SUB WAH, I will just save the six parameters of that effect and ignore the parameters of the other 36 effects.

But I am running into one issue: whenever I write the sysex data of the FX chain, I get a long gap. Skipping the FX chain data on preset switching, removes the gap.

Solutions I have tried:
1) saving an extra byte at the start of the chain - makes no difference.
2) I was thinking of writing the data to the memory location of CH4 and then recall that channel with a PC command, but sending a PC message of the current channel does not reload the patch. Can patches on the Katana also be selected through a sysex message?
3) I could check if the chain of the new patch is different from the last one. That way, I would one get the gap if patches have a different FX chain, but obviously that is not the preferred solution.

If any of you Katana sysex guru's have any ideas, please chime in...

vtgearhead

Quote from: sixeight on September 09, 2018, 05:33:29 AM
OK, so far I am quite succesful in saving and loading patches in the VController. I have been able to limit patch size to 160 bytes, by just saving and loading the parameters that contain relevant data. I do this by just saving the parameters of the mod and fx block of the active effect. So if mod is set to SUB WAH, I will just save the six parameters of that effect and ignore the parameters of the other 36 effects.

But I am running into one issue: whenever I write the sysex data of the FX chain, I get a long gap. Skipping the FX chain data on preset switching, removes the gap.

Solutions I have tried:
1) saving an extra byte at the start of the chain - makes no difference.
2) I was thinking of writing the data to the memory location of CH4 and then recall that channel with a PC command, but sending a PC message of the current channel does not reload the patch. Can patches on the Katana also be selected through a sysex message?
3) I could check if the chain of the new patch is different from the last one. That way, I would one get the gap if patches have a different FX chain, but obviously that is not the preferred solution.

If any of you Katana sysex guru's have any ideas, please chime in...

I noticed the same issue with sysex causing a delay.  If the amp is currently on CH4, why not update the CH3 patch area and switch to it?  This was suggested by Gumtown a while back, but I never had time to work on it.

gumtown

#187
Are you sending your patch data to address 60 00 XX XX on the Katana (temporary data address for unsaved real-time edits)?

The chain requires the entire GT-100 spec chain data to be sent
hexData << "11" << "02" << "0D" << "0C" << "04" << "01" << "0F" << "05" << "07" << "06" << "08" << "09" << "0E" << "12" << "00" << "03" << "0B" << "0A" << "13" << "10";

The bold/black text is the Katana related chain data, the green text is the extras to make up the entire 20 byte chain data block, sent from address 60 00 07 20.
The data in green always stays the same, and incidentally, the chain checksum is always the same.

FYI: The 3 fixed chain orders in BTS are
Chain 1 = << "11" << "02" << "0D" << "0C" << "04" << "01" << "0F" << "05" << "07" << "06" << "08" << "09" << "0E" << "12" << "00" << "03" << "0B" << "0A" << "13" << "10";

Chain 2 = << "11" << "0F" << "05" << "02" << "0D" << "0C" << "04" << "01" << "07" << "06" << "08" << "09" << "0E" << "12" << "00" << "03" << "0B" << "0A" << "13" << "10";

Chain 3 = << "11" << "0F" << "05" << "07" << "06" << "02" << "0D" << "0C" << "04" << "01" << "08" << "09" << "0E" << "12" << "00" << "03" << "0B" << "0A" << "13" << "10";
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

sixeight

Quote from: gumtown on September 09, 2018, 02:14:48 PM
Are you sending your patch data to address 60 00 XX XX on the Katana (temporary data address for unsaved real-time edits)?

Yes I am, but whenever I send the 20 bytes of data of the chain to 60 00 07 20 , I get an audio dropout that is longer than the normal dropout at patch change.

I now check if the chain is has changed on each patch change and only send the data if that is the case.

Maybe as an option I will use CH3 and CH4 or CH7 and CH8 to write the patch information directly to patch memory and then restore that patch, as has been suggested.

sixeight

Quote from: sixeight on September 10, 2018, 05:18:40 AM
Maybe as an option I will use CH3 and CH4 or CH7 and CH8 to write the patch information directly to patch memory and then restore that patch, as has been suggested.

I tried this method, but I have to delay the PC message after writing to the patch with at least 500 ms after writing to the patch, so I guess that is a no go!!! The method I had was the best one. We will just have to accept some inter patch change gaps....

sixeight

OK, there is a way to change patches through a sysex message:

write 00 + patch number to address 0x00010000

But make sure editor mode is switched on!

Was able to snoop this from the MIDI between BTS and Katana.

vtgearhead

Quote from: sixeight on September 10, 2018, 08:31:30 AM
OK, there is a way to change patches through a sysex message:

write 00 + patch number to address 0x00010000

But make sure editor mode is switched on!

Was able to snoop this from the MIDI between BTS and Katana.

You could have saved some trouble by reading my Katana sysex document.  That's outline there along with several other "special" commands that only work in editor mode.

sixeight

Quote from: vtgearhead on September 10, 2018, 10:03:17 AM
You could have saved some trouble by reading my Katana sysex document.  That's outline there along with several other "special" commands that only work in editor mode.

Well, in the end writing to the patch memory area and then restoring the patch is not a practical solution. For some reason the patch only gets fully restored after a delay of a second or after recalling the patch twice.. If you select the patch to soon after writing the data, only part of the parameters are restored.

So I will stick with my first solution, writing to the temporary patch area and just accept a longer gap when the chain is changed.

vtgearhead

Quote from: sixeight on September 10, 2018, 11:32:46 PM
Well, in the end writing to the patch memory area and then restoring the patch is not a practical solution. For some reason the patch only gets fully restored after a delay of a second or after recalling the patch twice.. If you select the patch to soon after writing the data, only part of the parameters are restored.

So I will stick with my first solution, writing to the temporary patch area and just accept a longer gap when the chain is changed.

Gumtown's concept was (if I recall correctly) to preload song or set-specific presets into patch area 1-8 as a batch operation. It will never be real time, but could still be valuable to build "scenes" for conventional selection with footswitch.

sixeight

Quote from: vtgearhead on September 11, 2018, 05:01:32 AM
Gumtown's concept was (if I recall correctly) to preload song or set-specific presets into patch area 1-8 as a batch operation. It will never be real time, but could still be valuable to build "scenes" for conventional selection with footswitch.

That is a great idea. I will first release the current solution, but if folks are interested in this solution, I will consider it (only if you actually have a VController)

vtgearhead

Quote from: sixeight on September 11, 2018, 07:24:05 AM
That is a great idea. I will first release the current solution, but if folks are interested in this solution, I will consider it (only if you actually have a VController)

I thought so as well, but never had time to pursue it.  Maybe some enterprising soul could fork my Python based Katana bridge and add this capability.

gumtown

Quote from: MrHaroldA on February 16, 2018, 02:19:05 AM
Is there anybody who can check if my library can communicate with a Katana? I'm actually looking into buying one to test this, but I have no further use for it ;)

I'm just digging into this now, changed the header ID and status addresses for the Katana, but I can't seem to get past this:

Ready!

*** USB task state: 13.
*** USB task state: 20.
*** USB task state: 13.
*** USB task state: 20.
*** USB task state: 13.
*** USB task state: 20.
*** USB task state: 13.
*** USB task state: 20.
*** USB task state: 12.

Not really understanding the HANDSHAKE part, why sending it's device ID to the Katana does anything.
Normally a generic Boss device ID request is sent to the Katana, and it will replay with an ID string.
Not sure if the Katana is receiving anything.

Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

SteveO

#197
Quote from: gumtown on January 31, 2019, 10:08:37 PM
I'm just digging into this now, changed the header ID and status addresses for the Katana, but I can't seem to get past this:

Ready!

*** USB task state: 13.
*** USB task state: 20.
*** USB task state: 13.
*** USB task state: 20.
*** USB task state: 13.
*** USB task state: 20.
*** USB task state: 13.
*** USB task state: 20.
*** USB task state: 12.

Not really understanding the HANDSHAKE part, why sending it's device ID to the Katana does anything.
Normally a generic Boss device ID request is sent to the Katana, and it will replay with an ID string.
Not sure if the Katana is receiving anything.

I have the MS3 library working with a Katana. I modified the header in the MS3.h library, like you did. I didn't need to do much else. However, I found that if the Katana wasn't connected when I restarted the Arduino or Teensy I got USB task state errors. To fix that I added this to my sketch:
//###########################
// If USB connection is lost set the katana back in BTS edit mode
void setEdit(void) {
  unsigned long test = 0;
  byte dataTest = 0;
  Serial.println();
  Serial.println(F("Waiting..."));
  Serial.println();
  katana.begin();
  delay(100);
  switch (katana.update(test, dataTest)) {
    case MS3_READY:
      Serial.println(F("############ Now I'm ready!"));
      Serial.println();
      katana.setEditorMode();
      katana.read(PC, 0x02);
      break;
  }
}
//###########################
//###########################
void loop() {

  // Check for incoming data or send a queued item.
  unsigned long parameter = 0;
  byte data = 0;
  switch (katana.update(parameter, data)) {
    case MS3_NOT_READY:
      Serial.println(F("Katana NOT READY!"));
      Serial.println();
      setEdit();
      break;


Having that delay(100) or greater in there was also important. I don't understand exactly how the USB stuff works but the library is working for me. I have a prototype Katana Teensy controller I'm hoping to wire up in an enclosure next week.


MrHaroldA

#198
Quote from: SteveO on February 01, 2019, 04:10:19 PMI have the MS3 library working with a Katana.

Cool! :D

Quote from: SteveO on February 01, 2019, 04:10:19 PMI modified the header in the MS3.h library, like you did.

You don't need to modify that, just define the MS3_HEADER before including the library and it will use that instead ...


Edit: timing is key with my MS3, hence the *_INTERVAL_MSEC defines, which is the result of many tries to get stable readings ;)
Boss MS-3 and Katana library for Arduino: https://github.com/MrHaroldA/MS3

gumtown

I got it working today too, after getting my MOSI and MISO backwards.
Modified the MS3.h to suit the Katana, and immediately it speweth out Katana effects status.

Ready!

*** USB task state: 20.
*** USB task state: 40.
*** USB task state: 50.
*** USB task state: 51.
TX: (0).
TX: (0).
TX: F0 41 00 00 00 00 33 12 7F 00 00 01 01 7F F7 (15).
*** Up and ready!
Add item 0 to the queue: 0x10000 / 0x11 / 0x2.
Picked up item 0 from the queue: 10000 / 0x11 / 0x2.
TX: F0 41 00 00 00 00 33 11 00 01 00 00 00 00 00 02 7D F7 (18).
RX: F0 41 00 00 00 00 33 12 00 01 00 00 00 07 78 F7 (16).
Loaded patch 7.
Add item 0 to the queue: 0x60000030 / 0x11 / 0x1.
Add item 1 to the queue: 0x60000140 / 0x11 / 0x1.
Add item 2 to the queue: 0x60000655 / 0x11 / 0x1.
Add item 3 to the queue: 0x60000560 / 0x11 / 0x1.
Add item 4 to the queue: 0x6000104E / 0x11 / 0x1.
Add item 5 to the queue: 0x6000034C / 0x11 / 0x1.
Add item 6 to the queue: 0x60000130 / 0x11 / 0x1.
Add item 7 to the queue: 0x60000051 / 0x11 / 0x1.
Add item 8 to the queue: 0x60000610 / 0x11 / 0x1.
Picked up item 0 from the queue: 60000030 / 0x11 / 0x1.
TX: F0 41 00 00 00 00 33 11 60 00 00 30 00 00 00 01 6F F7 (18).
RX: F0 41 00 00 00 00 33 12 60 00 00 30 00 70 F7 (15).
Picked up item 0 from the queue: 60000140 / 0x11 / 0x1.
TX: F0 41 00 00 00 00 33 11 60 00 01 40 00 00 00 01 5E F7 (18).
RX: F0 41 00 00 00 00 33 12 60 00 01 40 00 5F F7 (15).
Picked up item 0 from the queue: 60000655 / 0x11 / 0x1.
TX: F0 41 00 00 00 00 33 11 60 00 06 55 00 00 00 01 44 F7 (18).
RX: F0 41 00 00 00 00 33 12 60 00 06 55 01 44 F7 (15).
Picked up item 0 from the queue: 60000560 / 0x11 / 0x1.
TX: F0 41 00 00 00 00 33 11 60 00 05 60 00 00 00 01 3A F7 (18).
RX: F0 41 00 00 00 00 33 12 60 00 05 60 00 3B F7 (15).
Picked up item 0 from the queue: 6000104E / 0x11 / 0x1.
TX: F0 41 00 00 00 00 33 11 60 00 10 4E 00 00 00 01 41 F7 (18).
RX: F0 41 00 00 00 00 33 12 60 00 10 4E 00 42 F7 (15).
Picked up item 0 from the queue: 6000034C / 0x11 / 0x1.
TX: F0 41 00 00 00 00 33 11 60 00 03 4C 00 00 00 01 50 F7 (18).
RX: F0 41 00 00 00 00 33 12 60 00 03 4C 00 51 F7 (15).
Picked up item 0 from the queue: 60000130 / 0x11 / 0x1.
TX: F0 41 00 00 00 00 33 11 60 00 01 30 00 00 00 01 6E F7 (18).
RX: F0 41 00 00 00 00 33 12 60 00 01 30 00 6F F7 (15).
Picked up item 0 from the queue: 60000051 / 0x11 / 0x1.
TX: F0 41 00 00 00 00 33 11 60 00 00 51 00 00 00 01 4E F7 (18).
RX: F0 41 00 00 00 00 33 12 60 00 00 51 08 47 F7 (15).
Picked up item 0 from the queue: 60000610 / 0x11 / 0x1.
TX: F0 41 00 00 00 00 33 11 60 00 06 10 00 00 00 01 09 F7 (18).
RX: F0 41 00 00 00 00 33 12 60 00 06 10 00 0A F7 (15).

Received 9/9 effect states in 201ms.

BOOSTER:  OFF
MOD: OFF
SR Loop:   ON
Delay 1:   OFF
Delay 2:   OFF
FX:  OFF
EQ: OFF
AMP Type:  ON
REV:  OFF
1610614288: OFF

Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/