Barsik-Barbosik / Zoom-Firmware-Editor

MIT License
198 stars 28 forks source link

Mapping of Effect ID: FLST_SEQ <-> SysEx #15

Open mungewell opened 5 years ago

mungewell commented 5 years ago

Getting familar with SysEx control of the pedals, it seems that the command to place effects into the various 'slots' uses a ID as follows. https://www.thegearpage.net/board/index.php?threads/midi-control-of-zoom-g3-video.1033719/page-3

Selecting effect from the editor:
selecting Comp in slot 6 sends F0 52 00 5A 31 05 01 17 00 F7,
selecting MComp in slot 6 sends F0 52 00 5A 31 05 01 19 00 F7,
selecting ZNR: F0 52 00 5A 31 05 01 1B 00 F7
selecting Pedal pitch: F0 52 00 5A 31 00 01 45 00 F7

So the 8th byte is the effect type.
This is consistent with the effect type list below: 17hex = 23 dec
Table: effect types - numbers are decimal:
000, M-FILTER
001, THE VIBE
002, Z-ORGAN
003, PEDAL VX
004, PHASE DELAY
005, FILTER DELAY
... 

Do 'we' know if/how these relate to the placement of the effects in FLST_SEQ?

mungewell commented 5 years ago

Another reference for the Effect IDs over SysEx https://github.com/sixeight7/VController_v2/blob/master/VController_v2/MIDI_ZG3.ino#L324

Edit: Eek... his quoted numbers are off by 1, array should start at '0'.

mungewell commented 5 years ago

So, that page is mostly correct but I found that some of the commands are different for the G1Four.

Turn on/off effect slots
--
amidi -p hw:1,0,0 -S 'F0 52 00 6E 64 03 00 00 00 01 00 00 00 00 F7' - slot 1, on
amidi -p hw:1,0,0 -S 'F0 52 00 6E 64 03 00 01 00 01 00 00 00 00 F7' - slot 2, on
amidi -p hw:1,0,0 -S 'F0 52 00 6E 64 03 00 01 00 00 00 00 00 00 F7' - slot 2, off
etc..

Finding out how to set which effect is used in a slot was a real pain, they've done some weird bit shifting.

Bypass Slot 2
amidi -p hw:1,0,0 -S 'F0 52 00 6E 64 03 00 01 01 00 00 00 00 00 F7'

