Open shooking opened 3 years ago
Plugged in an expression pedal (bespeco vm18l, polarity in up position. Makes all kind of changes when enabled but no midi output at the moment. Will keep trying
Ok so I made more progress with the G5n. Will revert back to G3n later - just got to unbox it!
Anyhow @mungewell would be great if we can read the higher bits of FXID/GID from patch. I did this in C++ and now I can switch in Rhythm/Loopers. Below you have the FXID/GID necessary to load FX into a slot. IE 16/240, 16/248 etc.
16, 240 == Rhythm
PATTERN 67 states
-
bpm 40 - 250
vol 0 - 100
16, 248 == LP-MONO
Time 0 - 64 (manual, 1, 2 ... 64)
Undo off/on
Stop stop, finish, fade out
Volume 0 - 100
32, 248 == LP-STEREO
same params
48, 248 == LP-MN2 (2 slots)
p1 -> rec
so it need FS1 pressed?
pushing FS2 -> cancel
hold FS2 => clear
FS1 -> recording
push again -> play
again -> overdub'
push both FS1 2 and clear
2nd slot same as single
64, 248 == LP-ST2 (2 slots)
I am not sure (yet) if the FS1-4 return any midi. But for sure one an turn these FX on/off in slot - you can only have on type of looper at a time. If you add another then it "works" and the older one show the ! triangle.
For mono variants P1 - N works. For stereo version
pi@raspberrypi:~/Software/ZoomPedalG5n $ ./FXM_ID.sh 1 64 248
F0 52 00 6E 64 03 00 00 01 40 00 00 78 01 F7
857 bytes read
00000000 f0 52 00 6e 64 12 00 60 05 00 50 54 43 46 4c 01 |.R.nd..`..PTCFL.|
00000010 00 00 00 01 00 00 00 09 00 00 00 00 01 00 00 00 |................|
00000020 00 00 00 00 00 00 00 45 6d 00 70 74 79 20 20 20 |.......Em.pty |
00000030 20 00 20 40 00 00 1f 01 00 00 00 00 00 00 00 00 | . @............|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 54 58 4a 31 |............TXJ1|
00000060 00 00 00 00 00 54 58 45 31 00 00 00 00 00 45 44 |.....TXE1.....ED|
00000070 54 22 42 58 00 00 00 01 00 00 00 3e 00 00 00 00 |T"BX.......>....|
00000080 00 00 40 0f 04 08 40 01 00 00 00 00 00 00 00 00 |..@...@.........|
00000090 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 |................|
000000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000c0 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 |................|
000000d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000e0 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 |................|
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000100 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000110 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 |................|
00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000130 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................|
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000150 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 50 50 |..............PP|
00000170 52 00 4d 0c 00 00 00 00 00 00 00 00 00 20 00 00 |R.M.......... ..|
00000180 32 40 04 0c 00 00 00 00 00 00 00 00 00 00 00 00 |2@..............|
00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000350 00 00 00 6e 18 1c 76 0f f7 |...n..v..|
00000359
And now we have LP-ST2 in slot 1 & 2.For these double slots P5 - 8 control FX params that are 1 - 4 in the single slot version.
For example
pi@raspberrypi:~/Software/ZoomPedalG5n $ ./FXM_PN.sh 1 5 10
10
0a
00
F0 52 00 6E 64 03 00 00 06 0a 00 00 00 00 F7
P5's set to 10 = which is a time of 10. 0 => manual 1 => crotchet x 1 etc etc
FX 1 6 0 turns UNDO off 1 6 1 turns UNDO on P7 modifies the stop P8 modifies the volume.
If I look at midi packet in cmidiin
52 00 6e 64 03 00 00 07 00 00 00 00 00 f7
stamp = 0.255346
f0
52 00 6e 64 03 00 00 00 01 00 00 00 00 f7
so it seems to send this extra sysex sentence.
I am not quite following your thoughts; it looks like the first/annotated picture shows a SysEx block containing multiple patches, and the later is a single patch retrieved with F0 52 00 6E 64 03 00 00 01 40 00 00 78 01 F7
command.
The ZoomZT download individual patches with the packet = bytearray(b"\x52\x00\x6e\x09\x00")
command.
https://github.com/mungewell/zoom-zt2/blob/master/zoomzt2.py#L420
We also use the marker/magic "PTCF" as the start of patch file, at the 10th byte. This is same as used by ToneLib. https://github.com/mungewell/zoom-zt2/blob/master/zoomzt2.py#L432
It seems that the bytes you refer to are BEFORE the "PTCF" market/magic, and therefore not part of the patch per-se. The decode_patch.py
tool doesn't have access to these bytes, as they are not stored within the patch file (on disk).
Is the control of the looper (and rhythm/drum machine) part of the patch on the G3n/G5n device, do different patches actually store and control it's behaviour?
I would agree that it would be 'interesting' if the Undo/Redo feature of the looper could be turned on within the G1Four (and family).
Rhythm -> Pattern (choose using Knob1 - GUIDE, 8Beats1, etc etc - which I guess are the raw files)
The rhythm patterns are hard coded into the FW, there was some reverse engineer described here: https://github.com/Barsik-Barbosik/Zoom-Firmware-Editor/issues/17
Once the start location is found, they can be extracted with the decode_patterns.py
tool, potentially changed and re-embedded (would have to limit/keep the overall size).
HI @mungewell
So I have a "fork" of your code. I grab ZT2 From the ZT2 I loop across the ZD2 BUT I also know there are 4 ZD2s (above) related to the rhythm and looper that are no seemingly in the ZT2 I have an alternative handle for these - so I read them in. For all ZD2s I use your code to pull out the 32bit IDs
Now the modern pedals also have Sysex to describe Patch size, nu banks and num patches. I hence modified your code to pull all the patches in and this gets me a "free" decode
From that I build a map of FXID/GID so that I can derive JSON for my models.
An example:
{
"FX": {
"name": "Nylon",
"description": "Body characteristics of a nylon guitar used in bossa nova, jazz and other genres.",
"version": "1.00",
"fxid": 384,
"gid": 162,
"group": 20,
"groupname": "AG MODEL",
"numParams": 4,
"numSlots": 1,
"filename": "MDL_NYLN.ZD2.BMP"
},
"Parameters": [
{
"name": "Gain",
"explanation": "Adjusts the gain.",
"blackback": false,
"pedal": false,
"mmax": 48,
"mdefault": 24
},
{
"name": "Bass",
"explanation": "Adjusts volume of low frequencies.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 50
},
{
"name": "MID",
"explanation": "Adjusts volume of middle frequencies.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 50
},
{
"name": "Treble",
"explanation": "Adjusts volume of high frequencies.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 50
}
]
},
{
"FX": {
"name": "LP-MN2",
"description": " ",
"version": "0.01",
"fxid": 48,
"gid": 248,
"group": 31,
"groupname": "LOOPER",
"numParams": 1,
"numSlots": 1,
"filename": "LP-MONO2_100.ZD2.BMP"
},
"Parameters": [
{
"name": "-",
"explanation": "-",
"blackback": false,
"pedal": false,
"mmax": 0,
"mdefault": 18688
}
]
},
{
"FX": {
"name": "Rhythm",
"description": " ",
"version": "0.01",
"fxid": 16,
"gid": 240,
"group": 30,
"groupname": "RHYTHM",
"numParams": 1,
"numSlots": 1,
"filename": "RHYTHM_100.ZD2.BMP"
},
"Parameters": [
{
"name": "-",
"explanation": "-",
"blackback": false,
"pedal": false,
"mmax": 0,
"mdefault": 18688
}
]
},
{
"FX": {
"name": "LP-MONO",
"description": " ",
"version": "0.01",
"fxid": 16,
"gid": 248,
"group": 31,
"groupname": "LOOPER",
"numParams": 1,
"numSlots": 1,
"filename": "LP-MONO_100.ZD2.BMP"
},
"Parameters": [
{
"name": "-",
"explanation": "-",
"blackback": false,
"pedal": false,
"mmax": 0,
"mdefault": 18688
}
]
},
{
"FX": {
"name": "LP-STEREO",
"description": " ",
"version": "0.01",
"fxid": 32,
"gid": 248,
"group": 31,
"groupname": "LOOPER",
"numParams": 1,
"numSlots": 1,
"filename": "LP-ST_100.ZD2.BMP"
},
"Parameters": [
{
"name": "-",
"explanation": "-",
"blackback": false,
"pedal": false,
"mmax": 0,
"mdefault": 18688
}
]
},
{
"FX": {
"name": "LP-ST2",
"description": " ",
"version": "0.01",
"fxid": 64,
"gid": 248,
"group": 31,
"groupname": "LOOPER",
"numParams": 1,
"numSlots": 1,
"filename": "LP-ST2_100.ZD2.BMP"
},
"Parameters": [
{
"name": "-",
"explanation": "-",
"blackback": false,
"pedal": false,
"mmax": 0,
"mdefault": 18688
}
]
}
]
I then read in the patches - an example
[
{
"numFX": 7,
"patchname": "MyPatchxx ",
"description": "This realistic acoustic guitar sound uses the Aco.Sim and RackComp effects.",
"FX": [
{
"fxid": 32,
"gid": 8,
"enabled": false,
"name": "RackComp",
"description": "This compressor allows more detailed adjustment than Comp.",
"version": "1.40",
"numSlots": 1,
"filename": "RACKCOMP.ZD2.BMP",
"Parameters": [
{
"param1": 31,
"name": "THRSH",
"explanation": "Sets the level that activates the compressor.",
"blackback": false,
"pedal": false,
"mmax": 50,
"mdefault": 40
},
{
"param2": 5,
"name": "Ratio",
"explanation": "Adjusts the compression ratio.",
"blackback": false,
"pedal": false,
"mmax": 9,
"mdefault": 5
},
{
"param3": 5,
"name": "ATTCK",
"explanation": "Sets compressor attack speed.",
"blackback": false,
"pedal": false,
"mmax": 9,
"mdefault": 6
},
{
"param4": 60,
"name": "VOL",
"explanation": "Adjusts the volume.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 80
}
]
},
{
"fxid": 80,
"gid": 24,
"enabled": false,
"name": "SweetDrv",
"description": "This effect models a sweet sounding overdrive.",
"version": "1.30",
"numSlots": 1,
"filename": "SWEETDRV.ZD2.BMP",
"Parameters": [
{
"param1": 32,
"name": "Gain",
"explanation": "Adjusts the gain.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 78
},
{
"param2": 50,
"name": "Tone",
"explanation": "Adjusts volume of high frequencies.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 50
},
{
"param3": 67,
"name": "Focus",
"explanation": "Adjusts volume of middle frequencies.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 67
},
{
"param4": 51,
"name": "VOL",
"explanation": "Adjusts the volume.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 62
}
]
},
{
"fxid": 48,
"gid": 64,
"enabled": true,
"name": "TapeEcho",
"description": "This effect simulates a tape echo. Changing the \"Time\" parameter changes the pitch of the echoes.",
"version": "1.50",
"numSlots": 1,
"filename": "TAPEECHO.ZD2.BMP",
"Parameters": [
{
"param1": 2005,
"name": "Time",
"explanation": "Sets the delay time.",
"blackback": false,
"pedal": false,
"mmax": 2014,
"mdefault": 559
},
{
"param2": 64,
"name": "F.B",
"explanation": "Adjusts the feedback amount.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 64
},
{
"param3": 50,
"name": "Mix",
"explanation": "Adjusts the amount of effected sound that is mixed with the original sound.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 56
},
{
"param4": 0,
"name": "Tail",
"explanation": "When ON, effect sound continues even after effect is turned off. When OFF, effect sound stops right when effect is turned off.",
"blackback": false,
"pedal": false,
"mmax": 1,
"mdefault": 0
}
]
},
{
"fxid": 16,
"gid": 48,
"enabled": false,
"name": "Tremolo",
"description": "This effect varies the volume at a regular rate.",
"version": "1.50",
"numSlots": 1,
"filename": "TREMOLO.ZD2.BMP",
"Parameters": [
{
"param1": 1,
"name": "Wave",
"explanation": "Sets the modulation waveform.",
"blackback": false,
"pedal": false,
"mmax": 2,
"mdefault": 0
},
{
"param2": 47,
"name": "Depth",
"explanation": "Sets the depth of the modulation.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 90
},
{
"param3": 42,
"name": "Rate",
"explanation": "Sets the speed of the modulation.",
"blackback": false,
"pedal": false,
"mmax": 110,
"mdefault": 50
},
{
"param4": 55,
"name": "VOL",
"explanation": "Adjusts the volume.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 62
}
]
},
{
"fxid": 80,
"gid": 72,
"enabled": false,
"name": "Spring",
"description": "This reverb effect simulates a spring reverb.",
"version": "1.50",
"numSlots": 1,
"filename": "SPRING.ZD2.BMP",
"Parameters": [
{
"param1": 8,
"name": "PreD",
"explanation": "Adjusts the delay between input of the original sound and start of the reverb sound.",
"blackback": false,
"pedal": false,
"mmax": 99,
"mdefault": 0
},
{
"param2": 19,
"name": "Decay",
"explanation": "Sets the duration of the reverberations.",
"blackback": false,
"pedal": false,
"mmax": 29,
"mdefault": 19
},
{
"param3": 78,
"name": "Mix",
"explanation": "Adjusts the amount of effected sound that is mixed with the original sound.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 50
},
{
"param4": 0,
"name": "Tail",
"explanation": "When ON, effect sound continues even after effect is turned off. When OFF, effect sound stops right when effect is turned off.",
"blackback": false,
"pedal": false,
"mmax": 1,
"mdefault": 0
}
]
},
{
"fxid": 16,
"gid": 240,
"enabled": true,
"name": "",
"description": "",
"version": "",
"numSlots": 2,
"filename": "",
"Parameters": [
{
"param1": 43
},
{
"param2": 0
},
{
"param3": 0
},
{
"param4": 36
},
{
"param5": 0
},
{
"param6": 0
},
{
"param7": 0
},
{
"param8": 0
}
]
},
{
"fxid": 16,
"gid": 88,
"enabled": false,
"name": "PDL Vol",
"description": "The volume curve of the volume pedal can be set.",
"version": "1.50",
"numSlots": 1,
"filename": "PDL_VOL.ZD2.BMP",
"Parameters": [
{
"param1": 100,
"name": "VOL",
"explanation": "Adjusts the volume.",
"blackback": false,
"pedal": true,
"mmax": 100,
"mdefault": 100
},
{
"param2": 0,
"name": "Min",
"explanation": "Adjusts the volume when the pedal is at minimum position.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 0
},
{
"param3": 100,
"name": "Max",
"explanation": "Adjusts the volume when the pedal is at maximum position.",
"blackback": false,
"pedal": false,
"mmax": 100,
"mdefault": 100
},
{
"param4": 0,
"name": "Curve",
"explanation": "Sets the volume curve.",
"blackback": false,
"pedal": false,
"mmax": 1,
"mdefault": 0
}
]
}
]
},
{
"numFX": 8,
"patchname": "Phazed ",
"description": "This is an MS 800 drive sound with a phaser effect.",
"FX": [
{
What I see is in the "patch" the ID is 28 bits. In the ZD2 itself it is 32 bits. If I use sysex to set the slot I do need the full 32 bits (well it might be 29 ... certainly a top bit to add A1XFour MDLs and turn on Looper/Rhythm on a G3n/G5n). I have not worked out how to do this yet on a G1X/B1X - it seems a different mechanism. But it seems to work on a GCE-3 if it emulates a G5n say.
Where did the ZD2 come from to give you these... ?
"group": 30,
"groupname": "RHYTHM",
"group": 31,
"groupname": "LOOPER",
So I derived it from the ZD2s. I can't tell you where I got them from on this forum.
here's them working ie loading into pedal - not sure how to trigger the FS1/2 yet
Oh, you tease...!
I found reference to them in a 129 file, but don't actually see where the meat is... Are the 30 and 31 group numbers official, or something that you made up?
30 and 31 come directly from the zd2. But I cannot work out how to get them via your methods. I suspect the midi file method is for ZD2s inside the ZT2? There again you also managed to get guard.zt2 right?
Is there a CLI from zoom-zt2 to get a wildcard file.
Not sure if you have my direct mail or a way to PM me. I dont want to share in public what I found. But by the looks of it you haven't found it yet else you would know where I got the info from - no tease - just trying to protect us both! Once people know the mechanism will disappear. More grey hat than white hat going on here.
OK, I'll add 30 and 31 to table in zoom-zt2
. Isn't guard.zt2
within the 136 file?
You can email me a 'firstname@username.org'.
I'm not sure that another flag (getting busy already) to zoomzt2
is the way to go. You can import zoomzt2
into a small script to call the same functions as zoomzt2-gui
does, should be about 10lines of code...
Another thought I had this morning, is whether the rhythm.zd2
contains the drum patterns it plays. If so they could be changed for/by each user to do custom songs, no real point but for giggles we could could do Billy Jean.
Request for comments.
So on the one hand the Rhythm and loopers show up as FX.
They display the following parameters
Rhythm -> Pattern (choose using Knob1 - GUIDE, 8Beats1, etc etc - which I guess are the raw files) BPM VOL
lp-mono: Time, Undo, Stop, VOL lp-stereo: " " lp-mn2: seems to take 2 slots. FS2 controls rec/play, FS3 held down clears lp2-st2: similarly 2 slots.
BUT they are not "normal" FX - they do not appear to be in the ZT2.
I got a G3n at weekend to try to dig deeper - especially regarding how to handle pedal input (since GCE-3 doesnt have pedal but can emulate a B1XFour say)
EXT PEDAL INPUT ON/OFF
on: F0 52 00 6E 64 03 00 0A 0A 01 00 00 00 00 F7 off: F0 52 00 6E 64 03 00 0A 0A 00 00 00 00 00 F7
The above is received, but the display doesnt seem to acknowledge change.
What is interesting is "PTCF" seem "different" for the Rythmn etc. That is one can receive a different output - I attach the files. The raw patches (from a 0x46 request) and a couple of manual sysex I received.
When I try to read factory patches I get things like:
so these exceptions are because I try to lookup the FXID/GID from ZD2 - and I am 100% certain they are not there.
Notice in the manual content I received from rhythm
G3n.zip