Arduino - Gt100 MIDI controler

Started by ptjz, January 18, 2017, 06:41:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ptjz

First of all I would like to apologize for my English, I am using google translate to help me.

The GT-100 has 8 assigns that solve my problems.
For example, the BPM TAP... I put in ASSIGN 1 and I directed the "source" as CC#9.
However when I send the command "MIDI.sendNoteOn (9, 127, 1)" nothing happens.

How do I send the command so the GT100 recognizes the ON / OFF?
I also tried the "MIDI.sendControlChange (9,127,1)" but without success.

sixeight

#1
Try sending
MIDI.sendControlChange (9,127,1) //press pedal

Followed by
MIDI.sendControlChange (9,0,1) //release pedal

You have to release the pedal before it recognises the next press. And as it is tap tempo you have to press it two times before the tempo changes.

ptjz

#2
Thanks my friend, it's working now... Wonderful!
I needed to debounce the switch so he understood the realase, I did not find a simpler way to do it, but I did.

//---------------------------------
// ------------ BT 2 --------------
//---------------------------------

  vBt2 = digitalRead(Bt2);

  if (vBt2 == 0 && vBt2 != vBt2s) {     
   
        TapTempo(127);
        sBt2s = true;
        delay(20);
       
  } vBt2s = vBt2; //Change state
  if (sBt2s == true && vBt2 == 1) { //release
   
        TapTempo(0);
        sBt2s = false;
        delay(20);     
       
  }



Without the 20-second delay, the arduino reads 3 commands instead of 1.

sixeight


ptjz

Quote from: sixeight on January 18, 2017, 11:01:43 PM
The proper way to debounce a switch is explained here:

https://www.pjrc.com/teensy/td_libs_Bounce.html
Very good... i'll test this.


Could someone help me find the Sysex / midi command that opens the tuner and also what enables the pedal in manual mode?
I wanted to do these two commands without having to lose my Assigns.

Reading the midi implementation of the boss can not understand the MIDI command to do this.

sixeight

A great way to find MIDI sysex commands is to use Gumtown's floorbard editor for the GT-100 and put it in debug mode. The sysex commands are displayed on the screen as you press a button or dial a knob in the editor.

https://fxfloorboard.sourceforge.io/info.php?model=gt-100

ptjz

I did this, however, the FloorBoard has no options in the software that enables manual mode or the tuner.  :-\

gumtown

There are no midi cc# or system exclusive commands to operate the actual hardware on the GT-100 surface, but rather the GT-100 pedals control the GT-100 firmware directly.
Although there is no manual mode enable command, you can control the function that the manual mode pedal is assigned to do, which is usually to switch on/off an effect.
You can send sysx data to control any of the GT-100 parameters, if you set multiple sysx command strings to each pedal, you can control a variety of GT-100 parameters in one pedal press.
A bit like having assigns, but you are controlling the function directly, and there is no limit to the amount, where the assigns are limited to 8.
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

sixeight

Is it possible to get the GT100 in tuner mode from the Boss Tone Studio?

If so,  then it should be possible to emulate this from the Arduino.

My results with the units I have.  Can tuner mode be activated through sysex :
* VG99 -  possible
* GR55 -  not possible
* GP10 - possible,  but only when the GP10 is in editor mode.

ptjz

Quote from: gumtown on January 19, 2017, 09:26:30 PM
There are no midi cc# or system exclusive commands to operate the actual hardware on the GT-100 surface, but rather the GT-100 pedals control the GT-100 firmware directly.
Although there is no manual mode enable command, you can control the function that the manual mode pedal is assigned to do, which is usually to switch on/off an effect.
You can send sysx data to control any of the GT-100 parameters, if you set multiple sysx command strings to each pedal, you can control a variety of GT-100 parameters in one pedal press.
A bit like having assigns, but you are controlling the function directly, and there is no limit to the amount, where the assigns are limited to 8.
Yes, I can enable manual / tuner mode if I assign a CC # to it via assing.
However, I would prefer to enable without using or sign to leave them free, this way I can use as assign as a way to reprogram the MIDI controller without I need to change the codes.

ptjz

Quote from: sixeight on January 20, 2017, 12:26:25 AM
Is it possible to get the GT100 in tuner mode from the Boss Tone Studio?

If so,  then it should be possible to emulate this from the Arduino.
i'll try it now.

ptjz

Thanks for the help, using the BOSS TONE STUDIO it was possible to intercept the SysEx command from manual mode and the tuner, both are already working on my controller  ;D