Load Effect into Slot 2 - ! = unknown effect (haven't found a valid one yet)
amidi -p hw:1,0,0 -S 'F0 52 00 6E 64 03 00 01 01 00 50 00 00 00 F7'

load "rack comp" to slot 1
amidi -p hw:1,0,0 -S 'F0 52 00 6E 64 03 00 00 01 20 00 00 08 00 F7'

load "slow attack" to slot 1
amidi -p hw:1,0,0 -S 'F0 52 00 6E 64 03 00 00 01 30 00 00 08 00 F7'
                                           ^^    ^^       ^^- Group??? should be group 1 << 3bits!!
                                           ||    ++- Effect (ID from FLST_SEQ)
                                           ++- Slot

load "rack comp" to slot 2
amidi -p hw:1,0,0 -S 'F0 52 00 6E 64 03 00 01 01 20 00 00 08 00 F7'
EP_STOMP.ZD2 (ver= 1.30 ), group= 3 , id= 32 , installed= 1

load "EP Stamp" to slot 2
amidi -p hw:1,0,0 -S 'F0 52 00 6E 64 03 00 01 01 20 00 00 18 00 F7'
EP_STOMP.ZD2 (ver= 1.30 ), group= 3 , id= 32 , installed= 1

load "MS2x14" to slot 2
amidi -p hw:1,0,0 -S 'F0 52 00 6E 64 03 00 01 01 10 00 00 28 00 F7'
MS4X12.ZD2 (ver= 1.20 ), group= 5 , id= 16 , installed= 1

load "Bomber" to slot 2
amidi -p hw:1,0,0 -S 'F0 52 00 6E 64 03 00 01 01 10 00 00 38 00 F7'
BOMBER.ZD2 (ver= 1.30 ), group= 7 , id= 16 , installed= 1

load "blackOpt" to slot 2
amidi -p hw:1,0,0 -S 'F0 52 00 6E 64 03 00 01 01 10 00 00 0C 00 F7'
BLACKOPT.ZD2 (ver= 1.20 ), group= 1 , id= 16 , installed= 0, unknown=1
shooking commented 3 years ago

hi - wonderful stuff you are all doing. I got a Zoom B1XFour and G1XFour recently. Started down the Wireshark / parse sysex sentences then cut and paste into MidiOx. Anyhow thanks for all you done and if I may what is the best way to contribute some extra(?) info?

For example, I too was stuck on the CMD 31 for g3 v G1X. I could see 64 was the magic string based on USB decoding - glad I stumbled across your work.

So "bypass" of 64 is a special case of setting the FX to 0 right. But do you know it is possible to get the Zoom to tell you current status of FX?

pi@raspberrypi:~/Software/ZoomPedal $ theCMD=64; amidi -p ${MIDI_DEV} -S "F0 52 00 6E $theCMD 02 bp ep 00 F7" -r t1.bin -t 1; hexdump -C t1.bin; rm t1.bin

Here bp is beginning parameter (param - 1 as ever) ep is ending parameter (" ") ONE caveat - if an FX takes up 2 slots (like a Fender Twin) then you need to look a m. m+1 for slot m and all other slots are moved up by one.

EXAMPLE Let's move to patch Randy Train (why not)

pi@raspberrypi:~/Software/ZoomPedal $ theCMD=64; amidi -p ${MIDI_DEV} -S "F0 52 00 6E $theCMD 02 00 08 00 F7" -r t1.bin -t 1; hexdump -C t1.bin; rm t1.bin Show me ASCII for params 0 ... 8 (I guess the most I ever seen is 8 or 9)

pi@raspberrypi:~/Software/ZoomPedal $ theCMD=64; amidi -p ${MIDI_DEV} -S "F0 52 00 6E $theCMD 02 00 08 00 F7" -r t1.bin -t 1; hexdump -C t1.bin; rm t1.bin

1023 bytes read 00000000 f0 52 00 6e 64 01 00 00 00 00 31 00 00 00 00 00 |.R.nd.....1.....| 00000010 00 00 00 00 00 00 01 00 4f 6e 4f 66 66 00 00 00 |........OnOff...| 00000020 00 00 00 01 00 00 5a 4e 52 00 00 00 00 00 00 00 |......ZNR.......| 00000030 00 01 01 00 5a 4e 52 00 00 00 00 00 00 00 00 02 |....ZNR.........| 00000040 00 00 45 46 58 49 4e 00 00 00 00 00 00 02 01 00 |..EFXIN.........| 00000050 44 45 54 43 54 00 00 00 00 00 00 03 00 00 31 30 |DETCT.........10| 00000060 30 00 00 00 00 00 00 00 00 03 01 00 44 65 70 74 |0...........Dept| 00000070 68 00 00 00 00 00 00 04 00 00 33 30 00 00 00 00 |h.........30....| 00000080 00 00 00 00 00 04 01 00 54 48 52 53 48 00 00 00 |........THRSH...| 00000090 00 00 00 05 00 00 30 00 00 00 00 00 00 00 00 00 |......0.........| 000000a0 00 05 01 00 44 65 63 61 79 00 00 00 00 00 01 00 |....Decay.......| 000000b0 00 00 31 00 00 00 00 00 00 00 00 00 01 00 01 00 |..1.............| 000000c0 4f 6e 4f 66 66 00 00 00 00 00 01 01 00 00 50 61 |OnOff.........Pa| 000000d0 72 61 45 51 00 00 00 00 01 01 01 00 50 61 72 61 |raEQ........Para| 000000e0 45 51 00 00 00 00 01 02 00 00 20 38 30 30 20 00 |EQ........ 800 .| 000000f0 00 00 00 00 01 02 01 00 46 52 45 51 00 00 00 00 |........FREQ....| 00000100 00 00 01 03 00 00 20 32 2e 30 20 00 00 00 00 00 |...... 2.0 .....| 00000110 01 03 01 00 51 00 00 00 00 00 00 00 00 00 01 04 |....Q...........| 00000120 00 00 38 2e 35 00 00 00 00 00 00 00 01 04 01 00 |..8.5...........| 00000130 47 61 69 6e 00 00 00 00 00 00 01 05 00 00 38 35 |Gain..........85| 00000140 00 00 00 00 00 00 00 00 01 05 01 00 56 4f 4c 00 |............VOL.| 00000150 00 00 00 00 00 00 02 00 00 00 31 00 00 00 00 00 |..........1.....| 00000160 00 00 00 00 02 00 01 00 4f 6e 4f 66 66 00 00 00 |........OnOff...| 00000170 00 00 02 01 00 00 44 49 53 54 20 50 6c 75 73 00 |......DIST Plus.| 00000180 02 01 01 00 44 49 53 54 20 50 6c 75 73 00 02 02 |....DIST Plus...| 00000190 00 00 31 30 30 00 00 00 00 00 00 00 02 02 01 00 |..100...........| 000001a0 47 61 69 6e 00 00 00 00 00 00 02 03 00 00 31 30 |Gain..........10| 000001b0 30 00 00 00 00 00 00 00 02 03 01 00 56 4f 4c 00 |0...........VOL.| 000001c0 00 00 00 00 00 00 02 04 00 00 30 00 00 00 00 00 |..........0.....| 000001d0 00 00 00 00 02 04 01 00 44 72 79 4d 78 00 00 00 |........DryMx...| 000001e0 00 00 02 05 00 00 4f 52 47 00 00 00 00 00 00 00 |......ORG.......| 000001f0 02 05 01 00 43 6f 6d 70 00 00 00 00 00 00 03 00 |....Comp........| 00000200 00 00 31 00 00 00 00 00 00 00 00 00 03 00 01 00 |..1.............| 00000210 4f 6e 4f 66 66 00 00 00 00 00 03 01 00 00 47 74 |OnOff.........Gt| 00000220 20 47 45 51 20 37 00 00 03 01 01 00 47 74 20 47 | GEQ 7......Gt G| 00000230 45 51 20 37 00 00 03 02 00 00 37 2e 30 00 00 00 |EQ 7......7.0...| 00000240 00 00 00 00 03 02 01 00 31 30 30 00 00 00 00 00 |........100.....| 00000250 00 00 03 03 00 00 32 2e 30 00 00 00 00 00 00 00 |......2.0.......| 00000260 03 03 01 00 32 30 30 00 00 00 00 00 00 00 03 04 |....200.........| 00000270 00 00 33 2e 30 00 00 00 00 00 00 00 03 04 01 00 |..3.0...........| 00000280 34 30 30 00 00 00 00 00 00 00 03 05 00 00 32 2e |400...........2.| 00000290 30 00 00 00 00 00 00 00 03 05 01 00 38 30 30 00 |0...........800.| 000002a0 00 00 00 00 00 00 04 00 00 00 30 00 00 00 00 00 |..........0.....| 000002b0 00 00 00 00 04 00 01 00 44 75 6d 6d 79 00 00 00 |........Dummy...| 000002c0 00 00 04 01 00 00 47 74 20 47 45 51 20 37 00 00 |......Gt GEQ 7..| 000002d0 04 01 01 00 47 74 20 47 45 51 20 37 00 00 04 02 |....Gt GEQ 7....| 000002e0 00 00 31 2e 30 00 00 00 00 00 00 00 04 02 01 00 |..1.0...........| 000002f0 31 2e 36 6b 00 00 00 00 00 00 04 03 00 00 31 2e |1.6k..........1.| 00000300 30 00 00 00 00 00 00 00 04 03 01 00 33 2e 32 6b |0...........3.2k| 00000310 00 00 00 00 00 00 04 04 00 00 2d 31 2e 30 00 00 |..........-1.0..| 00000320 00 00 00 00 04 04 01 00 36 2e 34 6b 00 00 00 00 |........6.4k....| 00000330 00 00 04 05 00 00 37 34 00 00 00 00 00 00 00 00 |......74........| 00000340 04 05 01 00 56 4f 4c 00 00 00 00 00 00 00 05 00 |....VOL.........| 00000350 00 00 31 00 00 00 00 00 00 00 00 00 05 00 01 00 |..1.............| 00000360 4f 6e 4f 66 66 00 00 00 00 00 05 01 00 00 52 6f |OnOff.........Ro| 00000370 6f 6d 00 00 00 00 00 00 05 01 01 00 52 6f 6f 6d |om..........Room| 00000380 00 00 00 00 00 00 05 02 00 00 33 00 00 00 00 00 |..........3.....| 00000390 00 00 00 00 05 02 01 00 50 72 65 44 00 00 00 00 |........PreD....| 000003a0 00 00 05 03 00 00 31 37 00 00 00 00 00 00 00 00 |......17........| 000003b0 05 03 01 00 44 65 63 61 79 00 00 00 00 00 05 04 |....Decay.......| 000003c0 00 00 36 33 00 00 00 00 00 00 00 00 05 04 01 00 |..63............| 000003d0 4d 69 78 00 00 00 00 00 00 00 05 05 00 00 4f 46 |Mix...........OF| 000003e0 46 00 00 00 00 00 00 00 05 05 01 00 54 61 69 6c |F...........Tail| 000003f0 00 00 00 00 00 00 06 00 00 00 31 00 00 00 00 |..........1....| 000003ff

Now let's take just the 1st param ... ZNR ...

pi@raspberrypi:~/Software/ZoomPedal $ theCMD=64; amidi -p ${MIDI_DEV} -S "F0 52 00 6E $theCMD 02 00 00 00 F7" -r t1.bin -t 1; hexdump -C t1.bin; rm t1.bin

176 bytes read 00000000 00 f0 52 00 6e 64 01 00 00 00 00 31 00 00 00 00 |..R.nd.....1....| 00000010 00 00 00 00 00 00 00 01 00 4f 6e 4f 66 66 00 00 |.........OnOff..| 00000020 00 00 00 00 01 00 00 5a 4e 52 00 00 00 00 00 00 |.......ZNR......| 00000030 00 00 01 01 00 5a 4e 52 00 00 00 00 00 00 00 00 |.....ZNR........| 00000040 02 00 00 45 46 58 49 4e 00 00 00 00 00 00 02 01 |...EFXIN........| 00000050 00 44 45 54 43 54 00 00 00 00 00 00 03 00 00 31 |.DETCT.........1| 00000060 30 30 00 00 00 00 00 00 00 00 03 01 00 44 65 70 |00...........Dep| 00000070 74 68 00 00 00 00 00 00 04 00 00 33 30 00 00 00 |th.........30...| 00000080 00 00 00 00 00 00 04 01 00 54 48 52 53 48 00 00 |.........THRSH..| 00000090 00 00 00 00 05 00 00 30 00 00 00 00 00 00 00 00 |.......0........| 000000a0 00 00 05 01 00 44 65 63 61 79 00 00 00 00 00 f7 |.....Decay......| 000000b0

Reading from the display it is on ZNR DETCT=EFXIN Depth=100 THRSH=30 Decay=0

Exactly as on pedal. Ok what about FX2

pi@raspberrypi:~/Software/ZoomPedal $ theCMD=64; amidi -p ${MIDI_DEV} -S "F0 52 00 6E $theCMD 02 01 01 00 F7" -r t1.bin -t 1; hexdump -C t1.bin; rm t1.bin

175 bytes read 00000000 f0 52 00 6e 64 01 01 00 00 00 31 00 00 00 00 00 |.R.nd.....1.....| 00000010 00 00 00 00 01 00 01 00 4f 6e 4f 66 66 00 00 00 |........OnOff...| 00000020 00 00 01 01 00 00 50 61 72 61 45 51 00 00 00 00 |......ParaEQ....| 00000030 01 01 01 00 50 61 72 61 45 51 00 00 00 00 01 02 |....ParaEQ......| 00000040 00 00 20 38 30 30 20 00 00 00 00 00 01 02 01 00 |.. 800 .........| 00000050 46 52 45 51 00 00 00 00 00 00 01 03 00 00 20 32 |FREQ.......... 2| 00000060 2e 30 20 00 00 00 00 00 01 03 01 00 51 00 00 00 |.0 .........Q...| 00000070 00 00 00 00 00 00 01 04 00 00 38 2e 35 00 00 00 |..........8.5...| 00000080 00 00 00 00 01 04 01 00 47 61 69 6e 00 00 00 00 |........Gain....| 00000090 00 00 01 05 00 00 38 35 00 00 00 00 00 00 00 00 |......85........| 000000a0 01 05 01 00 56 4f 4c 00 00 00 00 00 00 00 f7 |....VOL........| 000000af

And on the display

On ParaEQ FREQ 800 Q 2.0 Gain 8.5 VOL 85 exactly same

Repeat for 3, 185 bytes come back

pi@raspberrypi:~/Software/ZoomPedal $ theCMD=64; amidi -p ${MIDI_DEV} -S "F0 52 00 6E $theCMD 02 02 02 00 F7" -r t1.bin -t 1; hexdump -C t1.bin; rm t1.bin

175 bytes read 00000000 f0 52 00 6e 64 01 02 00 00 00 31 00 00 00 00 00 |.R.nd.....1.....| 00000010 00 00 00 00 02 00 01 00 4f 6e 4f 66 66 00 00 00 |........OnOff...| 00000020 00 00 02 01 00 00 44 49 53 54 20 50 6c 75 73 00 |......DIST Plus.| 00000030 02 01 01 00 44 49 53 54 20 50 6c 75 73 00 02 02 |....DIST Plus...| 00000040 00 00 31 30 30 00 00 00 00 00 00 00 02 02 01 00 |..100...........| 00000050 47 61 69 6e 00 00 00 00 00 00 02 03 00 00 31 30 |Gain..........10| 00000060 30 00 00 00 00 00 00 00 02 03 01 00 56 4f 4c 00 |0...........VOL.| 00000070 00 00 00 00 00 00 02 04 00 00 30 00 00 00 00 00 |..........0.....| 00000080 00 00 00 00 02 04 01 00 44 72 79 4d 78 00 00 00 |........DryMx...| 00000090 00 00 02 05 00 00 4f 52 47 00 00 00 00 00 00 00 |......ORG.......| 000000a0 02 05 01 00 43 6f 6d 70 00 00 00 00 00 00 f7 |....Comp.......| 000000af

on, DIST Plus, Gain 100, VOL 100, DryMx, 0, Comp ORG ok

pi@raspberrypi:~/Software/ZoomPedal $ theCMD=64; amidi -p ${MIDI_DEV} -S "F0 52 00 6E $theCMD 02 03 03 00 F7" -r t1.bin -t 1; hexdump -C t1.bin; rm t1.bin

175 bytes read 00000000 f0 52 00 6e 64 01 03 00 00 00 31 00 00 00 00 00 |.R.nd.....1.....| 00000010 00 00 00 00 03 00 01 00 4f 6e 4f 66 66 00 00 00 |........OnOff...| 00000020 00 00 03 01 00 00 47 74 20 47 45 51 20 37 00 00 |......Gt GEQ 7..| 00000030 03 01 01 00 47 74 20 47 45 51 20 37 00 00 03 02 |....Gt GEQ 7....| 00000040 00 00 37 2e 30 00 00 00 00 00 00 00 03 02 01 00 |..7.0...........| 00000050 31 30 30 00 00 00 00 00 00 00 03 03 00 00 32 2e |100...........2.| 00000060 30 00 00 00 00 00 00 00 03 03 01 00 32 30 30 00 |0...........200.| 00000070 00 00 00 00 00 00 03 04 00 00 33 2e 30 00 00 00 |..........3.0...| 00000080 00 00 00 00 03 04 01 00 34 30 30 00 00 00 00 00 |........400.....| 00000090 00 00 03 05 00 00 32 2e 30 00 00 00 00 00 00 00 |......2.0.......| 000000a0 03 05 01 00 38 30 30 00 00 00 00 00 00 00 f7 |....800........| 000000af this more complex - there are 3 pages. Not sure how to see this but I guess one could know if one recognised string Gt GEQ7 so let's ask for 2 pages

pi@raspberrypi:~/Software/ZoomPedal $ theCMD=64; amidi -p ${MIDI_DEV} -S "F0 52 00 6E $theCMD 02 03 04 00 F7" -r t1.bin -t 1; hexdump -C t1.bin; rm t1.bin

343 bytes read 00000000 f0 52 00 6e 64 01 03 00 00 00 31 00 00 00 00 00 |.R.nd.....1.....| 00000010 00 00 00 00 03 00 01 00 4f 6e 4f 66 66 00 00 00 |........OnOff...| 00000020 00 00 03 01 00 00 47 74 20 47 45 51 20 37 00 00 |......Gt GEQ 7..| 00000030 03 01 01 00 47 74 20 47 45 51 20 37 00 00 03 02 |....Gt GEQ 7....| 00000040 00 00 37 2e 30 00 00 00 00 00 00 00 03 02 01 00 |..7.0...........| 00000050 31 30 30 00 00 00 00 00 00 00 03 03 00 00 32 2e |100...........2.| 00000060 30 00 00 00 00 00 00 00 03 03 01 00 32 30 30 00 |0...........200.| 00000070 00 00 00 00 00 00 03 04 00 00 33 2e 30 00 00 00 |..........3.0...| 00000080 00 00 00 00 03 04 01 00 34 30 30 00 00 00 00 00 |........400.....| 00000090 00 00 03 05 00 00 32 2e 30 00 00 00 00 00 00 00 |......2.0.......| 000000a0 03 05 01 00 38 30 30 00 00 00 00 00 00 00 04 00 |....800.........| 000000b0 00 00 30 00 00 00 00 00 00 00 00 00 04 00 01 00 |..0.............| 000000c0 44 75 6d 6d 79 00 00 00 00 00 04 01 00 00 47 74 |Dummy.........Gt| 000000d0 20 47 45 51 20 37 00 00 04 01 01 00 47 74 20 47 | GEQ 7......Gt G| 000000e0 45 51 20 37 00 00 04 02 00 00 31 2e 30 00 00 00 |EQ 7......1.0...| 000000f0 00 00 00 00 04 02 01 00 31 2e 36 6b 00 00 00 00 |........1.6k....| 00000100 00 00 04 03 00 00 31 2e 30 00 00 00 00 00 00 00 |......1.0.......| 00000110 04 03 01 00 33 2e 32 6b 00 00 00 00 00 00 04 04 |....3.2k........| 00000120 00 00 2d 31 2e 30 00 00 00 00 00 00 04 04 01 00 |..-1.0..........| 00000130 36 2e 34 6b 00 00 00 00 00 00 04 05 00 00 37 34 |6.4k..........74| 00000140 00 00 00 00 00 00 00 00 04 05 01 00 56 4f 4c 00 |............VOL.| 00000150 00 00 00 00 00 00 f7 |.......| 00000157

And that seems to cover from 100 == 7.0 pg1 to VOL 74 page 3

You get the idea.

Anyhow I am able to read and set parameters, read FX. Working on your issue above to set FX. Thanks for all the hints collectively give thus far.

I think I will start looking at the Firmware - I used to have the Miniak firmware - Alesis/AKAI never published that - managed to crack 3 of the 4 format - multi's was the PITA. Patches (was given), Sequences and Rhythms was fun ;-).

shooking commented 3 years ago

Regarding the "slots" - I can see this has something to do with some index based I guess on the firmware (and related to the order in which the G1X reads stuff)

Getting late here but I found this interesting - hoping it means more to you OR you already discovered this and I not learnt where to look pi@raspberrypi:~/Software/ZoomPedal $ theCMD=64; amidi -p ${MIDI_DEV} -S "F0 52 00 6E $theCMD 05 F7" -r t1.bin -t 1; hexdump -C t1.bin; rm t1.bin

115 bytes read 00000000 f0 52 00 6e 64 06 52 41 43 4b 43 4f 4d 50 2e 5a |.R.nd.RACKCOMP.Z| 00000010 44 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |D2..............| 00000020 00 00 00 00 08 01 00 00 00 00 00 00 00 00 00 00 |................| 00000030 32 00 28 00 00 00 10 00 00 00 00 09 00 05 00 00 |2.(.............| 00000040 00 00 00 00 00 00 09 00 06 00 00 00 00 00 00 00 |................| 00000050 00 64 00 50 00 00 00 16 00 00 00 00 00 00 00 00 |.d.P............| 00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000070 00 00 f7 |...| 00000073 pi@raspberrypi:~/Software/ZoomPedal $ theCMD=64; amidi -p ${MIDI_DEV} -S "F0 52 00 6E $theCMD 05 00 00 00 00 00 00 00 00 F7" -r t1.bin -t 1; hexdump -C t1.bin; rm t1.bin

93 bytes read 00000000 f0 52 00 6e 64 06 53 4c 57 41 54 4b 2e 5a 44 32 |.R.nd.SLWATK.ZD2| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 06 01 00 00 00 00 00 00 00 00 00 00 |................| 00000030 31 00 14 00 00 00 10 00 00 00 00 0a 00 0a 00 00 |1...............| 00000040 00 10 00 00 00 00 64 00 64 00 00 00 00 00 00 00 |......d.d.......| 00000050 00 64 00 50 00 00 00 16 00 00 00 00 f7 |.d.P.........| 0000005d

so as I added more 0's on I can see I am getting the file names? In terms of this current patch FX1 = SlowATTCK FX2 = ZNR FX3 = FD TWNR ... I think this takes 2 slots? FX4/5 = Room FX5/6 = AutoWah

so 64 05 seems to be something related to files?

Actually

pi@raspberrypi:~/Software/ZoomPedal $ theCMD=64; amidi -p ${MIDI_DEV} -S "F0 52 00 6E $theCMD 05 00 F7" -r t1.bin -t 1; hexdump -C t1.bin; rm t1.bin

49 bytes read 00000000 f0 52 00 6e 64 06 42 59 50 41 53 53 2e 5a 44 32 |.R.nd.BYPASS.ZD2| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 02 01 00 00 00 00 00 00 00 00 00 00 |................| 00000030 f7 |.| 00000031

And I was on bypass

pi@raspberrypi:~/Software/ZoomPedal $ theCMD=64; amidi -p ${MIDI_DEV} -S "F0 52 00 6E $theCMD 05 01 F7" -r t1.bin -t 1; hexdump -C t1.bin; rm t1.bin

93 bytes read 00000000 f0 52 00 6e 64 06 43 4f 4d 50 2e 5a 44 32 00 00 |.R.nd.COMP.ZD2..| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 00 00 00 00 06 01 00 00 00 00 00 00 00 00 00 00 |................| 00000030 0a 00 06 00 00 00 10 00 00 00 00 01 00 00 00 00 |................| 00000040 00 00 00 00 00 00 0a 00 06 00 00 00 00 00 00 00 |................| 00000050 00 64 00 50 00 00 00 16 00 00 00 00 f7 |.d.P.........| 0000005d

And now FX1 is on COMP

but clearly more params are required because more often than not this crashes the G1XFour ... will sleep on it.

mungewell commented 3 years ago

@shooking

I think you'd be real interested in the sister project which is targeted at the G1Four (and friends): https://github.com/mungewell/zoom-zt2

I had been making notes about the detailed Midi control of the device(s), but I had my pedal die earlier in the year. You seem like you are making great progress, and I would like to collaborate if you want... I can share my notes with you too, but lets open bugs over here... https://github.com/mungewell/zoom-zt2/issues

midi_notes.txt

shooking commented 3 years ago

Firstly wishing you a great new year - hopefully a lot better than the last one :-(

Hi so I was stuck on processing the Zoom output with my Raspberry PI Ctrlr and Lua. Short version ... I have an alternative way of interpreting the FXID, GID from a ZT2 dump

LMT1176.ZD2
1.50
01 20
80 01
AHH these are 8 bit because converts from 8 midi byte to 7
And it is an endianess?
so 80 01 is really 180(h)
for some reason we right shift 5 to get the GID/

So 180(h) >>5 = 0c
   100(h) >>5 = 08
SL = slot 0 .. 8
L1/H1 = low/high value of FX ID (8 bit value)
GS= GID (01 80, 01 00) >> 5

 amidi -p ${MIDI_DEV} -S "F0 52 00 6E 64 03 00 SL 01 L1 H1 00 GS 00 F7" -r pants.bin -t1; hexdump -C pants.bin; rm pants.bin

Long version.

Linux (well RPi at least) ALSA MIDI sysex seems limited to 256 bytes. I was expecting 603 but always came up 256 short ... this lead me to reinterpret data and I see the GroupID shift different to you now. Anyhow I realised some of the file capture commands have a block size. Changed from 0x04 to 0x02 and now I get "256" chunks rather than "512". I hacked at your zoomzt2.py, modified that to accept 256 rather than 512 and now I am am able to grab the ZT2's into LUA at least.

So what? Well I started to unpick what you did with Construct. That was too smart for me ... so I played and now I see the format differently to you - I suspect it amounts to the same thing .. but the swines just ASCII coded things right??

So your decoded comes out with strings like:

dump

ListContainer: 
    Container: 
        a = b'>>>\x00' (total 4)
        b = None
        name = u'BYPASS.ZD2' (total 10)
        c = None
        d = b'1' (total 1)
        e = None
        f = b'<<<\x00' (total 4)
        g = None
    ListContainer: 
        Container: 
            group = 1
            groupname = (enum) DYNAMICS 1
            effects = ListContainer: 
                Container: 
                    effect = u'COMP.ZD2' (total 8)
                    version = u'1.40' (total 4)
                    installed = 1
                    id = 16777232
                    group = 1
                Container: 
                    effect = u'RACKCOMP.ZD2' (total 12)
                    version = u'1.40' (total 4)
                    installed = 1
                    id = 16777248
                    group = 1
                Container: 
                    effect = u'SLWATK.ZD2' (total 10)
                    version = u'1.50' (total 4)
                    installed = 1
                    id = 16777264
                    group = 1
                Container: 
                    effect = u'ZNR.ZD2' (total 7)
                    version = u'1.50' (total 4)
                    installed = 1
                    id = 16777280
                    group = 1
                Container: 
                    effect = u'LMT1176.ZD2' (total 11)
                    version = u'1.50' (total 4)
                    installed = 1
                    id = 25165856
                    group = 1
            group_end = 1
        Container: 

I notice you have different interpretations of the <<< >>> stuff. I treat them as follows:

function processFLSTContent() --[[ So we are looking for blocks of headers then content Zoom uses 3e 3e 3e (<<<) and 3c 3c 3c (>>>) to delimit But each record is 26 bytes ... ascii with string termination? Count 3e3e3e. Begin =>0 .. so nothing find 3e3e3e ++ means 1 ie catalog read catalog header find 3e3e3e ++ means 2 ie FX GROUP read group header find 3c3c3c -> next, so 3e3e3e -- read group ending header -- compare with group starting header ie 2 -> 1, so we back in catalog find 3e3e3e ++ means 2 ie FX GROUP read group header keep reading rows (check there is space for another row)

when back to end catalog
if 00 00 or end of bytes then we at end of catalog

within a record the values are \0 delimited.
12 bytes name \0            = 13 bytes
4 bytes ascii version \0    = 5 bytes
2 bytes FX ID?  \0          = 3 bytes
2 bytes 80|0 GID ... I think first is if installed
                            = 3 bytes
2 bytes empty               = 2 bytes
---
26 bytes

--]]

local ThreeE= 0

local contentSize = g_procZT2_mb:getSize()
--console( g_procZT2_mb:toHexString(1) )
local currentByteLoc = 0
local finished = false
local recordLength = 26
local recordCount = 0
local compareGroupString
local compareFolderString
while ( (finished == false) and (currentByteLoc < (contentSize - recordLength) ) )
do
    recordCount = recordCount + 1
    local currentRecord = g_procZT2_mb:getRange(currentByteLoc, recordLength)
    currentByteLoc = currentByteLoc + recordLength

    local name = currentRecord:getRange(0, 13) -- should be nil terminated
    local version = currentRecord:getRange(13, 5) -- should be nil terminated
    local FXID = currentRecord:getRange(18, 2) -- should be nil terminated. 3
    local GID = currentRecord:getRange(21, 2) -- should be nil terminated. 3

    if (name:getByte(0) == 0x3e 
        and name:getByte(1) == 0x3e 
        and name:getByte(2) == 0x3e 
        and name:getByte(3) == 0x00) then

        ThreeE = ThreeE + 1
        if ThreeE == 1 then
            compareFolderString = currentRecord:getRange(4, 22)
        elseif ThreeE == 2 then
            compareGroupString = currentRecord:getRange(4, 22)
        end
    elseif (name:getByte(0) == 0x3c 
        and name:getByte(1) == 0x3c 
        and name:getByte(2) == 0x3c 
        and name:getByte(3) == 0x00) then
        ThreeE = ThreeE - 1
        if ThreeE == 1 then
            local check = currentRecord:getRange(4, 22)
            same = true
            i = 0
            while ((same == true) and (i < 22))
            do
                same = same and (check:getByte(i) == compareFolderString(i))
                i = i + 1
            end
            if ((same == true) and (i == 22)) then
                console("Folder integrity good")
            else
                console("Folder integrity POOR")
            end
            compareFolderString = currentRecord:getRange(4, 22)
        elseif ThreeE == 2 then
            local check = currentRecord:getRange(4, 22)
            same = true
            i = 0
            while ((same == true) and (i < 22))
            do
                same = same and (check:getByte(i) == compareGroupString(i))
                i = i + 1
            end
            if ((same == true) and (i == 22)) then
                console("Group integrity good")
            else
                console("Group integrity POOR")
            end
            compareGroupString = currentRecord:getRange(4, 22)
        end
    elseif (name:getByte(0) == 0x0 
        and name:getByte(1) == 0x0) -- probably need to check more but cheat for moment
            then
        -- we must be at end of file ...
        if ThreeE ~= 0 then
            console("hmmh ... I expected us to be back to normal!!")
        end
        finished = true
    else
        -- ok record should be good .. print it
        -- L(d:getRange(8,17):toString())
        console( L( name:toString() ) )
        console( L( version:toString() ) )
        console( String( FXID:toHexString(1) ) )
        console( String(  GID:toHexString(1) ) )

    end 
end     
console("Read "..recordCount.." records")

end

And hopefully you can see I treat each Record (I give away my Fortran roots here) identically. I use the name block to differentiate between the records

Well when I did this the data appealed to my Autist brain ...

header container
    group container
        FX container, repeat
    end group
end header

26 bytes in an FX catalog row??
It seems to be null terminated ASCII?

main Header
3e 3e 3e 00 OPEN HEADER
3e 3e 3e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 GID then 21 bytes
< NAME (12 bytes)                 >    <         >     
42 59 50 41 53 53 2e 5a 44 32 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 
(GID is last column)
3c 3c 3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
    OPEN GROUP
GID - this is same ie 22 including 1st byte as GID
3e 3e 3e 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 GROUP FOLDER ID

example
53 4c 57 41 54 4b 2e 5a 44 32 00 00     EFFECT NAME
00 31 2e 34 30 00 00            byte 4 byte version (ascii) byte 00 01 INSTALLED (0=>Guitar Lib additional effects)
30 00 00 01 00 00 00            ID (4Byte LSB->MSB) 3 bytes - so SAME as main header now??
<name                             >    <version  >    <   >    <   > something to do with FX id?
 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
53 4c 57 41 54 4b 2e 5a 44 32 00 00 00 31 2e 34 30 00 01 30 00 00 01 00 00 00 SLTWATK.ZD2
5a 4e 52 2e 5a 44 32 00 00 00 00 00 00 31 2e 34 30 00 01 40 00 00 01 00 00 00 ZNR.ZD2
4f 50 54 43 4f 4d 50 2e 5a 44 32 00 00 31 2e 35 30 00 01 80 00 00 01 00 00 00 OPTCOMP.ZD2
42 4c 41 43 4b 4f 50 54 2e 5a 44 32 00 31 2e 33 30 00 01 10 00 80 01 00 00 00 BLACKOPT.ZD2
4c 4d 54 31 31 37 36 2e 5a 44 32 00 00 31 2e 35 30 00 01 20 00 80 01 00 00 00 LMT1176.ZD2 hmmh what is endian is different? 1 80 00 20 this reverse of 22->19
we cannot get the LMT1176 chosen.
But if I send
"F0 52 00 6E 64 03 00 02 01 20 00 00 18 00 F7"  I get EP Stomp ... not even sure I have this installed?
"F0 52 00 6E 64 03 00 02 01 20 00 00 48 00 F7"  I get Room
run a loop in the background and observe .. holy cow!!!
this gets me the lmt11176!! 0C = 12 ... wtf that come from?
"F0 52 00 6E 64 03 00 02 01 20 00 00 0c 00 F7" -r pants.bin -t1; hexdump -C pants.bin; rm pants.bin

31 36 30 5f 43 4f 4d 50 2e 5a 44 32 00 31 2e 33 30 00 01 30 00 80 01 00 00 00 160_COMP.ZD2  so it looks lik 18 is high 8 is low
44 55 41 4c 5f 43 4d 50 2e 5a 44 32 00 31 2e 33 30 00 01 40 00 80 01 00 00 00 DUAL_CMP.ZD2 
4d 42 5f 43 4f 4d 50 2e 5a 44 32 00 00 31 2e 33 30 00 01 50 00 80 01 00 00 00 
44 43 4f 4d 50 2e 5a 44 32 00 00 00 00 31 2e 33 30 00 01 60 00 80 01 00 00 00 
47 4c 41 4d 43 4f 4d 50 2e 5a 44 32 00 31 2e 32 30 00 01 70 00 80 01 00 00 00 
3c 3c 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 CHECK SAME GROUP
3e 3e 3e 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 GROUP FOLDER ID
53 45 51 46 4c 54 52 2e 5a 44 32 00 00 31 2e 34 30 00 01 40 00 00 02 00 00 00
45 58 43 49 54 45 52 2e 5a 44 32 00 00 31 2e 34 30 00 01 b0 00 00 02 00 00 00
42 5f 41 54 57 41 48 2e 5a 44 32 00 00 31 2e 33 30 00 01 10 00 80 02 00 00 00 
5a 5f 54 52 4f 4e 2e 5a 44 32 00 00 00 31 2e 33 30 00 01 20 00 80 02 00 00 00 
41 5f 46 49 4c 54 45 52 2e 5a 44 32 00 31 2e 33 30 00 01 30 00 80 02 00 00 00 
42 41 5f 43 52 59 2e 5a 44 32 00 00 00 31 2e 33 30 00 01 40 00 80 02 00 00 00 
42 41 5f 47 45 51 31 55 2e 5a 44 32 00 31 2e 31 30 00 01 51 00 80 02 00 00 00 
53 54 42 47 45 51 31 55 2e 5a 44 32 00 31 2e 31 30 00 01 61 00 80 02 00 00 00 
42 41 5f 50 45 51 2e 5a 44 32 00 00 00 31 2e 33 30 00 01 70 00 80 02 00 00 00 
53 50 4c 49 54 54 45 52 2e 5a 44 32 00 31 2e 33 30 00 01 80 00 80 02 00 00 00 
4c 4f 57 5f 45 51 2e 5a 44 32 00 00 00 31 2e 33 30 00 01 90 00 80 02 00 00 00 
48 49 47 48 5f 45 51 2e 5a 44 32 00 00 31 2e 32 30 00 01 95 00 80 02 00 00 00 
45 4e 56 5f 46 4c 54 52 2e 5a 44 32 00 31 2e 32 30 00 01 a0 00 80 02 00 00 00 
3c 3c 3c 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 CHECK
3e 3e 3e 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
45 50 5f 53 54 4f 4d 50 2e 5a 44 32 00 31 2e 34 30 00 01 20 00 00 03 00 00 00 
52 43 42 4f 4f 53 54 2e 5a 44 32 00 00 31 2e 34 30 00 01 30 00 00 03 00 00 00 
4e 59 43 5f 4d 55 46 46 2e 5a 44 32 00 31 2e 33 30 00 01 d0 00 00 03 00 00 00 
53 51 55 45 41 4b 2e 5a 44 32 00 00 00 31 2e 32 30 00 01 30 01 00 03 00 00 00 
42 41 5f 44 52 56 31 55 2e 5a 44 32 00 31 2e 30 30 00 01 11 00 80 03 00 00 00 
44 49 50 4c 55 53 31 55 2e 5a 44 32 00 31 2e 30 30 00 01 21 00 80 03 00 00 00 
44 52 4b 50 52 45 31 55 2e 5a 44 32 00 31 2e 30 30 00 01 31 00 80 03 00 00 00 
42 41 53 53 5f 42 42 2e 5a 44 32 00 00 31 2e 32 30 00 01 40 00 80 03 00 00 00 
44 49 35 2e 5a 44 32 00 00 00 00 00 00 31 2e 32 30 00 01 50 00 80 03 00 00 00 
42 41 5f 50 52 45 2e 5a 44 32 00 00 00 31 2e 32 30 00 01 60 00 80 03 00 00 00 
42 5f 4f 44 2e 5a 44 32 00 00 00 00 00 31 2e 32 30 00 01 70 00 80 03 00 00 00 
42 41 5f 54 53 44 52 56 2e 5a 44 32 00 31 2e 32 30 00 01 80 00 80 03 00 00 00 
44 41 52 4b 5f 4f 44 2e 5a 44 32 00 00 31 2e 32 30 00 01 90 00 80 03 00 00 00 
42 42 42 5f 4f 44 2e 5a 44 32 00 00 00 31 2e 32 30 00 01 a0 00 80 03 00 00 00 
56 4f 4f 44 4f 4f 5f 42 2e 5a 44 32 00 31 2e 32 30 00 01 b0 00 80 03 00 00 00 
42 41 5f 46 5a 53 4d 4c 2e 5a 44 32 00 31 2e 32 30 00 01 c0 00 80 03 00 00 00 
42 41 5f 4d 45 54 41 4c 2e 5a 44 32 00 31 2e 32 30 00 01 d0 00 80 03 00 00 00 
42 41 5f 4f 43 54 46 5a 2e 5a 44 32 00 31 2e 32 30 00 01 e0 00 80 03 00 00 00 
3c 3c 3c 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
3e 3e 3e 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
53 56 54 5f 31 55 2e 5a 44 32 00 00 00 31 2e 30 30 00 01 11 00 80 04 00 00 00 
42 4d 4e 31 30 30 31 55 2e 5a 44 32 00 31 2e 30 30 00 01 21 00 80 04 00 00 00 
53 57 52 34 30 30 31 55 2e 5a 44 32 00 31 2e 30 30 00 01 31 00 80 04 00 00 00 
41 47 37 35 30 5f 31 55 2e 5a 44 32 00 31 2e 30 30 00 01 41 00 80 04 00 00 00 
54 45 34 30 30 5f 31 55 2e 5a 44 32 00 31 2e 30 30 00 01 51 00 80 04 00 00 00 
41 43 33 37 30 5f 31 55 2e 5a 44 32 00 31 2e 30 30 00 01 61 00 80 04 00 00 00 
4d 49 4e 49 4d 41 52 4b 2e 5a 44 32 00 31 2e 32 30 00 01 70 00 80 04 00 00 00 
45 42 48 33 36 30 31 55 2e 5a 44 32 00 31 2e 30 30 00 01 81 00 80 04 00 00 00 
42 31 35 4e 5f 31 55 2e 5a 44 32 00 00 31 2e 30 30 00 01 91 00 80 04 00 00 00 
3c 3c 3c 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
3e 3e 3e 00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
53 56 54 5f 38 58 31 30 2e 5a 44 32 00 31 2e 32 30 00 01 10 00 80 05 00 00 00 
53 56 34 58 31 30 54 57 2e 5a 44 32 00 31 2e 31 30 00 01 18 00 80 05 00 00 00 
46 44 5f 42 34 58 31 32 2e 5a 44 32 00 31 2e 32 30 00 01 20 00 80 05 00 00 00 
53 57 52 5f 34 58 31 30 2e 5a 44 32 00 31 2e 32 30 00 01 30 00 80 05 00 00 00 
41 47 34 58 31 30 54 57 2e 5a 44 32 00 31 2e 32 30 00 01 40 00 80 05 00 00 00 
54 45 5f 34 58 31 30 2e 5a 44 32 00 00 31 2e 32 30 00 01 50 00 80 05 00 00 00 
41 43 5f 31 58 31 38 2e 5a 44 32 00 00 31 2e 32 30 00 01 60 00 80 05 00 00 00 
4d 4b 42 32 58 38 54 57 2e 5a 44 32 00 31 2e 32 30 00 01 70 00 80 05 00 00 00 
45 42 34 58 31 30 54 57 2e 5a 44 32 00 31 2e 31 30 00 01 80 00 80 05 00 00 00 
41 4d 31 58 31 35 2e 5a 44 32 00 00 00 31 2e 31 30 00 01 90 00 80 05 00 00 00 
3c 3c 3c 00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
3e 3e 3e 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
54 52 45 4d 4f 4c 4f 2e 5a 44 32 00 00 31 2e 34 30 00 01 10 00 00 06 00 00 00 
50 48 41 53 45 52 2e 5a 44 32 00 00 00 31 2e 34 30 00 01 40 00 00 06 00 00 00 
54 48 45 56 49 42 45 2e 5a 44 32 00 00 31 2e 34 30 00 01 60 00 00 06 00 00 00 
50 49 54 43 48 53 48 46 2e 5a 44 32 00 31 2e 34 30 00 01 b0 00 00 06 00 00 00 
48 50 53 2e 5a 44 32 00 00 00 00 00 00 31 2e 34 30 00 01 d0 00 00 06 00 00 00 
43 4c 4f 4e 45 43 48 4f 2e 5a 44 32 00 31 2e 33 30 00 01 00 01 00 06 00 00 00 
53 55 50 45 52 43 48 4f 2e 5a 44 32 00 31 2e 36 30 00 01 10 01 00 06 00 00 00 
43 52 4e 54 52 49 33 53 2e 5a 44 32 00 31 2e 31 30 00 01 31 01 00 06 00 00 00 can send 48 not 49 
42 5f 53 54 5f 43 48 4f 2e 5a 44 32 00 31 2e 33 30 00 01 20 00 80 06 00 00 00 32 dont work. 
42 5f 56 46 4c 4e 47 2e 5a 44 32 00 00 31 2e 33 30 00 01 40 00 80 06 00 00 00 
42 5f 4f 43 54 41 56 45 2e 5a 44 32 00 31 2e 33 30 00 01 50 00 80 06 00 00 00 
42 5f 44 45 54 55 4e 45 2e 5a 44 32 00 31 2e 33 30 00 01 60 00 80 06 00 00 00 
42 5f 50 49 54 43 48 2e 5a 44 32 00 00 31 2e 33 30 00 01 70 00 80 06 00 00 00 
42 41 53 53 5f 50 48 41 2e 5a 44 32 00 31 2e 33 30 00 01 80 00 80 06 00 00 00 
3c 3c 3c 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
3e 3e 3e 00 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
42 4f 4d 42 45 52 2e 5a 44 32 00 00 00 31 2e 34 30 00 01 10 00 00 07 00 00 00 
4c 50 52 4f 4c 4c 33 53 2e 5a 44 32 00 31 2e 31 30 00 01 41 00 00 07 00 00 00 
53 54 44 53 59 4e 2e 5a 44 32 00 00 00 31 2e 33 30 00 01 10 00 80 07 00 00 00 
53 59 4e 54 4c 4b 2e 5a 44 32 00 00 00 31 2e 33 30 00 01 20 00 80 07 00 00 00 
5a 5f 53 59 4e 5f 31 55 2e 5a 44 32 00 31 2e 31 30 00 01 31 00 80 07 00 00 00 
44 45 46 52 45 54 2e 5a 44 32 00 00 00 31 2e 33 30 00 01 40 00 80 07 00 00 00 
50 48 5f 44 49 53 54 2e 5a 44 32 00 00 31 2e 33 30 00 01 50 00 80 07 00 00 00 
3c 3c 3c 00 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
3e 3e 3e 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
44 45 4c 41 59 5f 33 53 2e 5a 44 32 00 31 2e 31 30 00 01 11 00 00 08 00 00 00 
41 4e 44 4c 59 5f 33 53 2e 5a 44 32 00 31 2e 31 30 00 01 21 00 00 08 00 00 00 
54 41 50 45 45 43 48 4f 2e 5a 44 32 00 31 2e 34 30 00 01 30 00 00 08 00 00 00 
52 56 52 53 44 4c 33 53 2e 5a 44 32 00 31 2e 30 30 00 00 41 00 00 08 00 00 00 
4d 4f 44 44 45 4c 41 59 2e 5a 44 32 00 31 2e 32 30 00 00 50 00 00 08 00 00 00 
44 55 41 4c 44 4c 33 53 2e 5a 44 32 00 31 2e 30 30 00 00 a1 00 00 08 00 00 00 
3c 3c 3c 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
3e 3e 3e 00 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
41 49 52 2e 5a 44 32 00 00 00 00 00 00 31 2e 34 30 00 01 10 00 00 09 00 00 00 
52 4f 4f 4d 2e 5a 44 32 00 00 00 00 00 31 2e 34 30 00 01 20 00 00 09 00 00 00 
48 41 4c 4c 2e 5a 44 32 00 00 00 00 00 31 2e 34 30 00 01 30 00 00 09 00 00 00 
48 44 5f 48 41 4c 4c 2e 5a 44 32 00 00 31 2e 34 30 00 01 40 00 00 09 00 00 00 
53 50 52 49 4e 47 2e 5a 44 32 00 00 00 31 2e 34 30 00 01 50 00 00 09 00 00 00 
50 4c 41 54 45 52 45 56 2e 5a 44 32 00 31 2e 34 30 00 01 70 00 00 09 00 00 00 
3c 3c 3c 00 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
3e 3e 3e 00 0b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
50 44 4c 5f 56 4f 4c 2e 5a 44 32 00 00 31 2e 34 30 00 01 10 00 00 0b 00 00 00 
42 41 53 53 57 41 48 2e 5a 44 32 00 00 31 2e 34 30 00 01 10 00 80 0b 00 00 00 
50 44 4c 5f 52 45 53 4f 2e 5a 44 32 00 31 2e 35 30 00 01 20 00 80 0b 00 00 00 
42 5f 50 44 4c 50 49 54 2e 5a 44 32 00 31 2e 33 30 00 01 30 00 80 0b 00 00 00 
42 5f 50 44 4c 4d 4e 50 2e 5a 44 32 00 31 2e 33 30 00 01 40 00 80 0b 00 00 00 
4f 55 54 5f 56 50 2e 5a 44 32 00 00 00 31 2e 32 30 00 01 f0 ff ff 0b 00 00 00 
3c 3c 3c 00 0b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

So instead of the rather unwieldy hex strings you get for group ID, I get a simpler form. We definitely get to the same result but for different reasons.


BYPASS.ZD2

01 00
00 00
SLWATK.ZD2
1.40
01 30
00 01  48 1
ZNR.ZD2
1.40
01 40
00 01  64 1
OPTCOMP.ZD2
1.50
01 80
00 01  128 1
BLACKOPT.ZD2
1.30
01 10  16 1 dont work. Notice we ahve 80. What do do?
80 01

81 x 8 ??
LMT1176.ZD2
1.50
01 20
80 01
AHH these are 8 bit because converts from 8 midi byte to 7
And it is an endianess?
so 80 01 is really 180(h)
for some reason we right shift 5 to get the GID/

So 180(h) >>5 = 0c
   100(h) >>5 = 08
160_COMP.ZD2
1.30
01 30
80 01
DUAL_CMP.ZD2

Bloody big v little endian -- I missed out 16 bit and jumped to 32 -- always liked Motorola better than IBM.
So I was biased and looking at the data the wrong way.
But now I cannot unsee it -- ASCII and big endian?
shooking commented 3 years ago

So I recoded to swap bytes

BYPASS.ZD2

FXID: 00 int: 0
GID: 0000 int: 0
SLWATK.ZD2
1.40
FXID: 30 int: 48
GID: 0001 int: 256
ZNR.ZD2
1.40
FXID: 40 int: 64
GID: 0001 int: 256
OPTCOMP.ZD2
1.50
FXID: 80 int: 128
GID: 0001 int: 256
BLACKOPT.ZD2
1.30
FXID: 10 int: 16
GID: 8001 int: 384
LMT1176.ZD2
1.50
FXID: 20 int: 32
GID: 8001 int: 384
160_COMP.ZD2
1.30
FXID: 30 int: 48
GID: 8001 int: 384
DUAL_CMP.ZD2
1.30
FXID: 40 int: 64
GID: 8001 int: 384
MB_COMP.ZD2
1.30
FXID: 50 int: 80
GID: 8001 int: 384
DCOMP.ZD2
1.30
FXID: 60 int: 96
GID: 8001 int: 384
GLAMCOMP.ZD2
1.20
FXID: 70 int: 112
GID: 8001 int: 384
SEQFLTR.ZD2
1.40
FXID: 40 int: 64
GID: 0002 int: 512

So now I can do things like

pi@raspberrypi:~/Software/ZoomPedal $ ./FXM_ID.sh 1 32 640

pi@raspberrypi:~/Software/ZoomPedal $ ./FX_M1_M2_Values.sh 1

|Z Tron........ 7|

pi@raspberrypi:~/Software/ZoomPedal $ ./FXM_PN.sh 1 1 0

pi@raspberrypi:~/Software/ZoomPedal $ ./FX_M1_M2_Values.sh 1

....Z Tron........-10...........|
pi@raspberrypi:~/Software/ZoomPedal $ ./FXM_PN.sh 1 1 1024
pi@raspberrypi:~/Software/ZoomPedal $ ./FX_M1_M2_Values.sh 1
pi@raspberrypi:~/Software/ZoomPedal $ ./GetMoreData.sh  # flush the buffer
pi@raspberrypi:~/Software/ZoomPedal $ ./FX_M1_M2_Values.sh 1
|....Z Tron........10............|

So by introspection we can see the 1st param of patch Z Tron midi [0, 1024] -> [-10, 10] so likely [0, 21] -> [-10, 10]

and repeating similar shows this to be the case.

Nice. I feel some Ctrlr panel comlng along.