Katana - Roland GA-FC Foot controller communication

Started by CodeSmart, January 18, 2017, 08:42:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Elantric


Good news! Protocol is a MIDI*2.



and the GA-FC Footswitch input circuit looks to be opto-isolated - like a 5pin DIN MIDI input


find IC7, IC9

vtgearhead

Without the isolation the life of that input would be at worst short and brutal and at best as unreliable as a Fender Mustang.  The first couple of times my Mustang IIIv2 jumped presets at a gig I thought it was either my imagination or my accidentally stepping on a footswitch. 

zlot

#77
Hi, new member here.
Got my Katana 100 yesterday, here are some pics of the footswitch:
https://imgur.com/a/JfhpY

I don't think that this will help anyone though. Will try to understand meo_udon's code when I got the time...






CodeSmart

GA-FC MIDI Hardware Interface Revealed
I started this thread so I feel obliged to show my findings as I today spent some hours with a Multimeter and magnifying lamp.
It appears both sides of the TRS cable (more or less) share the same circuit.
Thanks everyone for your contributions.

(Don't be surprised if add a GA-FC interface to some future Primova Sound project  ;D)



GA-FC parts (top and bottom board view)


KATANA parts (photo by Elantric)
Similar circuit.



But I got more gear than I need...and I like it!

sixeight

#79
QuoteGA-FC MIDI Hardware Interface Revealed

So definately half duplex then. I still expect there to be a limited function set on this connector. So probably no sysex control of internal parameters. Only messages for button press and LED states. Also the reason this port runs at twice the normal MIDI speed. Avoid collisions...

But now somebody can duplicate the schematic and try. Should be fun.


zlot

Quote from: sixeight on March 02, 2018, 09:45:45 AM
But now somebody can duplicate the schematic and try. Should be fun.
You could, but that wouldn't be enough, as getting the software embedded in the microcontroller is tricky ;)
It should be easier to replicate the GA-FC using an Arduino, with meo_udon's code for a starting point (I'm currently trying to understand it, will post my findings if I'm successful)

admin

#82
Quote from: zlot on March 02, 2018, 09:55:01 AM
You could, but that wouldn't be enough, as getting the software embedded in the microcontroller is tricky ;)
It should be easier to replicate the GA-FC using an Arduino, with meo_udon's code for a starting point (I'm currently trying to understand it, will post my findings if I'm successful)

But ( in theory) if you populate a Katana 50 PCB with the missing parts (as described in this post)
https://www.vguitarforums.com/smf/index.php?topic=19959.msg166947#msg166947

- with luck a  GA-FC Footswitch may be connected and (hopefully)  work, assuming that the Katana 50's CPU has same code to read a connected GA-FC foot switch ,( as exists on Katana 100 /Head / Artist)   

I figure if we could locate a Roland GA-212 or Cube -80GX Amp service manual , it might go into more details on the GA-FC operation

CodeSmart

Quote from: admsustainiac on March 02, 2018, 10:24:17 AM
I figure if we could locate a Roland GA-212 or Cube -80GX Amp service manual , it might go into more details on the GA-FC operation
I have tried and failed.
But I got more gear than I need...and I like it!

CodeSmart

Quote from: zlot on March 02, 2018, 09:55:01 AM
You could, but that wouldn't be enough, as getting the software embedded in the microcontroller is tricky ;)
For some of us here, it's not tricky at all.
1. Personally the first thing I would do is to grab the RXD wire out of a my MIDX-20 box, connect it to the TIP of the GA-FC cable and set the UART to double speed.
2. While stepping on every button and rocking the expression pedals the MIDX-20 will then dump all MIDI talk to the PC via USB port, and voila' I have the Katana/GA-FC MIDI protocol documented. Probably a one to two hour operation.

Then it's just a matter of making a new PCB and extend the firmware with recent findings.
But I got more gear than I need...and I like it!

zlot

Right, sorry, I didn't understand that you were talking about the K50 :)
Ans yes, dumping the uC's ROM is not easy, but "sniffing" what comes out of it is more simple.

sixeight

#86
OK gentlemen. What is the state of the GA-FC reverse engineering?

I have picked up a Katana 100 with a GA-FC a couple of days ago. Now I am trying to work out the nicest way to have an implementation of the VController with the Katana.

Has anybody been able to get this project further than the existing proof-of-concept that meo-udon provided? It would be interesting to just send a PC message and see what happens...

OK, still pretty sure that the GA-FC uses a different protocol than the USB, but I want to be certain now...

admin

Quote from: sixeight on April 23, 2018, 11:40:51 AM
OK gentlemen. What is the state of the GA-FC reverse engineering?

I have picked up a Katana 100 with a GA-FC a couple of days ago. Now I am trying to work out the nicest way to have an implementation of the VController with the Katana.

Has anybody been able to get this project further than the existing proof-of-concept that meo-udon provided? It would be interesting to just send a PC message and see what happens...

Control Katana via RPI or Beaglebone Black via USB connection and info about Katana MIDI Sysex from VTGEarhead
https://www.vguitarforums.com/smf/index.php?board=240.0
https://www.vguitarforums.com/smf/index.php?topic=19782.0

gumtown

I just recently received some USB host boards (USB-SPI), which can be found on eBay

https://www.ebay.com/itm/Mini-USB-Host-Shield-Support-Google-ADK-Android-For-Arduino-UNO-MEGA-Duemilanove/141977602986?hash=item210e864baa:g:ABwAAOSwZQxW4W~U

And some code by a member Mr HaroldA on GIT Hub, who uses it on a Boss MS-3 USB for a midi controller
https://github.com/MrHaroldA/MS3

But I am also interested in the GAFC port too.
AFAIK it runs at 2x midi speed in half duplex mode
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

CodeSmart

But I got more gear than I need...and I like it!

gumtown

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

vtgearhead


jwoertz

Does anyone know a junction box that I can use with both the GA-FC TRS and 1/4" audio? I want to connect a box to the end of my pedalboard so I can have removable audio and GA-FC lines. Thanks for your help!

TucsonSean

#93
Hello Gentlemen,

I have been following this thread and have been able to verify that the code that meo_udon provided does work with an arduino. Also, the opto-interface that CodeSmart provided does in fact work. I have been able to change channels 1-4 on bank A/1/whatever you call it and the panel on my Katana 100 combo but I have not been able to change channels 1-4 (5-8) on bank B/2/etc... I could use a little help in figuring out the hex values. When the panel button is held down on the GAFC (similar to holding down the panel button on the control panel) allows access to the second bank of 4 channels. My question is, what is being sent by the GAFC when a button is pressed while the panel light is flashing (hope this makes sense)

I have attached a pic of my little test circuit.  My goal is to retrofit an old Line6 Floorboard (amp died but floorboard is still workable) into a pseudo-GAFC with integrated expression pedals.  Kind of cool that the board gets power from the amp so an external power supply is not necessary.

Any help that you can provide would be greatly appreciated.

Regards,
Sean

sixeight

QuoteI could use a little help in figuring out the hex values. When the panel button is held down on the GAFC (similar to holding down the panel button on the control panel) allows access to the second bank of 4 channels. My question is, what is being sent by the GAFC when a button is pressed while the panel light is flashing (hope this makes sense)

Hi Sean,

Great looking board you have there. You are actually treading in uncharted territory here. There are a number of things you can try:

1) Try sending a normal program change Midi message.  0xC0 followed by the channel number should select channels 0 - 8 (including the Panel)
2) Are you able to read the midi messages from the Katana? To make sense of them, here is a basic tutorial on Boss/Roland sysex messages: http://www.2writers.com/eddie/tutsysex.htm
3) The unanswered question is, whether the Katana will receive the same sysex messages it can receive on its USB port. These messages have been documented here: https://www.vguitarforums.com/smf/index.php?topic=19707.0