I also intercepted the TAP command, but I could not understand the logic to implement (so far I'm using TAP in the assign).

EXAMPLE
-------------------------------------------------------------------------
BPM 100 -> 240 65 0 0 0 96 18 96 0 7 22 0 100 31 247
BPM 60 -> 240 65 0 0 0 96 18 96 0 7 22 0 60 71 247

The command [12] is the BPM identified in the TAP.
But command [13] did not understand his logic.


sixeight

Byte 11 and 12 are the tempo together.  All numbers of a sysex message must be below 128, apart from the first and last byte.  So byte 11 will be tempo/128 and byte 12 will be tempo%128 (modulus)

Byte 13 is the Roland checksum.  This is explained here:
http://www.2writers.com/eddie/tutsysex.htm

ptjz

#13
I needed to travel the weekend, I left everything here stopped, when returning my GT-100 simply does not accept the Sysex commands.
I did some tests, it before I was traveling was working open the MANUAL and TUNER.
I thought it was a problem with SysEx but I tried another command and it opened.

THE COMMAND THAT OPENED
        byte sysexArray[14] = {0xF0, 0x41, 0x00, 0x00, 0x00, 0x60, 0x12, 0x60, 0x00, 0x00, 0x30, 0x01, 0x6F, 0xF7}; //OD-DS on
        MIDI.sendSysEx(14, sysexArray, true);

WHAT WAS WORKING BUT STOPPED.
        byte sysexArray[14] = {  240, 65, 0, 0, 0, 96, 18, 127, 1, 0, 7, 1, 120, 247 }; //Manual mode
        MIDI.sendSysEx(14, sysexArray, true);
OR
        byte sysexArray[14] = {  0xF0, 0x41, 0x00, 0x00, 0x00, 0x60, 0x12, 0x7F, 0x01, 0x00, 0x07, 0x01, 0x78, 0xF7 }; //Manual mode
        MIDI.sendSysEx(14, sysexArray, true);


The current firmware version of the pedalboard was 2.03 I tried to upgrade to 2.10 but the problem persisted, the MANUAL and TUNER commands no longer work.
I already looked at the configuration of the pedalboard but I do not know if it could be something there.

Using the BOSS TONE STUDIO the same SysEx command (240, 65, 0, 0, 0, 96, 18, 127, 1, 0, 7, 1, 120, 247) is called and the pedalboard is accepted.
I've already tried DEC and HEX without success, it appears on the pedalboard "BULK DATA RECEIVING"  but nothing happens.

ptjz

#14
I made a test, if I connect the USB with the BOSS STUDIO and change in the settings of the GT100 "MIDI IN" to "MIDI" the commands work, even if I take the USB cable.
But after restarting the GT100, the commands stop working.

Then there should be some command that the BOSS STUDIO releasing the TUNER and MANUAL MODE commands.

How can I identify this command? How can I identify this command? Because soon after starting the BOSS STUDIO, after it sends / receive the SysEx commands my commands come back to work.
Because at the start of BOSS STUDIO several SysEx commands are executed.

vtgearhead

There is a little bit of a dance between BTS and the Katana amp.  When started, BTS "unlocks" the amp into editor mode by sending:

F0 7F 00 00 01 01 <checksum> F7

when you exit BTS it exits editor mode by sending:

F0 7F 00 00 01 00 <checksum> F7

Are you seeing anything similar with the GT100?

sixeight

QuoteHow can I identify this command? How can I identify this command? Because soon after starting the BOSS STUDIO, after it sends / receive the SysEx commands my commands come back to work.
Because at the start of BOSS STUDIO several SysEx commands are executed.

If you have a Mac you can use Midi monitor to sniff on output ports and find out what BTS is sending to the GT100. Or maybe somebody with a Mac and a GT100 is willing to find out for you...

A USB port sniffer is probably also able to do this, but it takes a bit more effect to disteact the actual sysex message from the USB message stream...

ptjz

Quote from: snhirsch on January 23, 2017, 08:28:09 AM
Are you seeing anything similar with the GT100?
I searched for "F0 7F 00 00 01 01" and did not find anything similar in the LOG of the events collected at the start / closing of the BTS.

Here is the LOG of all events that I was able to list when opening and closing the BTS -> http://paste.ofcode.org/MtCVfh3LhEjQ2Z436ZZrsJ

I honestly do not even know where to begin in the analysis of this LOG.

ptjz

Quote from: sixeight on January 23, 2017, 09:12:40 AM
If you have a Mac you can use Midi monitor to sniff on output ports and find out what BTS is sending to the GT100. Or maybe somebody with a Mac and a GT100 is willing to find out for you...

A USB port sniffer is probably also able to do this, but it takes a bit more effect to disteact the actual sysex message from the USB message stream...
I do not have MAC, in Brazil it is very expensive to have kkkk.

But I used MIDI-OX to list all SysEx sent by BTS, this way I found the MANUAL and TUNER commands.

I sent in the previous post all LOG that I collected when opening / closing the BTS.

vtgearhead

Quote from: ptjz on January 23, 2017, 09:14:11 AM
I searched for "F0 7F 00 00 01 01" and did not find anything similar in the LOG of the events collected at the start / closing of the BTS.

Here is the LOG of all events that I was able to list when opening and closing the BTS -> http://paste.ofcode.org/MtCVfh3LhEjQ2Z436ZZrsJ

I honestly do not even know where to begin in the analysis of this LOG.

You may need to use a USB sniffer that works at a lower level.  My impression (and this may be incorrect) is that MIDI-OX is only showing you what the device chooses to echo back.  I'd have to check back through my notes to see for sure, but I think I used USBLyzer to capture both sides of the conversation from the start.  Once the device is in edit mode, it does seem to echo back everything - but, again, it may not be echoing the initial command that places it in that mode to begin with.

I was typing fast and not thinking when I posted those messages above.  The strings actually are preceded with the "standard" prefix, which for your unit is:

F0 41 00 00 00 60 12

so, for unlock try:

F0 41 00 00 00 60 12 7F 00 00 01 01 <checksum> F7

and for exiting exit:

F0 41 00 00 00 60 12 7F 00 00 01 00 <checksum> F7

Worst case, the unit will just ignore the message.

ptjz

Hm... thanks, i'll try to use the USBLyzer.

I'm still studying the checksum, how do I calculate the checksum with 14 elements?
In the link previously (http://www.2writers.com/eddie/tutsysex.htm) there are only 12 elements.

sixeight

Your midiox log is clearly one way - from the GT100 to BTS. Here is some clues to the messages:

TIMESTAMP IN PORT STATUS DATA1 DATA2 CHAN NOTE EVENT               
00001906   3   2     F0  Buffer:    15 Bytes   System Exclusive     
  SYSX: F0 7E 00 06 02 41 60 02 00 00 00 00 00 00 F7 ->This is the answer to an identity request message, where the GT100 lets BTS know it is connected. I use these for the VController as well.

0000190C   3   2     F0  Buffer:    14 Bytes   System Exclusive 
SYSX: F0 41 00 00 00 60 12 7F 00 00 00 00 01 F7 -> I think this is the current state of editor mode, which is off.

000019B0   3   2     F0  Buffer:    29 Bytes   System Exclusive
SYSX: F0 41 00 00 00 60 12 10 00 00 00 4F 44 2D 42 61 73 65
SYSX: 20 20 20 20 20 20 20 20 20 15 F7 -> probably patch name of patch 1

000019D9   3   2     F0  Buffer:    29 Bytes   System Exclusive
SYSX: F0 41 00 00 00 60 12 10 01 00 00 44 53 54 2D 42 61 73
SYSX: 65 53 6F 6C 6F 20 20 20 20 3F F7 -> probably patch name of patch 2, etc

Hex 20 is a space when printed as a character. That is how I recognize the patch names.
I also highlighted the addresses that BTS is reading. You can find these in the Midi Implementation Guide of the GT100...

sixeight

Quote from: ptjz on January 23, 2017, 10:17:37 AM
I'm still studying the checksum, how do I calculate the checksum with 14 elements?
In the link previously (http://www.2writers.com/eddie/tutsysex.htm) there are only 12 elements.

Include the address (4 bytes) and all the data bytes and calculate the checksum from there. The data request (11) and data set (12) bytes are easy to recognize in the data stream. The address comes right after that byte. The checksum is always the last byte, just before F7.

ptjz

I do not know if I did it right ... I honestly still did not quite understand how to calculate the checksum.

From this command -> F0 41 00 00 00 60 12 7F 00 00 01 01 <checksum> F7
Extract this part -> 7F 00 00 01 01
I used a converter that I found on the internet and found the checksum -> 7F

When sending the command "F0 41 00 00 00 60 12 7F 00 00 01 01 7F F7" the GT-100 shows the message "MIDI OFF-LINE", however the MIDI commands do not stop working and most important, the command TUNER and MANUAL MODE is work again.

So I put this SysEx in setup() and solving the problem.
Thank you very much for the help you have given me so far, I will continue the project.

Boisdelac

#24
Very old thread.... but....

I'm wondering why you didn´t use the MIDI real-time message "MIDI Clock" to control your GT100's BPM.
MIDI Clock events (0xF8) are sent from the clock generator to the receiver at a rate of 24 pulses per quarter note. At 60 bpm this is every 1 sec/24 = 41.66 ms, at 240 bpm this is 0.25 sec/24 = 8.33 ms.

If you set your GT100 to accept MIDI clock data, you can control it. If the MIDI clock messages are missing, the GT100 will fall back to the default patch BPM.

If using an arduino uno and the midi.h library the code for MIDI clock is ...

// declaration
#include <MIDI.h>                                                        // midi library
MIDI_CREATE_DEFAULT_INSTANCE();                             // create midi object


// setup
MIDI.begin(MIDI_CHANNEL_OMNI);                                // start midi, accept all chanels
MIDI.turnThruOff();                                                       // midi thru off


// function to send one MIDI clock command, has to be called 24 times per quarter
void midi_clock()
{
MIDI.sendClock();                                                         // send midi clock
}