技術の家庭菜園

https://tpcbtw.com/

Using ZOOM G3X (v2.10) as a MIDI controller

This is an English translation of an article that appeared in 2018 below.
Translation was performed with the help of Claude.

tpcbtw.hatenablog.com

Note: This article covers the analysis of communication between the G3X (v2.10) and a computer, ultimately extracting G3X data as usable MIDI. For the final procedure, readers can skip to the latter part of the "Duplicating the Start Packet" section.

This method is considered applicable to ZOOM's G series products (G1on, G3, G3n, G5, G5n, etc.) as a whole. However, if the environment differs significantly, the same data sequence may not work. *1
For other products or different firmware versions, please start with simple MIDI message send/receive tests. If that doesn't work, perform packet analysis.

ZOOM G3 and MIDI

I recently purchased a ZOOM multi-effects pedal, the G3X.

f:id:tpcbtw:20180609131114j:plainThe G3 took the world by storm with its user-friendly design, ZOOM's renowned spatial effects, improved distortion effects (for ZOOM), and its trademark affordability.
It has now been reborn as the G3n and G3Xn, but I purchased the older G3X model.
Incidentally, I got it used for 5,000 yen. Cheap.
Of course, I purchased this as a guitar effects pedal, but this series has a USB port.
Apparently, this is for use as a USB audio interface, and dedicated software can also be used to rewrite the effects.
Upon connecting it to a computer, I noticed something. The G3 is recognized as both an audio interface and a MIDI device.

f:id:tpcbtw:20180609131357p:plain

「Although it says "(generic USB audio)" to be vague, it is a bona fide MIDI device.

As a MIDI device, it seems to have a full range of in/out functions.
If the G3 could be used as a MIDI controller, it would greatly expand the possibilities for performances. I definitely want to make use of it somehow.
However, the G3 does not officially state that it can use MIDI. Actually monitoring MIDI from the G3 with appropriate software yields no signals. Sending signals to it elicits no particular response.
There have been some attempts overseas to receive MIDI from the G3, but they don't seem to be working well (especially with v2.00 and later). *2

Can I use zoom G3 as midi controller? | The Gear Page
https://www.thegearpage.net/board/index.php?threads/can-i-use-zoom-g3-as-midi-controller.1123392/

However, as discussed on this page and various predecessor blogs, the G3 is definitely a MIDI device and should be a device that returns MIDI upon some request.
From the above, it can be inferred that some initial signal is being provided from the PC side to get the G3 (v2.00 and later) to output MIDI.
What is that initial message?
If that message can be provided by other software, perhaps the G3 can be made to output MIDI.
To elucidate that, I'll start by performing packet analysis.

Packet Analysis

Here, the goal is to monitor the G3's USB stream and extract arbitrary packets.
Specifically, by observing the communication between the G3 and the effects editing software "ZOOM Edit&Share," I want to monitor its behavior and extract packets that seem relevant.
When it comes to packet capture, Wireshark is the way to go. And starting from version 2.0, Wireshark optionally includes a USB capture feature called USBPcap.
I'll use this to perform the analysis.
Installation and setup are omitted. After connecting the G3 and starting capture on the relevant port, I launched Edit&Share.
Then, the moment Edit&Share starts, packets flow at a tremendous pace.

f:id:tpcbtw:20180609164207p:plain

USB has several connection methods, and USB-MIDI uses a method called bulk transfer. Looking at this timeline, the alternating repetition of in and out at regular intervals can be seen.
Here, operating a knob on the G3 mixes several packets into this transfer cycle.
Specifically, after this packet is passed from the PC to the G3:

0000   1b 00 80 9b 44 4e 08 a8 ff ff 00 00 00 00 09 00   ....DN.¨ÿÿ......
0010   00 01 00 01 00 03 03 08 00 00 00 04 f0 52 00 07   ............ðR..
0020   59 50 f7                                          YP÷

Knob information is passed from the G3, and when this packet is output from the PC side:

0000   1b 00 80 9b 44 4e 08 a8 ff ff 00 00 00 00 09 00   ....DN.¨ÿÿ......
0010   00 01 00 01 00 03 03 08 00 00 00 04 f0 52 00 07   ............ðR..
0020   59 16 f7                                          Y.÷

Duplicating the Start Packet

Now this start packet needs to be recreated somehow.
The last resort would be to write a program, but I really want that to be the last resort.
First, I'll consider implementing this using MIDI messages.
For the time being, I created an arbitrary MIDI message and captured it, resulting in the following packet.

0000   1b 00 80 cb b0 4b 08 a8 ff ff 00 00 00 00 09 00   ...Ë°K.¨ÿÿ......
0010 00 01 00 01 00 03 03 04 00 00 00 0b b0 07 00 ............°..
I'm using MIDI-OX for MIDI transmission and reception.
As you can see, notes and CCs seem to have a length of 31 bytes. I tried creating various messages, but this doesn't change.
In other words, it's impossible to create this start packet with ordinary notes and CCs.
However, while pressing various buttons in MIDI-OX, I succeeded in sending the following packet.
0000   1b 00 80 cb b0 4b 08 a8 ff ff 00 00 00 00 09 00   ...Ë°K.¨ÿÿ......
0010 00 01 00 01 00 03 03 08 00 00 00 04 f0 7e 7f 07 ............ð~..
0020 09 01 f7 ..÷