I hope this will help you get started. Please do share your discoveries.

TucsonSean

Hi Sixeight,

Thank you for the input. I found the sysex website right after I posted so I have been reading through that. Also, I tried sending a 0xC0 followed by 0x01 and nothing happened. The other code that works does not look like standard sysex messages or program change messages. I have attached my code that works for changing the channels along with the non-functioning program change code (SW7). If you see something that looks wrong, please let me know. I am new to midi but not new to electronics or coding. Thank you again for the help.

Regards,
Sean


Code below
=============================================================
//Katana channel switching program

const int SW7 = 6;     // the number of the pushbutton pin
const int SW6 = 7;      // the number of the LED pin
const int SW3 = 8;
const int SW4 = 9;
const int SW5 = 10;
const int SW8 = 11;

void setup() {
  // Initilize the switches as inputs:
  pinMode(SW7, INPUT_PULLUP);
  pinMode(SW6, INPUT_PULLUP);
  pinMode(SW3, INPUT_PULLUP);
  pinMode(SW4, INPUT_PULLUP);
  pinMode(SW5, INPUT_PULLUP);
  pinMode(SW8, INPUT_PULLUP);
 
  pinMode(13, OUTPUT);

//Start the Midi commuincation and initilize the system
  Serial.begin(62500);

  delay(1070);
  Serial.write(0xf0);
  Serial.write(0x0);
  Serial.write(0x0);
  Serial.write(0x56);
  Serial.write(0x7f);
  Serial.write(0x2b);
  Serial.write(0xf7);
 
  delay(7);
  Serial.write(0xf0);
  Serial.write(0x0);
  Serial.write(0x0);
  Serial.write(0x7f);
  Serial.write(0x7f);
  Serial.write(0x02);
  Serial.write(0xf7);
  delay(300);
 
}

