zoom-zt2
zoom-zt2 copied to clipboard
Alternate way of reading configuration
@shooking seems to have discovered a different way to read the configurations... which is more 'text' based.
$ amidi -p hw:2,0,0 -S 'F0 52 00 6e 64 02 00 00 00 F7' -r temp.bin -t 2 ; hexdump -C temp.bin
175 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 47 6f 6c 64 44 72 69 76 65 00 |......GoldDrive.|
00000030 00 01 01 00 47 6f 6c 64 44 72 69 76 65 00 00 02 |....GoldDrive...|
00000040 00 00 31 35 00 00 00 00 00 00 00 00 00 02 01 00 |..15............|
00000050 47 61 69 6e 00 00 00 00 00 00 00 03 00 00 35 30 |Gain..........50|
00000060 00 00 00 00 00 00 00 00 00 03 01 00 42 61 73 73 |............Bass|
00000070 00 00 00 00 00 00 00 04 00 00 35 33 00 00 00 00 |..........53....|
00000080 00 00 00 00 00 04 01 00 54 72 65 62 6c 65 00 00 |........Treble..|
00000090 00 00 00 05 00 00 36 30 00 00 00 00 00 00 00 00 |......60........|
000000a0 00 05 01 00 56 4f 4c 00 00 00 00 00 00 00 f7 |....VOL........|
000000af
If I am understanding his explanation, this reports the settings in the currently selected patch and you can request a varying number of 'slots' to be reported. Each 'slot' represents one effect in the chain, the G1Four can stack 5 effects together.
$ amidi -p hw:2,0,0 -S 'F0 52 00 6e 64 02 01 01 00 F7'
^ ^
| +- End Slot
+---- Start Slot
If only the screen wasn't broken on my pedal....
The binary blob just seems to be ASCII of what is (presumably) on the/each screen. If we look at the 4 bytes before the obvious text we can see that it count's up.
00 00 00 00 = 1
00 00 01 00 = On/Off
00 01 00 00 = GoldDrv
00 01 01 00 = GoldDrv
00 02 00 00 = 15
00 02 01 00 = Gain
^ ^ ^ ^
| | | +- screen? (G1Four only has 1)
| | +---- value/description
| +------- parameter
+---------- slot
Did a bit of experimentation... firstly select preset '10' and read 'text' data slots 0..5.
$ amidi -p hw:2,0,0 -S 'b0 20 00 c0 00'
$ amidi -p hw:2,0,0 -S 'F0 52 00 6e 64 02 00 05 00 F7' -r temp.bin -t 2 ; hexdump -C temp.bin
1015 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 47 6f 6c 64 44 72 69 76 65 00 |......GoldDrive.|
00000030 00 01 01 00 47 6f 6c 64 44 72 69 76 65 00 00 02 |....GoldDrive...|
00000040 00 00 31 35 00 00 00 00 00 00 00 00 00 02 01 00 |..15............|
00000050 47 61 69 6e 00 00 00 00 00 00 00 03 00 00 35 30 |Gain..........50|
00000060 00 00 00 00 00 00 00 00 00 03 01 00 42 61 73 73 |............Bass|
00000070 00 00 00 00 00 00 00 04 00 00 35 33 00 00 00 00 |..........53....|
00000080 00 00 00 00 00 04 01 00 54 72 65 62 6c 65 00 00 |........Treble..|
00000090 00 00 00 05 00 00 36 30 00 00 00 00 00 00 00 00 |......60........|
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 4d 53 |OnOff.........MS|
000000d0 20 38 30 30 00 00 00 00 01 01 01 00 4d 53 20 38 | 800........MS 8|
000000e0 30 30 00 00 00 00 01 02 00 00 48 49 00 00 00 00 |00........HI....|
000000f0 00 00 00 00 01 02 01 00 49 6e 70 75 74 00 00 00 |........Input...|
00000100 00 00 01 03 00 00 35 32 00 00 00 00 00 00 00 00 |......52........|
00000110 01 03 01 00 42 61 73 73 00 00 00 00 00 00 01 04 |....Bass........|
00000120 00 00 34 38 00 00 00 00 00 00 00 00 01 04 01 00 |..48............|
00000130 4d 49 44 00 00 00 00 00 00 00 01 05 00 00 37 30 |MID...........70|
00000140 00 00 00 00 00 00 00 00 01 05 01 00 54 72 65 62 |............Treb|
00000150 6c 65 00 00 00 00 02 00 00 00 30 00 00 00 00 00 |le........0.....|
00000160 00 00 00 00 02 00 01 00 44 75 6d 6d 79 00 00 00 |........Dummy...|
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 36 30 00 00 00 00 00 00 00 00 02 02 01 00 |..60............|
000001a0 50 52 53 4e 43 00 00 00 00 00 02 03 00 00 37 35 |PRSNC.........75|
000001b0 00 00 00 00 00 00 00 00 02 03 01 00 47 61 69 6e |............Gain|
000001c0 00 00 00 00 00 00 02 04 00 00 37 30 00 00 00 00 |..........70....|
000001d0 00 00 00 00 02 04 01 00 56 4f 4c 00 00 00 00 00 |........VOL.....|
000001e0 00 00 02 05 00 00 31 00 00 00 00 00 00 00 00 00 |......1.........|
000001f0 02 05 07 00 44 75 6d 6d 79 00 00 00 00 00 03 00 |....Dummy.......|
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 4d 53 |OnOff.........MS|
00000220 34 78 31 32 00 00 00 00 03 01 01 00 4d 53 34 78 |4x12........MS4x|
00000230 31 32 00 00 00 00 03 02 00 00 4f 46 46 00 00 00 |12........OFF...|
00000240 00 00 00 00 03 02 01 00 4d 49 43 00 00 00 00 00 |........MIC.....|
00000250 00 00 03 03 00 00 31 30 30 00 00 00 00 00 00 00 |......100.......|
00000260 03 03 01 00 44 35 37 3a 44 34 32 31 00 00 03 04 |....D57:D421....|
00000270 00 00 33 30 00 00 00 00 00 00 00 00 03 04 01 00 |..30............|
00000280 48 69 00 00 00 00 00 00 00 00 03 05 00 00 30 00 |Hi............0.|
00000290 00 00 00 00 00 00 00 00 03 05 01 00 4c 6f 00 00 |............Lo..|
000002a0 00 00 00 00 00 00 04 00 00 00 31 00 00 00 00 00 |..........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 5a 4e 52 00 00 00 00 00 00 00 |......ZNR.......|
000002d0 04 01 01 00 5a 4e 52 00 00 00 00 00 00 00 04 02 |....ZNR.........|
000002e0 00 00 45 46 58 49 4e 00 00 00 00 00 04 02 01 00 |..EFXIN.........|
000002f0 44 45 54 43 54 00 00 00 00 00 04 03 00 00 32 38 |DETCT.........28|
00000300 00 00 00 00 00 00 00 00 04 03 01 00 44 65 70 74 |............Dept|
00000310 68 00 00 00 00 00 04 04 00 00 31 38 00 00 00 00 |h.........18....|
00000320 00 00 00 00 04 04 01 00 54 48 52 53 48 00 00 00 |........THRSH...|
00000330 00 00 04 05 00 00 30 00 00 00 00 00 00 00 00 00 |......0.........|
00000340 04 05 01 00 44 65 63 61 79 00 00 00 00 00 05 00 |....Decay.......|
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 6c |OnOff.........Pl|
00000370 61 74 65 00 00 00 00 00 05 01 01 00 50 6c 61 74 |ate.........Plat|
00000380 65 00 00 00 00 00 05 02 00 00 35 30 00 00 00 00 |e.........50....|
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 30 00 00 00 00 00 00 00 00 00 |......0.........|
000003b0 05 03 01 00 44 65 63 61 79 00 00 00 00 00 05 04 |....Decay.......|
000003c0 00 00 30 00 00 00 00 00 00 00 00 00 05 04 01 00 |..0.............|
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 f7 |.......|
000003f7
Having previous read this preset in the 'normal' way I know this one has 5 effects
$ head patch_10.zptc.txt
Container:
PTCF = Container:
effects = 5
name = u'MS HiGain ' (total 10)
id1 = 50331712 => effect = u'GOLD_DRV.ZD2'
id2 = 67108881 => effect = u'MS800_1U.ZD2'
id3 = 83886096 => effect = u'MS4X12.ZD2'
id4 = 16777280 => effect = u'ZNR.ZD2'
id5 = 150995056 => effect = u'PLATEREV.ZD2'
TXJ1 = Container:
Looking at the big-blob above we can see that starts with slot '00', but ends on '05' where I was expecting '04'. Looking more carefully I note that the 2nd effect "MS800" actually occupies 2 slots (or rather screens).
So what does the 4th byte represent?
I really wonder whether the G3n/etc (which actually has different screens) does anything with that 4th byte, it's manual talks about assigning a special function to the foot switch under the 2nd screen - and drawing that in inverse characters...
00 00 00 00 = 1
00 00 01 00 = On/Off
00 01 00 00 = GoldDrv
00 01 01 00 = GoldDrv
00 02 00 00 = 15
00 02 01 00 = Gain
^ ^ ^ ^
| | | +- inverted???
| | +---- value/description
| +------- parameter
+---------- screen
ie. the 'solo' action shown here:
I also notice that a 'val/parm' key of 0x07 is used for Dummy parameters, ie effects have less than 4 parameters per screen and which should not be shown
000001f0 02 05 07 00 44 75 6d 6d 79 00 00 00 00 00 03 00 |....Dummy.......|
This 0x07 is also seen in the 'Bomber' effect
000000b0 01 00 00 00 31 00 00 00 00 00 00 00 00 00 01 00 |....1...........|
000000c0 01 00 4f 6e 4f 66 66 00 00 00 00 00 01 01 00 00 |..OnOff.........|
000000d0 42 6f 6d 62 65 72 00 00 00 00 01 01 01 00 42 6f |Bomber........Bo|
000000e0 6d 62 65 72 00 00 00 00 01 02 00 00 37 37 00 00 |mber........77..|
000000f0 00 00 00 00 00 00 01 02 01 00 44 65 63 61 79 00 |..........Decay.|
00000100 00 00 00 00 01 03 00 00 30 00 00 00 00 00 00 00 |........0.......|
00000110 00 00 01 03 01 00 54 6f 6e 65 00 00 00 00 00 00 |......Tone......|
00000120 01 04 00 00 31 30 30 00 00 00 00 00 00 00 01 04 |....100.........|
00000130 01 00 4d 69 78 00 00 00 00 00 00 00 01 05 00 00 |..Mix...........|
00000140 4c 41 54 43 48 00 00 00 00 00 01 05 07 00 4f 4e |LATCH.........ON|
00000150 2f 4f 46 46 00 00 00 00 02 00 00 00 30 00 00 00 |/OFF........0...|
00000160 00 00 00 00 00 00 02 00 01 00 4f 6e 4f 66 66 00 |..........OnOff.|
If I am understanding his explanation, this reports the settings in the currently selected patch and you can request a varying number of 'slots' to be reported. Each 'slot' represents one effect in the chain, the G1Four can stack 5 effects together.
$ amidi -p hw:2,0,0 -S 'F0 52 00 6e 64 02 01 01 00 F7' ^ ^ | +- End Slot +---- Start Slot
If only the screen wasn't broken on my pedal....
You also worked it out but the FenderTw takes two slots. Of course it could be placed anywhere. I notice sometimes I see dummy. But it inst reliable way. Sometimes I see more bytes (2 more). But reread is back to normal slot.
I suspect I will make up some JSON/DICT to store the known FX and if I recognize X then I will know to ask for slot N, N+1
In my various projects I have been using Construct to parse binary blobs, this project included. Construct outputs Python dictionaries. https://github.com/mungewell/zoom-zt2/blob/master/zoomzt2.py#L12
If you wanted a quick decode I'd imagine something like the following would work
Item = Struct(
"screen" / Byte,
"param" / Byte,
"type" / Byte,
"invert" / Byte,
"name" / PaddedString(10, "ascii"),
)
Display(
"value" / Embedded(Item),
"name" / Embedded(Item),
)
Header = Struct(
Const(b"\xf0\x52\x00\x6e\x64\x01"),
Greedy(Display),
Const(b"\xf7")
)
Also take a look at the way we decode the 'real' patch data.. https://github.com/mungewell/zoom-zt2/blob/master/decode_preset.py
I also notice that a 'val/parm' key of 0x07 is used for Dummy parameters, ie effects have less than 4 parameters per screen and which should not be shown
000001f0 02 05 07 00 44 75 6d 6d 79 00 00 00 00 00 03 00 |....Dummy.......|
SHORT VERSION
I think these dummy params are related to if Knob 4 (k4) is a "page"??
Please see my attached code to set value for FXM_PN The PN is right ... the FXM ... for single size FX it is right ... for a twin say ... bummer. Got to try to work out from patch how to know the slot?
LONGER VERSION
So I am trying to get nomenclature consist with yours.
How I see it:
Zoom G1X Four has 50 patches. Display 10 ... 59 but Midi as 0 ... 49 and bank switch as 0 ... 4 with program change 0 ... 9 (b0 20 01 c0 02 say)
These are "fixed". IE even if you empty them, I believe the memory is reserved. The Alesis ION was like this, but the AKAI Miniak had more flexible indexed patch/sequence/rhythm/multi arrangement.
Currently I then think of each patch having
- 0 - M Effects (FX1, FX2, ... FX(M+1) - and I am wanting to understand if these have fixed IDs (I think they do)
- each FXm has N parameters I have seen up to 8 so far.
- we can read the PATCH data
- we can read current patch
- we can get an ASCII representation of an FXm param n
- we can manipulate the params via sysex
I would love to catch up with your code - I think you did a lot by reverse engineering the firmware updates right? I am guessing you may have done USB sniffing (how I started my approach). We are both using the Linux Midi - A bit easier than MidiOX.
Regarding the parameters - I see things slightly differently BUT I am thinking there are legitimately different ways to view this thing - or I am simply rediscovering what you found and not able to see it yet - apologies - not my intention.
So here's one way I model the params.
I can just reference them directly with the following sysex BUT I do need apriori knowledge of range of values (and this ASCII dump could be a big help)
FXmPn in my nomenclature above. Of course now we know an FX can take up more than one space - well for my method below I dont think it affect Pn but it does affect FXm
pi@raspberrypi:~/Software/ZoomPedal $ more FXM_PN.sh #!/bin/bash export MIDI_DEV=
amidi -l | grep ZOOM | awk '{print $2}'`
seems to also dump, sometimes, state of the effect?
but not consistently - likely based on EditorOn
expect FX Param value
ie 1 1 10
2 3 20
theFX=$1
theParam=$2
theValue=$3
theFXMod=$(($theFX-1))
theParamMod=$(($theParam+1))
hexFX=printf "%02x" $theFXMod
hexParam=printf "%02x" $theParamMod
theVlow=$(($theValue & 127))
#theVhigh=$(( ($theValue >> 7) & 127 ))
theVhigh=$(( ($theValue / 128) & 127 ))
hexValueLow=printf "%02x" $theVlow
hexValueHigh=printf "%02x" $theVHigh
echo $theValue
echo $hexValueLow
echo $hexValueHigh
F0 52 00 6E 64 03 00 02 02 01 00 00 00 00 F7
probeString="F0 52 00 6E 64 03 00 ${hexFX} ${hexParam} ${hexValueLow} ${hexValueHigh} 00 00 00 F7" echo ${probeString} theFile=temp.$$ amidi -p ${MIDI_DEV} -S ${probeString} -r ${theFile} -t 1 ; hexdump -C ${theFile}; rm ${theFile} `
EXAMPLE
Factory reset my pedal [[what happened to yours btw?]] Choose patch 16, GrungeMuff Inspect the pedal visually
FX1 = NYC MUFF p1 = SUSTN p2 = Tone p3 = BAL p4 = VOL FX2 = FD TWNR - this is shown in a sort of "hatched" way ... not sure if accident p1 = Bass knob1 (k1) p2 = MID (k2) p3 = Treble(k3) [page 1/3] and this is in itself a param??? (Knob 4 can move it) NOPE - k4 is used to allow us to see p4, 5, 6 etc and this is where the dummy is coming from I think?? p4 = BRGHT (k1) p5 = Gain (k2) p6 = VOL (k3) [page 2/3] (k4) p7= Depth (k1) p8 = Speed (k2) ... no k3 [page 3/3]
FX3 = MS 4 x 12 p1 = MIC (k1) p2 = D57:D421 (k2) p3 = Hi (k3) p4 = Lo (k4)
FX4 = ZNR p1 = DETCT (k1) p2 = Depth (k2) p3 = THRSH (k3) p4 = Decay (k4) FX5 = RNLG DELAY p1 = Time (k1) p2 = F.B. (k2) p3 = Mix (k3) p4 = Tail (k4)
So lets test writing FX1, p1 = currently SUSTN
pi@raspberrypi:~/Software/ZoomPedal $ ./FXM_PN.sh 1 1 20 20 14 00 F0 52 00 6E 64 03 00 00 02 14 00 00 00 00 F7
15 bytes read 00000000 f0 52 00 6e 64 03 01 00 02 14 00 00 00 00 f7 |.R.nd..........| 0000000f ` And now it says 20. Let's put tone, p2 to 53
` pi@raspberrypi:~/Software/ZoomPedal $ ./FXM_PN.sh 1 2 53 53 35 00 F0 52 00 6E 64 03 00 00 03 35 00 00 00 00 F7
423 bytes read 00000000 00 00 00 00 01 00 00 00 00 4e 00 00 00 00 00 00 |.........N......| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000190 00 00 72 5b 26 5a 0c f7 f0 52 00 6e 64 03 01 00 |..r[&Z...R.nd...| 000001a0 03 35 00 00 00 00 f7 |.5.....| 000001a7 ` done
So now I move to the FX2, Fender TWNR.
` pi@raspberrypi:~/Software/ZoomPedal $ ./FXM_PN.sh 2 1 0 0 00 00 F0 52 00 6E 64 03 00 01 02 00 00 00 00 00 F7
903 bytes read
00000000 f0 52 00 6e 45 00 00 00 00 06 00 78 05 00 50 54 |.R.nE......x..PT|
00000010 43 46 68 01 00 00 00 01 00 00 00 06 00 00 00 00 |CFh.............|
00000020 20 00 00 00 00 00 00 00 00 00 00 47 72 00 75 6e | ..........Gr.un|
00000030 67 65 4d 75 66 20 66 50 00 00 03 21 00 00 00 04 |geMuf fP...!....|
00000040 01 00 00 00 10 00 00 00 05 40 00 00 01 00 21 00 |.........@....!.|
00000050 00 08 54 58 4a 00 31 3c 00 00 00 4e 59 01 43 20 |..TXJ.1<...NY.C |
00000060 4d 75 66 66 02 6a 70 03 74 03 42 01 5b 5d 03 60 |Muff.jp.t.B.[].| 00000070 03 03 01 5b 02 70 35 02 3d 39 30 27 73 5d 03 49 |...[.p5.=90's].I| 00000080 03 0b 03 5e 03 2a 69 03 65 03 42 03 75 75 03 0d |...^.*i.e.B.uu..| 00000090 03 62 03 4e 03 2e 54 03 45 03 13 03 68 40 01 42 |[email protected]| 000000a0 54 58 45 31 34 00 00 00 00 54 68 69 73 00 20 39 |TXE14....This. 9| 000000b0 30 27 73 20 61 00 6c 74 65 72 6e 61 74 00 69 76 |0's a.lternat.iv| 000000c0 65 20 72 6f 63 00 6b 20 73 6f 75 6e 64 00 20 66 |e roc.k sound. f| 000000d0 65 61 74 75 72 00 65 73 20 4e 59 43 20 00 4d 75 |eatur.es NYC .Mu| 000000e0 66 66 2e 00 45 08 44 54 42 10 00 00 00 42 21 01 |ff..E.DTB....B!.| 000000f0 00 06 05 54 00 00 19 34 01 00 00 00 00 00 00 00 |...T...4........| 00000100 00 00 00 00 00 01 00 00 00 43 00 00 48 22 05 58 |.........C..H".X| 00000110 00 07 00 00 04 10 38 01 1c 00 00 00 00 00 00 00 |......8.........| 00000120 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 |................| 00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000140 21 00 00 0a 00 48 4c 40 0c 6c 00 00 00 00 00 00 |[email protected]......| 00000150 00 00 00 00 00 02 00 00 00 00 00 01 00 0c 00 02 |................| 00000160 00 10 01 08 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000170 00 00 00 00 00 04 00 43 00 00 50 5a 70 40 40 09 |.......C..PZp@@.| 00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000190 00 00 50 50 52 00 4d 0c 00 00 00 00 00 02 00 00 |..PPR.M.........| 000001a0 00 00 00 00 65 00 00 00 00 61 00 00 12 10 00 4c |....e....a.....L| 000001b0 40 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |@...............| 000001c0 00 00 00 00 50 00 50 52 4d 0c 00 00 00 00 00 00 |....P.PRM.......| 000001d0 00 08 00 00 00 40 00 19 00 00 00 0c 00 00 00 00 |.....@..........| 000001e0 00 00 00 00 01 00 00 00 00 4e 00 00 00 00 00 00 |.........N......| 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000370 00 00 73 26 7e 15 09 f7 f0 52 00 6e 64 03 01 01 |..s&~....R.nd...| 00000380 02 00 00 00 00 00 f7 |.......| 00000387
Now I moved the button to 2 ... so my guess is the Editor echoes this first?
Then I send 0 to P1 .. but I get 10 ... that's ok because that IS the minimum values!!!
What if send to FX4 of P1?? Recall we think the FX4 will be FX3 (Twin takes 2). Well this moved button to 3 and sets MIC to off on MS4x12
` pi@raspberrypi:~/Software/ZoomPedal $ ./FXM_PN.sh 4 1 0 0 00 00 F0 52 00 6E 64 03 00 03 02 00 00 00 00 00 F7
903 bytes read
00000000 f0 52 00 6e 45 00 00 00 00 06 00 78 05 00 50 54 |.R.nE......x..PT|
00000010 43 46 68 01 00 00 00 01 00 00 00 06 00 00 00 00 |CFh.............|
00000020 20 00 00 00 00 00 00 00 00 00 00 47 72 00 75 6e | ..........Gr.un|
00000030 67 65 4d 75 66 20 66 50 00 00 03 21 00 00 00 04 |geMuf fP...!....|
00000040 01 00 00 00 10 00 00 00 05 40 00 00 01 00 21 00 |.........@....!.|
00000050 00 08 54 58 4a 00 31 3c 00 00 00 4e 59 01 43 20 |..TXJ.1<...NY.C |
00000060 4d 75 66 66 02 6a 70 03 74 03 42 01 5b 5d 03 60 |Muff.jp.t.B.[].| 00000070 03 03 01 5b 02 70 35 02 3d 39 30 27 73 5d 03 49 |...[.p5.=90's].I| 00000080 03 0b 03 5e 03 2a 69 03 65 03 42 03 75 75 03 0d |...^.*i.e.B.uu..| 00000090 03 62 03 4e 03 2e 54 03 45 03 13 03 68 40 01 42 |[email protected]| 000000a0 54 58 45 31 34 00 00 00 00 54 68 69 73 00 20 39 |TXE14....This. 9| 000000b0 30 27 73 20 61 00 6c 74 65 72 6e 61 74 00 69 76 |0's a.lternat.iv| 000000c0 65 20 72 6f 63 00 6b 20 73 6f 75 6e 64 00 20 66 |e roc.k sound. f| 000000d0 65 61 74 75 72 00 65 73 20 4e 59 43 20 00 4d 75 |eatur.es NYC .Mu| 000000e0 66 66 2e 00 45 08 44 54 42 10 00 00 00 42 21 01 |ff..E.DTB....B!.| 000000f0 00 06 05 54 00 00 19 34 01 00 00 00 00 00 00 00 |...T...4........| 00000100 00 00 00 00 00 00 00 00 00 43 00 00 08 22 00 58 |.........C...".X| 00000110 00 07 00 00 04 10 38 01 1c 00 00 00 00 00 00 00 |......8.........| 00000120 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 |................| 00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000140 21 00 00 0a 00 48 4c 40 0c 6c 00 00 00 00 00 00 |[email protected]......| 00000150 00 00 00 00 00 02 00 00 00 00 00 01 00 0c 00 02 |................| 00000160 00 10 01 08 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000170 00 00 00 00 00 04 00 43 00 00 50 5a 70 40 40 09 |.......C..PZp@@.| 00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000190 00 00 50 50 52 00 4d 0c 00 00 00 00 00 02 00 00 |..PPR.M.........| 000001a0 00 00 00 00 65 00 00 00 00 61 00 00 12 10 00 4c |....e....a.....L| 000001b0 40 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |@...............| 000001c0 00 00 00 00 50 00 50 52 4d 0c 00 00 00 00 00 00 |....P.PRM.......| 000001d0 00 08 00 00 00 40 00 19 00 00 00 0c 00 00 00 00 |.....@..........| 000001e0 00 00 00 00 01 00 00 00 00 4e 00 00 00 00 00 00 |.........N......| 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000370 00 00 1c 52 28 2b 02 f7 **f0 52 00 6e 64 03 01 0a |...R(+...R.nd...| 00000380 01 03 00 00 00 00 f7** |.......| 00000387
NOTICE this responds with 2 SYSEX sentences.
OK back to FX2 P4 I suspect this will move to button2, echo the TWINR data then click param4 (knob1)??
Well no - but it IS changing BRGHT 0/1
`pi@raspberrypi:~/Software/ZoomPedal $ ./FXM_PN.sh 2 4 0 0 00 00 F0 52 00 6E 64 03 00 01 05 00 00 00 00 00 F7
0 bytes read pi@raspberrypi:~/Software/ZoomPedal $ ./FXM_PN.sh 2 4 1 1 01 00 F0 52 00 6E 64 03 00 01 05 01 00 00 00 00 F7
15 bytes read 00000000 f0 52 00 6e 64 03 01 01 05 01 00 00 00 00 f7 |.R.nd..........| 0000000f
`
Simply to say FX/parameter .. the parameter is good nomenclature and consistent. The FX is not so good - it is until an FX takes more than one slot. And I guess then until one reads the full state of the patch in then it is not so easy to work out which "slot" etc to use ... bummer.
OK I think I made some progress here.
I now use Zooms concept patch 10 ... 59. So I bias by 10 etc
To get all the current FX for the Zoom for patch in 10 ... 59 select patch dump out FX 1...8 .. sure we know only 6 max but that doesnt stop it working :+1:
pi@raspberrypi:~/Software/ZoomPedal $ cat GetAllFX.sh #!/bin/bash for i in {10..60} do # change to current patch ./LoadPatch.sh ${i} # get FX ./GetCurrentFX.sh ${i} done
and
pi@raspberrypi:~/Software/ZoomPedal $ cat GetAllFX.sh #!/bin/bash for i in {10..60} do # change to current patch ./LoadPatch.sh ${i} # get FX ./GetCurrentFX.sh ${i} done
then I cheat and pass in the patch - I could ask the Zoom but it has running status AND if I move 10 pedal changes it seem to wait, then send me all the 10 at once :-) Would be a ton of parsing to get the state - I am old school not OO ... so just "know" it
pi@raspberrypi:~/Software/ZoomPedal $ more GetCurrentFX.sh #!/bin/bash export MIDI_DEV=
amidi -l | grep ZOOM | awk '{print $2}'`
if [ "x$1" == "x" ]
then
pn="default"
else
pn=$1
fi
probeString="F0 52 00 6E 64 02 00 08 00 F7" theFile="FX_${pn}.bin" amidi -p ${MIDI_DEV} -S ${probeString} -r ${theFile} -t 1 ; hexdump -C ${theFile} `
So if no param is passed in, call output default. Otherwise take the value. Old school default processing :-)
And I realize now ... one parses between successive OnOff's.
pi@raspberrypi:~/Software/ZoomPedal $ grep -c "OnOff" FX*.bin FX_10.bin:5 FX_11.bin:5 FX_12.bin:6 FX_13.bin:5 FX_14.bin:6 FX_15.bin:5 FX_16.bin:5 FX_17.bin:5 FX_18.bin:5 FX_19.bin:6 FX_20.bin:6 FX_21.bin:6 FX_22.bin:6 FX_23.bin:6 FX_24.bin:5 ...
Darn not quite that simple - 12 suggests 6 but it is repeating BlackWah twice. Well ok some progress - it wouldnt be fun if the pedal just revealed itself.
Rolling up what we know... Python is awesome! decode_screens.py.txt
simon@thevoid:~/zoom-zt2-sdw-github$ amidi -p hw:2,0,0 -S 'b0 20 00 c0 00'
simon@thevoid:~/zoom-zt2-sdw-github$ amidi -p hw:2,0,0 -S 'F0 52 00 6e 64 02 00 09 00 F7' -r temp.bin -t 2
1026 bytes read
simon@thevoid:~/zoom-zt2-sdw-github$ python3 decode_screens.py temp.bin
---
Effect: GoldDrive (1)
Gain : 15
Bass : 50
Treble : 53
VOL : 60
---
Effect: MS 800 (1)
Input : HI
Bass : 52
MID : 48
Treble : 70
PRSNC : 60
Gain : 75
VOL : 70
---
Effect: MS4x12 (1)
MIC : OFF
D57:D421 : 100
Hi : 30
Lo : 0
---
Effect: ZNR (1)
DETCT : EFXIN
Depth : 28
THRSH : 18
Decay : 0
---
Effect: Plate (1)
PreD : 50
Decay : 0
Mix : 0
Tail : OFF
[edit:] BTW this is what that patch looks like when decoded through the ZPTC route... patch_10.zptc.txt
FW glitch on the pedals.... if you ask for too much data, the SysEx packet is not terminated (0xf7) and you are left hanging...
[edit] this may explain the leading zeros we sometimes see.
$ amidi -p hw:2,0,0 -S 'F0 52 00 6e 64 02 00 06 00 F7' -r temp.bin -t 10
1023 bytes read
$ hexdump -C temp.bin | tail
00000370 6c 61 74 65 00 00 00 00 00 05 01 01 00 50 6c 61 |late.........Pla|
00000380 74 65 00 00 00 00 00 05 02 00 00 35 30 00 00 00 |te.........50...|
00000390 00 00 00 00 00 05 02 01 00 50 72 65 44 00 00 00 |.........PreD...|
000003a0 00 00 00 05 03 00 00 30 00 00 00 00 00 00 00 00 |.......0........|
000003b0 00 05 03 01 00 44 65 63 61 79 00 00 00 00 00 05 |.....Decay......|
000003c0 04 00 00 30 00 00 00 00 00 00 00 00 00 05 04 01 |...0............|
000003d0 00 4d 69 78 00 00 00 00 00 00 00 05 05 00 00 4f |.Mix...........O|
000003e0 46 46 00 00 00 00 00 00 00 05 05 01 00 54 61 69 |FF...........Tai|
000003f0 6c 00 00 00 00 00 00 06 00 00 00 31 00 00 00 |l..........1...|
000003ff
$ amidi -p hw:2,0,0 -S 'F0 52 00 6e 64 02 00 05 00 F7' -r temp.bin -t 10
1017 bytes read
$ hexdump -C temp.bin | tail
00000370 50 6c 61 74 65 00 00 00 00 00 05 01 01 00 50 6c |Plate.........Pl|
00000380 61 74 65 00 00 00 00 00 05 02 00 00 35 30 00 00 |ate.........50..|
00000390 00 00 00 00 00 00 05 02 01 00 50 72 65 44 00 00 |..........PreD..|
000003a0 00 00 00 00 05 03 00 00 30 00 00 00 00 00 00 00 |........0.......|
000003b0 00 00 05 03 01 00 44 65 63 61 79 00 00 00 00 00 |......Decay.....|
000003c0 05 04 00 00 30 00 00 00 00 00 00 00 00 00 05 04 |....0...........|
000003d0 01 00 4d 69 78 00 00 00 00 00 00 00 05 05 00 00 |..Mix...........|
000003e0 4f 46 46 00 00 00 00 00 00 00 05 05 01 00 54 61 |OFF...........Ta|
000003f0 69 6c 00 00 00 00 00 00 f7 |il.......|
Oh and on "Dummy" for the late parameter names, I don't think this is for the paging on the device.
The parameters are paged in groups of 4 (plus OnOff and FX name). The G1Four pages them as 3 plus pager knob, so a 8 parameter effect is paged over 3 sets of screen each with (upto) 3 params showing.
I assume that the behavior of the G1Four was shoehorned into existing protocol established on the G3n (with multiple screens available).
Hopefully someone with the G5n/better can grab a SysEx dump of a patch with one of the fancy effects, so we can see how the 'use 2nd footswitch' is actually encoded.
Awesome work. I hope to get some more cycles to and see if can find more stuff. I didn't realise the Firmware has the FX programs in them so will be looking thru your work there.
I have to make a video for someone on different subject - then I hope to get back on topic.
I have a 21.5" touch screen on order and will be taking some time off week after next - I feel a Ctrlr panel coming on.
On Fri, 11 Dec 2020, 03:02 mungewell, [email protected] wrote:
Hopefully someone with the G5n/better can grab a SysEx dump of a patch with one of the fancy effects, so we can see how the 'use 2nd footswitch' is actually encoded.
[image: g3n_ts_boost] https://user-images.githubusercontent.com/236907/101856432-36a96300-3b5d-11eb-9e9f-a65a8157ab62.png
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mungewell/zoom-zt2/issues/13#issuecomment-742934722, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFO7EVZJDRCMAR226VQIFJDSUGDV5ANCNFSM4US3PF7A .
Since the patch sections start with the text marker "PTFC" they are easy to locate, they should parse directly but note that there is extra garbage in between. After 1st boot I think they are copied somewhere else, so that the user can change them
decoded_g1_v2.00$ ls
10080.txt 15232.txt 20384.txt 26272.txt 31424.txt 36576.txt 8608.txt
10816.txt 15968.txt 21120.txt 27008.txt 32160.txt 4192.txt 9344.txt
11552.txt 16704.txt 21856.txt 2720.txt 32896.txt 4928.txt
12288.txt 17440.txt 22592.txt 27744.txt 33632.txt 512.txt
1248.txt 18176.txt 23328.txt 28480.txt 34368.txt 5664.txt
13024.txt 18912.txt 24064.txt 29216.txt 3456.txt 6400.txt
13760.txt 19648.txt 24800.txt 29952.txt 35104.txt 7136.txt
14496.txt 1984.txt 25536.txt 30688.txt 35840.txt 7872.txt
[edit:] https://github.com/Sepero/SearchBin
DIY G11, like it ;-)
So I noticed some of those PTFC and other strings ... they seem to link up with strings in the files you chop out of the binary. Anyhow - what I was mainly after was sysex control of parameters, patch change (got). Next I want to see how you got to change the FX in a slot ((seems like one has to probe pedal to find.thr FX?)).
On Fri, 11 Dec 2020, 18:55 mungewell, [email protected] wrote:
Since the patch sections start with the text marker "PTFC" they are easy to locate, they should parse directly but note that there is extra garbage in between. After 1st boot I think they are copied somewhere else, so that the user can change them
decoded_g1_v2.00$ ls 10080.txt 15232.txt 20384.txt 26272.txt 31424.txt 36576.txt 8608.txt 10816.txt 15968.txt 21120.txt 27008.txt 32160.txt 4192.txt 9344.txt 11552.txt 16704.txt 21856.txt 2720.txt 32896.txt 4928.txt 12288.txt 17440.txt 22592.txt 27744.txt 33632.txt 512.txt 1248.txt 18176.txt 23328.txt 28480.txt 34368.txt 5664.txt 13024.txt 18912.txt 24064.txt 29216.txt 3456.txt 6400.txt 13760.txt 19648.txt 24800.txt 29952.txt 35104.txt 7136.txt 14496.txt 1984.txt 25536.txt 30688.txt 35840.txt 7872.txt
DIY G11, like it ;-)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mungewell/zoom-zt2/issues/13#issuecomment-743365530, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFO7EV3VLRGGO3RZCHFG66TSUJTKVANCNFSM4US3PF7A .
@shooking Don't be afraid to open new bugs on different topics... I open #16 for this. :-)
I think I found more fun with this command?
We originally used probeString="F0 52 00 6E 64 02 00 08 00 F7" Try probeString="F0 52 00 6E 64 02 00 08 01 F7" if last value % 2 == 1 we get short, else we got long?
This 01 cuts out a lot of the verbosity :-) And so mostly the who params fit in a block.
Also running what I am calling GetMoreData.sh helps ie f0 52 00 6e 60 05 00 f7
As I try to "name" the Midi sentences I see this one used a lot in grabbing the FLST_SEQ and other blobs. It either return nothing, a string that seems to say "you got the lot!" or another one that wants one to it to command again to get more data.
It seems to have the bonus of clearing the buffer (especially if one turns off editor mode, moves to preset, turns on editor mode, getmoredata ... then run command ... much cleaner reference frame)
pi@raspberrypi:~/Software/ZoomPedal $ ./GetCurrentFX_short.sh
0 bytes read
763 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 01 00 00 5a 20 54 72 6f 6e 00 00 |........Z Tron..| 00000020 00 00 00 02 00 00 20 38 00 00 00 00 00 00 00 00 |...... 8........| 00000030 00 03 00 00 31 00 00 00 00 00 00 00 00 00 00 04 |....1...........| 00000040 00 00 38 31 00 00 00 00 00 00 00 00 00 05 00 00 |..81............| 00000050 33 38 00 00 00 00 00 00 00 00 01 00 00 00 31 00 |38............1.| 00000060 00 00 00 00 00 00 00 00 01 01 00 00 46 6c 69 70 |............Flip| 00000070 54 6f 70 00 00 00 01 02 00 00 4f 46 46 00 00 00 |Top.......OFF...| 00000080 00 00 00 00 01 03 00 00 32 2e 30 00 00 00 00 00 |........2.0.....| 00000090 00 00 01 04 00 00 35 2e 30 00 00 00 00 00 00 00 |......5.0.......| 000000a0 01 05 00 00 35 2e 30 00 00 00 00 00 00 00 02 00 |....5.0.........| 000000b0 00 00 30 00 00 00 00 00 00 00 00 00 02 01 00 00 |..0.............| 000000c0 46 6c 69 70 54 6f 70 00 00 00 02 02 00 00 33 30 |FlipTop.......30| 000000d0 00 00 00 00 00 00 00 00 02 03 00 00 4f 46 46 00 |............OFF.| 000000e0 00 00 00 00 00 00 02 04 00 00 37 31 00 00 00 00 |..........71....| 000000f0 00 00 00 00 02 05 00 00 33 00 00 00 00 00 00 00 |........3.......| 00000100 00 00 03 00 00 00 31 00 00 00 00 00 00 00 00 00 |......1.........| 00000110 03 01 00 00 41 4d 31 78 31 35 00 00 00 00 03 02 |....AM1x15......| 00000120 00 00 34 39 00 00 00 00 00 00 00 00 03 03 00 00 |..49............| 00000130 34 39 00 00 00 00 00 00 00 00 03 04 00 00 35 36 |49............56| 00000140 00 00 00 00 00 00 00 00 03 05 00 00 31 30 30 00 |............100.| 00000150 00 00 00 00 00 00 04 00 00 00 31 00 00 00 00 00 |..........1.....| 00000160 00 00 00 00 04 01 00 00 50 44 4c 20 56 6f 6c 00 |........PDL Vol.| 00000170 00 00 04 02 00 00 31 30 30 00 00 00 00 00 00 00 |......100.......| 00000180 04 03 00 00 30 00 00 00 00 00 00 00 00 00 04 04 |....0...........| 00000190 00 00 31 30 30 00 00 00 00 00 00 00 04 05 00 00 |..100...........| 000001a0 41 00 00 00 00 00 00 00 00 00 05 00 00 00 31 00 |A.............1.| 000001b0 00 00 00 00 00 00 00 00 05 01 00 00 42 4d 41 4e |............BMAN| 000001c0 31 30 30 00 00 00 05 02 00 00 35 30 00 00 00 00 |100.......50....| 000001d0 00 00 00 00 05 03 00 00 20 32 35 30 20 00 00 00 |........ 250 ...| 000001e0 00 00 05 04 00 00 35 35 00 00 00 00 00 00 00 00 |......55........| 000001f0 05 05 00 00 36 33 00 00 00 00 00 00 00 00 06 00 |....63..........| 00000200 00 00 30 00 00 00 00 00 00 00 00 00 06 01 00 00 |..0.............| 00000210 42 4d 41 4e 31 30 30 00 00 00 06 02 00 00 35 35 |BMAN100.......55| 00000220 00 00 00 00 00 00 00 00 06 03 00 00 4f 46 46 00 |............OFF.| 00000230 00 00 00 00 00 00 06 04 00 00 35 35 00 00 00 00 |..........55....| 00000240 00 00 00 00 06 05 00 00 33 00 00 00 00 00 00 00 |........3.......| 00000250 00 00 07 00 00 00 30 00 00 00 00 00 00 00 00 00 |......0.........| 00000260 07 01 00 00 5a 20 54 72 6f 6e 00 00 00 00 07 02 |....Z Tron......| 00000270 00 00 20 38 00 00 00 00 00 00 00 00 07 03 00 00 |.. 8............| 00000280 31 00 00 00 00 00 00 00 00 00 07 04 00 00 38 31 |1.............81| 00000290 00 00 00 00 00 00 00 00 07 05 00 00 33 38 00 00 |............38..| 000002a0 00 00 00 00 00 00 08 00 00 00 30 00 00 00 00 00 |..........0.....| 000002b0 00 00 00 00 08 01 00 00 5a 20 54 72 6f 6e 00 00 |........Z Tron..| 000002c0 00 00 08 02 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000002d0 08 03 00 00 00 00 00 00 00 00 00 00 00 00 08 04 |................| 000002e0 00 00 00 00 00 00 00 00 00 00 00 00 08 05 00 00 |................| 000002f0 00 00 00 00 00 00 00 00 00 00 f7 |...........| 000002fb