This is a message called "GM On" and seems to be something called SysEx (System Exclusive).

偏ったDTM用語辞典 - システムエクスクルーシブ:System Exclusiveとは
https://www.g200kg.com/jp/docs/dic/systemexclusive.html

In other words, the previous "GM On" message is one of the universal system exclusives:

SYSX: F0 7E 7F 09 01 F7

Comparing this with the last 7 bytes of the "GM On" packet earlier:

F0 7E 7F 07 09 01 F7

The 1 byte "07" inserted here is probably a checksum or something *3.

So how can the start packet be created?
The first 29 bytes are something unique *4, and for SysEx, it's clear that only the byte sequence after that needs to be considered.
From the 30th byte of the start packet, the data is as follows:

F0 52 00 07 59 50 F7

Since this starts with F0 and ends with F7, it matches the SysEx format.
Here, considering the 4th byte "07" as before, it's some other code.
In other words, omitting this "07," the message to send is:

SYSX: F0 52 00 59 50 F7

Send this message from MIDI-OX. In MIDI-OX, arbitrary SysEx can be sent from View → SysEx.

f:id:tpcbtw:20180609164908p:plain
After sending, operating knobs and buttons causes messages to start arriving from the G3. Success.
This MIDI transmission state is maintained until the USB connection is cut or the end message is received, so there's no problem even if MIDI-OX is closed or the G3 is temporarily disconnected from the MIDI device.
This means it should be usable from other software.

Converting SysEx to Channel Messages

It's good that messages can be received, but the messages arriving from the G3 were also SysEx.
In other words, they're not 30 or 31 bytes long like normal channel messages, and the format differs for each manufacturer, so they can't be handled by ordinary software.
MIDI-OX, which has been used up to this point, can handle SysEx and also has functions to transform arbitrary received MIDI into different messages and act as a MIDI patch bay, but it seems unable to convert SysEx alone.

Translating (Mapping) SysEx - MidiOx
http://www.midiox.com/cgi-bin/yabb/YaBB.pl?board=query;action=display;num=1364504205

SYSEX to MIDI - MidiOx
http://www.midiox.com/cgi-bin/yabb/YaBB.pl?board=query;action=display;num=1060228531

Here, two respondents recommend using "Bome's Midi Translator"*5 to the questioner.
I'd like to use this to convert SysEx into simple channel messages.

Installation and setup are omitted. Set the G3 as the Midi In and the output destination as the Out, and create a new preset.
Bome's Midi Translator has a MIDI learning feature. By pressing "Capture MIDI" and turning or pressing an arbitrary knob, the variable part of the SysEx can be automatically recognized and handled as variables pp, qq, etc.

f:id:tpcbtw:20180609171253p:plain

This time, I converted the footswitch SysEx into a simple note on. Since it's a switch, there is no variable part, just a simple message. What I assigned was "90 30 FF," meaning a note on for C3 with vel 255. *6

With this, the conversion worked without issues. By feeding this back via a virtual MIDI cable or an actual cable, it could be mapped to DAWs, DJ software, and VJ software.

Summary

From packet capture, it was found that the ZOOM G series communicates using SysEx within MIDI.
The start packet for the G3 to send MIDI is "SYSX: F0 52 00 59 50 F7," and by sending this to the G3 using MIDI-OX, signals could be received from the G3 thereafter.
The SysEx sent from the G3 can be converted to arbitrary channel messages using Bome's Midi Translator, allowing the G3 to be treated as a MIDI controller.

 

*1:Moreover, if the G3 firmware version is in the 1.00 series, this complicated procedure seems unnecessary. For the successor models G3n and G5n, the specifications mention "MIDI." However, the MIDI implementation chart that should be simultaneously released has not been made public, so it's unknown how this can be utilized.
Not releasing the implementation chart violates the MIDI standard. MIDI 1.0 Specification Ver. 4.2 states the following:

The standard MIDI implementation chart is created for each product as a quick reference for send/receive functions. (omitted) This chart must be included in the user manual of all MIDI products.

In other words, without an implementation chart, the G3n does not comply with the MIDI standard, but is it acceptable to use the term "MIDI" in that case? The G3 and earlier models did not officially use the term "MIDI" and "happened" to use MIDI-like communication, so the lack of an implementation chart wasn't a problem. However, having written "MIDI" in the specifications for the G3n and later models, it feels like there is an issue.

*2:Conversely, there are several examples of operating the G3 via MIDI. This also doesn't seem to work well with v2.00 and later.

ZOOM G3のパッチとMIDIプログラムチェンジ : 31103.com - BLOG
http://31103.ldblog.jp/archives/51984396.html

Program changes are being performed via CC as described above.
For v2.00 and later, this likely does not function normally, but by sending the start packet described later, it may start working. If there is demand, I would like to verify this, but since I have no particular interest, I'll leave it as hopeful speculation here.

*3:This is likely a lie. I tried some arbitrary bit operations, but it doesn't seem to become 07.

*4:For details, please read the MIDI specification document. I don't want to read it.

*5:https://www.bome.com/products/mtclassic

*6:Actually, such a message should probably be assigned to CC, but I didn't know the naming convention for CC well and it was troublesome. Perhaps B0 00 FF would be good. Or should it be written as C0 00 since it's a type of program change?