void loop() {
  // main code

  if (digitalRead(SW4)==LOW)// channel 2
  {
    digitalWrite(13, HIGH);
    Serial.write(0xf0);//
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x7f);
    Serial.write(0x7f);//
    Serial.write(0x01);//channel of amp :2
    Serial.write(0x0);// 7
    Serial.write(0x01);//checksum
    Serial.write(0xf7);
    delay(10);
    Serial.write(0xf0);
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x7f);
    Serial.write(0x7f);
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x02);
    Serial.write(0xf7);
  }
  else{digitalWrite(13, LOW);}
 
if (digitalRead(SW5)==LOW) //channel 3
  {
    digitalWrite(13, HIGH);
    Serial.write(0xf0);
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x7f);
    Serial.write(0x7f);
    Serial.write(0x02); //channel of amp: 3
    Serial.write(0x0);
    Serial.write(0x00);//checksum
    Serial.write(0xf7);
    delay(10);
    Serial.write(0xf0);
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x7f);
    Serial.write(0x7f);
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x02);
    Serial.write(0xf7);
  } 

  if (digitalRead(SW8)==LOW) //channel 4
  {
    digitalWrite(13, HIGH);
    Serial.write(0xf0);
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x7f);
    Serial.write(0x7f);
    Serial.write(0x04); //channel of amp: 4
    Serial.write(0x0);
    Serial.write(0x7e);
    Serial.write(0xf7);
    delay(10);
    Serial.write(0xf0);//Sysex header
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x7f);
    Serial.write(0x7f);//Sysex header
    Serial.write(0x0);//channel of amp
    Serial.write(0x0);
    Serial.write(0x02);//checksum
    Serial.write(0xf7);
  } 

  if (digitalRead(SW6)==LOW) //channel Panel
  {
    digitalWrite(13, HIGH);
    Serial.write(0xf0);
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x7f);
    Serial.write(0x7f);
    Serial.write(0x08); //channel of amp : panel
    Serial.write(0x0);
    Serial.write(0x7a);//checksum
    Serial.write(0xf7);
    delay(10);
   Serial.write(0xf0);//Sysex header
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x7f);
    Serial.write(0x7f);//Sysex header
    Serial.write(0x0);//channel of amp
    Serial.write(0x0);
    Serial.write(0x02);//checksum
    Serial.write(0xf7);
  } 

  if (digitalRead(SW3)==LOW) //channel 1
  {
    digitalWrite(13, HIGH);
    Serial.write(0xf0);
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x7f);
    Serial.write(0x7f);
    Serial.write(0x20); //channel of amp: 1
    Serial.write(0x0);
    Serial.write(0x62);//checksum
    Serial.write(0xf7);
    delay(10);
        Serial.write(0xf0);//Sysex header
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x7f);
    Serial.write(0x7f);//Sysex header
    Serial.write(0x0);//channel of amp
    Serial.write(0x0);
    Serial.write(0x02);//checksum
    Serial.write(0xf7);
  } 

    if (digitalRead(SW7)==LOW) //channel ?
  {
    digitalWrite(13, HIGH);
    Serial.write(0xC0);
    Serial.write(0x01);
   } 
}


vtgearhead

Grab the sysex documentation from here:

https://github.com/snhirsch/katana-midi-bridge/blob/master/doc/katana_sysex.txt

Read the command syntax explanation at the top, then see this section:


[Preset Recall]

Place in BTS control mode
7F 00 00 01 --> 01

Recall
00 01 00 00 --> 00 xx

Panel: 00
Ch1:   01
Ch2:   02
Ch3:   03
Ch4:   04

Exit BTS control mode
7F 00 00 01 --> 00


Try placing the Katana into 'control' mode and passing, e.g. 05, 06, etc. for channel value.  You may get lucky and it works.

