mungewell / zoom-zt2

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

Is A1XFour ID yielding consistent results #33

Closed shooking closed 2 years ago

shooking commented 2 years ago

Hi Mungewell.

QUESTION:

In your ZPTCF decode you print IDs are 32 bits, but in the reverse format only 28. What is your opinion on the correct reference please? NOTE: I only noticed the difference because A1X patches are first to manifest the difference. I included a zip of tar file containing all the patches from an A1XFour incase you want to take a deeper look.

BACKGROUND A1XPatches.zip

I noticed an inconsistency with the A1XFour - likely my mistake but can you help me check my bug please? I pulled today to be sure it isnt my older variant.

pi@raspberrypi:~/Software/laterzoom-zt2/zoom-zt2 $ python3 decode_preset.py ../../ZoomPedalFun/python/mypedal/patch_11 -d
Container: 
    fx_count = 5
    name = u'AG J-45   ' (total 10)
    ids = ListContainer: 
        339738784
        16777248
        37748800
        150994992
        184549392
    TXJ1 = Container: 
        length = 60
    TXE1 = Container: 
        length = 68
        name = u'This Gibson J-45 sound has a dry'... (truncated, total 67)
    EDTB = Container: 
        length = 120
        effects = ListContainer: 
            Container: 
                autorev = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc8'... (truncated, total 24)
                reversed = Container: 
                    control = Container: 
                        param8 = 0
                        param7 = 0
                        param6 = 0
                        param5 = 0
                        param4 = 50
                        param3 = 50
                        param2 = 50
                        param1 = 24
                        unknown = 1
                        id = 71303328
                        enabled = True
            Container: 
                autorev = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc8'... (truncated, total 24)
                reversed = Container: 
                    control = Container: 
                        param8 = 0
                        param7 = 0
                        param6 = 0
                        param5 = 0
                        param4 = 50
                        param3 = 4
                        param2 = 1
                        param1 = 9
                        unknown = 0
                        id = 16777248
                        enabled = True

Notice

ids = ListContainer: 
        339738784

But later

                        unknown = 1
                        id = 71303328
                        enabled = True

I was using the reversed IDs to find the FXID/GID from patch decode. I hit an error

INFO:root:Packet length 869
INFO:root:Patch: AG J-45   
INFO:root:Desc: This Gibson J-45 sound has a dry tone that is ideal for strumming.

INFO:root:  enabled: True
INFO:root:  FXID=160, GID=34
INFO:root:Exception looking up FXID: 160 34 AG J-45    71303328 0x44000a0

So it seems to me the ID should be 0x144000A0. Now I do see you decode this as 28 bits rather than 32. Maybe that's my mistake - thinking the ID is 32bits? So I get a top 4 bits?

Except you print the IDs initially as 32 bits - so that's what's confusing me. Nightly pull gives same answer as an older pull. I looks like the A series pedals are the first time I have encountered the additional higher bits.

shooking commented 2 years ago

Ok so I the 28 bit works nicely - do you think it makes sense to set the IDs also with 28 bit mask? I LOVE what you did with Construct to pull out the Bitmaps ... my version is so lame in comparison. I need to merge your latest code into my hacked version.

What I do is use your program (older fork) to pull out the ZT2. From this I get the set of ZD2's and their IDs (note I was interpreting them as 32 bit). The ZD2s get me the description, parameters (including max value) and their descriptions. I also determine, from parameters and name, if FX is 1 or 2 slot. Then I pull in the set of patches, and try to marry the FX ((this was the part that went awry on A1XFOUR - the previous pedals were not seemingly using the top 4 bits). Then I read and parse these lists into a TkInter program to allow display of the given patch and allow FX to be changed. Of course I need to take care of this 1 v 2 slot.

The A1X was different to its friends.

If you can give me a 2nd opinion on whether 28 or 32 bit is ID format I can modify my code either way and close this "issue" - it is more clarification. Wouldnt it be so much easier if Zoom just published the Sysex. I notice Boss pedals publish there's.

shooking commented 2 years ago

Ok so if I look at this FX say

      FX: {
            name: "HumBird",
            description: "Body characteristics of a Gibson Hummingbird, which is loved by pop
 and rock artists.",
            version: "1.00",
            fxid: 208,
            gid: 34,
            group: 20,
            groupname: "AG_MODEL",
            numParams: 4,
            numSlots: 1,
            filename: "MDL_HB.ZD2.BMP",
      },

I can see from AllZDL7.txt is ought to have type 0x144000F0.

And closer inspection ALL the MDL FX has their full 32bit compared with typical 28 bit. However, using the 28 bit version as a mask generates consistent FXID, GID for sysex control. Odd.

mungewell commented 2 years ago

When using decode_preset.py you might want to use the '-s' ('--summary') option instead, it's a little nicer on the eyes.

The first array of 'ids' is ready and displayed as 32bit. The 'id' within EBDT block is only allocated 28bits... There's no doubt some history in how Zoom's FW has developed over time.