mungewell / zoom-zt2

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

Decoding B2-Four presets #67

Open mungewell opened 11 months ago

mungewell commented 11 months ago

From #64 we have a download of a preset, which shows that the format is slightly different. The preset includes a PRM2 (instead of PPRM) block and a NAME block.

Changes pushed for decode_preset.py so they can be parsed, but the output doesn't make sense. Volume of '0' is probably wrong. ;-)

    PPRM = Container: 
        length = 32
        autorev = b'B\x0c\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00' (total 12)
        reversed = Container: 
            control = Container: 
                punknown = 2164288
                editslot = 0
                volume = 0
                pad = 0
            unknown = b'\x00\x00\x00\x00\x00\x00\x00' (total 7)

For reference the unpacked patch is

00000000: 50 54 43 46 BC 01 00 00  02 00 00 00 06 00 00 00  PTCF............
00000010: 00 00 01 00 00 00 00 00  00 00 44 61 6D 6E 54 69  ..........DamnTi
00000020: 6D 65 32 30 80 00 00 02  60 00 00 04 20 00 00 05  me20....`... ...
00000030: 00 00 00 00 00 00 00 00  10 00 00 1C 54 58 4A 31  ............TXJ1
00000040: 54 00 00 00 32 30 94 4E  91 E3 8F 89 8A FA 83 5F  T...20.N......._
00000050: 83 93 83 58 81 45 83 7E  83 85 81 5B 83 57 83 62  ...X.E.~...[.W.b
00000060: 83 4E 82 CC 83 74 83 42  83 93 83 4B 81 5B 83 73  .N...t.B...K.[.s
00000070: 83 62 83 4C 83 93 83 4F  82 C9 93 4B 82 B5 82 BD  .b.L...O...K....
00000080: 83 4E 83 8A 81 5B 83 93  83 54 83 45 83 93 83 68  .N...[...T.E...h
00000090: 82 C5 82 B7 81 42 00 00  54 58 45 31 44 00 00 00  .....B..TXE1D...
000000A0: 43 6C 65 61 6E 20 73 6F  75 6E 64 20 73 75 69 74  Clean sound suit
000000B0: 61 62 6C 65 20 66 6F 72  20 66 69 6E 67 65 72 70  able for fingerp
000000C0: 69 63 6B 69 6E 67 20 69  6E 20 65 61 72 6C 79 20  icking in early 
000000D0: 32 30 27 73 20 64 61 6E  63 65 20 6D 75 73 69 63  20's dance music
000000E0: 2E 00 00 00 45 44 54 42  90 00 00 00 01 01 00 84  ....EDTB........
000000F0: 04 60 00 06 60 00 06 60  60 40 01 00 00 00 00 00  .`..`..``@......
00000100: 00 00 00 00 C1 00 00 C8  08 C8 00 00 64 40 10 50  ............d@.P
00000110: 04 5D 01 00 00 00 00 00  00 00 00 00 41 00 00 0A  .]..........A...
00000120: 09 4C 00 0C F0 80 07 08  50 90 09 00 00 00 00 00  .L......P.......
00000130: 00 00 00 00 01 00 00 00  00 00 00 00 00 00 00 00  ................
00000140: 00 00 00 00 00 00 00 00  00 00 00 00 01 00 00 00  ................
00000150: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000160: 00 00 00 00 21 00 00 38  00 00 00 00 00 00 00 00  ....!..8........
00000170: 00 00 00 00 00 00 00 00  00 00 00 00 50 52 4D 32  ............PRM2
00000180: 20 00 00 00 00 00 00 00  00 00 00 00 00 80 0C 42   ..............B
00000190: 86 00 00 00 00 00 00 00  08 00 02 00 00 00 00 00  ................
000001A0: 00 00 D0 06 4E 41 4D 45  10 00 00 00 44 61 6D 6E  ....NAME....Damn
000001B0: 54 69 6D 65 32 30 32 32  20 20 00 00 00 00 00 00  Time2022  ......
000001C0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000001D0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000001E0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000001F0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000200: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000210: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000220: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000230: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000240: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000250: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000260: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000270: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000280: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000290: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000002A0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000002B0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000002C0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000002D0: 00 00 00 00 00 00 00 00                           ........
None
mungewell commented 11 months ago

00_DamnTime

mungewell commented 11 months ago
    name = u'DamnTime20' (total 10)
    ids = ListContainer: 
        33554560 => 0x02000080
        67108960 => 0x04000060
        83886112 => 0x05000020
        0
        0
        469762064 => 0x1C000010
shooking commented 11 months ago

So are those the IDs of the FX per slot?

mungewell commented 11 months ago

Yes, full decode here... patch_64.dump.txt

nomadbyte commented 11 months ago

There is a new section NAME which stores a "long name". You may want to extract that too.

mungewell commented 10 months ago

I did the NAME section. I guess it will take a dedicated person with a pedal to try to figure out the bits which are used in the PRM2 block.