mungewell / zoom-zt2

Python script to install/remove effects from the Zoom G1Four pedal
MIT License
62 stars 11 forks source link

'F0 52 00 6e 64 xx' commands #17

Open mungewell opened 3 years ago

mungewell commented 3 years ago

As @shooking discovered there is a command which will cycle through available effects and report via midi.

$ amidi -p hw:1,0,0 -S 'F0 52 00 6e 64 05 F7' -r temp.bin -t 1 ; hexdump -C temp.bin | head

93 bytes read
00000000  f0 52 00 6e 64 06 47 4f  4c 44 5f 44 52 56 2e 5a  |.R.nd.GOLD_DRV.Z|
00000010  44 32 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |D2..............|
00000020  00 00 00 00 06 01 00 00  00 00 00 00 00 00 00 00  |................|
00000030  64 00 45 00 00 00 10 00  00 00 00 64 00 32 00 00  |d.E........d.2..|
00000040  00 00 00 00 00 00 64 00  38 00 00 00 00 00 00 00  |......d.8.......|
00000050  00 64 00 2b 00 00 00 16  00 00 00 00 f7           |.d.+.........|
0000005d

This command is VERY sensitive to how it is run. it MUST be run whilst the pedal has a completely empty patch, if not the pedal will crash and/or reboot.

Interestingly the screen (yay fixed it) will show the graphic for each effect in turn on the 'slot 0' position, but under the parameters page it shows a solid bar across the area were we would see that parameter values. If the contents of the screen is scraped, it only reports a bypass effect.

$ amidi -p hw:1,0,0 -S 'F0 52 00 6e 64 02 00 01 00 F7' -r temp.bin -t 1 ; python3 decode_screens.py temp.bin

343 bytes read
---
Effect: Bypass (Off)
Gain : 0
Tone : 0
Focus : 0
VOL : 0
---
Effect: Bypass (Off)
 : 
 : 
 : 
 :
mungewell commented 3 years ago

There are 2 more '0x64' commands which cause a response on MIDI.

$ amidi -p hw:1,0,0 -S 'F0 52 00 6e 64 04 F7' -r temp.bin -t 1 ; hexdump -C temp.bin | head

7 bytes read
00000000  f0 52 00 6e 00 0d f7                              |.R.n...|
00000007
$ amidi -p hw:1,0,0 -S 'F0 52 00 6e 64 0a F7' -r temp.bin -t 1 ; hexdump -C temp.bin | head

15 bytes read
00000000  f0 52 00 6e 64 09 3f 00  00 00 05 00 00 00 f7     |.R.nd.?........|
0000000f
shooking commented 3 years ago

As @shooking discovered there is a command which will cycle through available effects and report via midi.

$ amidi -p hw:1,0,0 -S 'F0 52 00 6e 64 05 F7' -r temp.bin -t 1 ; hexdump -C temp.bin | head

93 bytes read
00000000  f0 52 00 6e 64 06 47 4f  4c 44 5f 44 52 56 2e 5a  |.R.nd.GOLD_DRV.Z|
00000010  44 32 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |D2..............|
00000020  00 00 00 00 06 01 00 00  00 00 00 00 00 00 00 00  |................|
00000030  64 00 45 00 00 00 10 00  00 00 00 64 00 32 00 00  |d.E........d.2..|
00000040  00 00 00 00 00 00 64 00  38 00 00 00 00 00 00 00  |......d.8.......|
00000050  00 64 00 2b 00 00 00 16  00 00 00 00 f7           |.d.+.........|
0000005d

This command is VERY sensitive to how it is run. it MUST be run whilst the pedal has a completely empty patch, if not the pedal will crash and/or reboot.

Interestingly the screen (yay fixed it) will show the graphic for each effect in turn on the 'slot 0' position, but under the parameters page it shows a solid bar across the area were we would see that parameter values. If the contents of the screen is scraped, it only reports a bypass effect.

$ amidi -p hw:1,0,0 -S 'F0 52 00 6e 64 02 00 01 00 F7' -r temp.bin -t 1 ; python3 decode_screens.py temp.bin

343 bytes read
---
Effect: Bypass (Off)
Gain : 0
Tone : 0
Focus : 0
VOL : 0
---
Effect: Bypass (Off)
 : 
 : 
 : 
 :