Otherwise, we need to sniff the communication from GA-FC when the footswitch button is held down. 

sixeight

Hi Sean,

Looking at your code, the checksums are the same on all messages. It is probably better to stick to the code as it was provided bij meo-udon as it calculates the checksum:

void loop()
{
  char  ch, sum;
 
  if (!a)
  {
    b++;
    if (b == 4)
      b = 5;
    if (b > 5)
      b = 0;

    ch = 1 << b;
    sum = 0x80-ch;
    sum += 2;
    sum &= 0x7f;
   
    Serial.write(0xf0);
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x7f);
    Serial.write(0x7f);
    Serial.write(ch);
    Serial.write(0x0);
    Serial.write(sum);
    Serial.write(0xf7);
   
  }
  else
  {
    Serial.write(0xf0);
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x7f);
    Serial.write(0x7f);
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x02);
    Serial.write(0xf7);
  }
 
  pinMode(1, INPUT); 
  delay(10);
  pinMode(1, OUTPUT); 

  a++;
  a &= 0x03;     
  delay(330);
}


But my hunch is that you can only press the buttons as they exist on the GAFC. So to reach the other bank you will have to hold the PANEL switch for one second. You can probably simulate this in the Arduino sketch, but it will not give fast switching whenever you move from Bank A to bank B or back.

As the same connection is used for sending and receiving data, the Katana will listen to the GAFC and wait for a switch to be pressed. When that happens comunication is reversed, so the Katana can send the LED state. When that is done the Katana will go back to listening. This is how I think it is working, you will have to find out and confirm stuff.

If I am right then the GAFC connection will not support any other sysex data, as it will mess up the communication handshake of the GAFC connection. To have more functionality, you will have to look at the MIDI over USB. A normal USB shield should work. More info here:

https://www.vguitarforums.com/smf/index.php?topic=17866.0

admin

Quote from: TucsonSean on August 02, 2018, 06:16:30 PM
I have been able to change channels 1-4 on bank A/1/whatever you call it and the panel on my Katana 100 combo but I have not been able to change channels 1-4 (5-8) on bank B/2/etc...

A New recent discovery  -

QuoteI have my Boss FS-5U plugged into my GA-FC" VOL Expression Pedal input and it does an instant switch from A to B. So bank 1A switches to bank 1B etc...

https://www.vguitarforums.com/smf/index.php?topic=24053.msg174866#msg174866

TucsonSean

#99
Sixeight,

I did use the code that meo_udon supplied, I just figured out what the channels were and the corresponding checksum was and used those values instead of the auto-calculation method that he used. If you look at my code, it shows that each channel has the correct checksum corresponding to each channel before the delay(10). The second run of midi data out after the delay is what I am unfamiliar with. I do know that without it, it would not switch channels as reliably as with it. It could also be that I send data as long as the switch is pressed and not only once.

I used an Mega 2560 to send to the serial monitor the channel and calculated values given by the original code as it would switch through the 4 channels and the panel flawlessly. What I couldn't/haven't found was the codes for switching over to the second bank. I did press and hold the panel button on the actual amp and switched over to the second bank and then I could switch through the channels with the arduino and when I pressed the panel button (actual amp button) it switched back to the first bank of channels.

I did stumble on to the code for switching the effects on and off but it did not work flawlessly as I could not switch back over to selecting channels unless I pressed the panel button and then the channel. I need to clean up my code so that it only sends the data once for each button press (with de-bounce) and not rapid-fire like it currently does.

Progress is sometimes slow coming but well worth it in the end. Again, thanks for all of the help and suggestions.

Regards,
Sean


code snippet~

============================
if (digitalRead(SW4)==LOW)// channel 2
  {
    digitalWrite(13, HIGH);
    Serial.write(0xf0);//Sysex header
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x7f);
    Serial.write(0x7f);//Sysex header
    Serial.write(0x01);//channel of amp :6
    Serial.write(0x0);// 7
    Serial.write(0x01);//checksum
    Serial.write(0xf7);
    delay(10);
    Serial.write(0xf0);//Sysex header
    Serial.write(0x0);
    Serial.write(0x0);
    Serial.write(0x7f);
    Serial.write(0x7f);//Sysex header
    Serial.write(0x0);//channel of amp
    Serial.write(0x0);
    Serial.write(0x02);//checksum
    Serial.write(0xf7);

  }

bold and italicized code is what I was referring to. Don't mind the lables to the right as they are not correct. The labels on the upper code are correct (channel of amp and checksum)