So your Pedal LCD screen has come back to life??? Awesome news. Hoping you didnt just have contrast at 0 :-( You code is so neat (and beyond my Python skills) that I was having an Autist moment ... but the screens code looks so perfect? Ah the physical screen.

Notice one can use the delete effect to remove the effect, but the cycle carrys on from "last position". I was wondering IF I delete an FX from the pedal, does that crash the cycle. If I enable FX it still has the initial part in "bypass" mode - that's why I was hoping there is some IDs in the returned value - because if one can use this to get list of available FX on pedal then use your "write FX ID group ID to slot M" that might allow the patch to respond properly? I guess I should open another "issue" regarding what is the relationship between info coming from this probe v ZT2 content.

Glad to hear LCD is working.

shooking commented 3 years ago

actually it just need slot 1 to be empty. I revisited command again. I can have patch 56 with COMP on FX2, but FX1 blank. The iterator will make this 1st FX cycle thru available FX's on the pedal. Example ` pi@raspberrypi:~/Software/ZoomPedal $ ./FXM_Delete.sh 1 F0 52 00 6E 64 03 00 00 01 00 00 00 00 00 F7

0 bytes read pi@raspberrypi:~/Software/ZoomPedal $ ./CycleFXSlot1.sh F0 52 00 6E 64 05 F7

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 pi@raspberrypi:~/Software/ZoomPedal $ ./CycleFXSlot1.sh F0 52 00 6E 64 05 F7

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 |................| ^[[A00000020 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 pi@raspberrypi:~/Software/ZoomPedal $ ./CycleFXSlot1.sh F0 52 00 6E 64 05 F7

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 `

So it never seems to update the "Bypass" initial setting.

` pi@raspberrypi:~/Software/ZoomPedal $ ./FX_M1_M2_Values.sh 1 9 F0 52 00 6E 64 02 00 08 00 F7

1023 bytes read 00000000 f0 52 00 6e 64 01 00 00 00 00 30 00 00 00 00 00 |.R.nd.....0.....| 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 42 79 70 61 73 73 00 00 00 00 |......Bypass....| 00000030 00 01 01 00 42 79 70 61 73 73 00 00 00 00 00 02 |....Bypass......| 00000040 00 00 20 20 32 30 20 00 00 00 00 00 00 02 01 00 |.. 20 .........| 00000050 46 52 45 51 00 00 00 00 00 00 00 03 00 00 20 30 |FREQ.......... 0| 00000060 2e 35 20 00 00 00 00 00 00 03 01 00 51 00 00 00 |.5 .........Q...| 00000070 00 00 00 00 00 00 00 04 00 00 2d 31 32 2e 30 00 |..........-12.0.| 00000080 00 00 00 00 00 04 01 00 47 61 69 6e 00 00 00 00 |........Gain....| 00000090 00 00 00 05 00 00 30 00 00 00 00 00 00 00 00 00 |......0.........| 000000a0 00 05 01 00 56 4f 4c 00 00 00 00 00 00 00 01 00 |....VOL.........| 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 68 |OnOff.........Ph| 000000d0 61 73 65 72 00 00 00 00 01 01 01 00 50 68 61 73 |aser........Phas| 000000e0 65 72 00 00 00 00 01 02 00 00 49 4e 56 20 34 00 |er........INV 4.| 000000f0 00 00 00 00 01 02 01 00 43 6f 6c 6f 72 00 00 00 |........Color...| 00000100 00 00 01 03 00 00 36 38 00 00 00 00 00 00 00 00 |......68........| 00000110 01 03 01 00 44 65 70 74 68 00 00 00 00 00 01 04 |....Depth.......| 00000120 00 00 38 00 00 00 00 00 00 00 00 00 01 04 01 00 |..8.............| 00000130 52 61 74 65 00 00 00 00 00 00 01 05 00 00 32 30 |Rate..........20| 00000140 00 00 00 00 00 00 00 00 01 05 01 00 52 45 53 4f |............RESO| 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 4d 53 20 38 30 30 00 00 00 00 |......MS 800....| 00000180 02 01 01 00 4d 53 20 38 30 30 00 00 00 00 02 02 |....MS 800......| 00000190 00 00 48 49 00 00 00 00 00 00 00 00 02 02 01 00 |..HI............| 000001a0 49 6e 70 75 74 00 00 00 00 00 02 03 00 00 34 30 |Input.........40| 000001b0 00 00 00 00 00 00 00 00 02 03 01 00 42 61 73 73 |............Bass| 000001c0 00 00 00 00 00 00 02 04 00 00 32 37 00 00 00 00 |..........27....| 000001d0 00 00 00 00 02 04 01 00 4d 49 44 00 00 00 00 00 |........MID.....| 000001e0 00 00 02 05 00 00 37 31 00 00 00 00 00 00 00 00 |......71........| 000001f0 02 05 01 00 54 72 65 62 6c 65 00 00 00 00 03 00 |....Treble......| 00000200 00 00 30 00 00 00 00 00 00 00 00 00 03 00 01 00 |..0.............| 00000210 44 75 6d 6d 79 00 00 00 00 00 03 01 00 00 4d 53 |Dummy.........MS| 00000220 20 38 30 30 00 00 00 00 03 01 01 00 4d 53 20 38 | 800........MS 8| 00000230 30 30 00 00 00 00 03 02 00 00 38 38 00 00 00 00 |00........88....| 00000240 00 00 00 00 03 02 01 00 50 52 53 4e 43 00 00 00 |........PRSNC...| 00000250 00 00 03 03 00 00 37 35 00 00 00 00 00 00 00 00 |......75........| 00000260 03 03 01 00 47 61 69 6e 00 00 00 00 00 00 03 04 |....Gain........| 00000270 00 00 31 30 30 00 00 00 00 00 00 00 03 04 01 00 |..100...........| 00000280 56 4f 4c 00 00 00 00 00 00 00 03 05 00 00 33 00 |VOL...........3.| 00000290 00 00 00 00 00 00 00 00 03 05 07 00 44 75 6d 6d |............Dumm| 000002a0 79 00 00 00 00 00 04 00 00 00 31 00 00 00 00 00 |y.........1.....| 000002b0 00 00 00 00 04 00 01 00 4f 6e 4f 66 66 00 00 00 |........OnOff...| 000002c0 00 00 04 01 00 00 4d 53 34 78 31 32 00 00 00 00 |......MS4x12....| 000002d0 04 01 01 00 4d 53 34 78 31 32 00 00 00 00 04 02 |....MS4x12......| 000002e0 00 00 4f 46 46 00 00 00 00 00 00 00 04 02 01 00 |..OFF...........| 000002f0 4d 49 43 00 00 00 00 00 00 00 04 03 00 00 37 34 |MIC...........74| 00000300 00 00 00 00 00 00 00 00 04 03 01 00 44 35 37 3a |............D57:| 00000310 44 34 32 31 00 00 04 04 00 00 34 37 00 00 00 00 |D421......47....| 00000320 00 00 00 00 04 04 01 00 48 69 00 00 00 00 00 00 |........Hi......| 00000330 00 00 04 05 00 00 35 30 00 00 00 00 00 00 00 00 |......50........| 00000340 04 05 01 00 4c 6f 00 00 00 00 00 00 00 00 05 00 |....Lo..........| 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 50 44 |OnOff.........PD| 00000370 4c 20 52 65 76 00 00 00 05 01 01 00 50 44 4c 20 |L Rev.......PDL | 00000380 52 65 76 00 00 00 05 02 00 00 31 30 30 00 00 00 |Rev.......100...| 00000390 00 00 00 00 05 02 09 00 49 6e 4c 76 6c 00 00 00 |........InLvl...| 000003a0 00 00 05 03 00 00 36 32 00 00 00 00 00 00 00 00 |......62........| 000003b0 05 03 01 00 50 72 65 44 00 00 00 00 00 00 05 04 |....PreD........| 000003c0 00 00 32 32 00 00 00 00 00 00 00 00 05 04 01 00 |..22............| 000003d0 44 65 63 61 79 00 00 00 00 00 05 05 00 00 32 38 |Decay.........28| 000003e0 00 00 00 00 00 00 00 00 05 05 01 00 4d 69 78 00 |............Mix.| 000003f0 00 00 00 00 00 00 06 00 00 00 30 00 00 00 00 |..........0....| 000003ff `

shooking commented 3 years ago

I revisited this topic. It should be run in PCMode!!! Then it appears ok

ok so it seems this 60 29 is used before. It seems to be some get iterator? then we send a start get next until we get back "end" signal

so 60 09 60 29 setup iterator get date 64 04 to start 64 05 in a loop until we get 64 07

Ie towards end looks like

93 bytes read 00000000 f0 52 00 6e 64 06 50 44 4c 5f 52 45 56 2e 5a 44 |.R.nd.PDL_REV.ZD| 00000010 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |2...............| 00000020 00 00 00 00 06 01 00 00 00 00 00 00 00 00 00 00 |................| 00000030 64 00 64 00 00 00 50 00 00 00 00 63 00 30 00 00 |d.d...P....c.0..| 00000040 00 00 00 00 00 00 1d 00 0e 00 00 00 10 00 00 00 |................| 00000050 00 64 00 50 00 00 00 16 00 00 00 00 f7 |.d.P.........| 0000005d pi@raspberrypi:~/Software/ZoomPedal $ ./CycleFXSlot1.sh F0 52 00 6E 64 05 F7

49 bytes read 00000000 f0 52 00 6e 64 06 4f 55 54 5f 56 50 2e 5a 44 32 |.R.nd.OUT_VP.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 pi@raspberrypi:~/Software/ZoomPedal $ ./CycleFXSlot1.sh F0 52 00 6E 64 05 F7

7 bytes read 00000000 f0 52 00 6e 64 07 f7 |.R.nd..| 00000007

so we know we are at the end!!

MORE DETAILS

F0 52 00 6E 60 09 F7 GetMoreData.sh F0 52 00 6E 60 29 F7 < < F0 52 00 6E 60 04 29 00 00 08 00 4E 3C 3C 01 00 6E 5F 00 00 00 00 00 00 00 00 F7 GetMoreData.sh ReceivedNothingBack F0 52 00 6E 64 04 F7 F0 52 00 6E 00 00 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7

F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7

F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7

F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7

F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7

F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7

F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 <<- cycle F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7

F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7

F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 F0 52 00 6E 64 05 F7 87?? 57 hex F0 52 00 6E 64 07 F7 <<- end of the cycle!!! F0 52 00 6E 64 0A F7 F0 52 00 6E 64 09 3C 00 01 00 05 00 00 01 F7 CurrentBankNumber.sh F0 52 00 6E 33 F7 FXInfo ... not sure what 13 is ... F0 52 00 6E 64 13 F7 F0 52 00 6E 00 00 F7 F0 52 00 6E 57 F7 F0 52 00 6E 00 00 F7 PCModeOff.sh F0 52 00 6E 53 F7 F0 52 00 6E 64 13 F7