mungewell / zoom-zt2

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

Can you consider a way to pass in midi device string to your Zoom zt2 please? #31

Closed shooking closed 2 years ago

shooking commented 2 years ago

Hi Mungewell

How to allow optional identifier string please for midi device (ie can you add an option please)

Many thanks

BACKGROUND

So I am geeking out here. I got my GCE-3 ... £60. Short version. If I use GuitarLab to make it emulate an B1XFour then ALL of the B1XFour capabilities are unleashed. No S**t Sherlock - it's am emulator?

Well Zoom tell us that only the last store patch is playable.

BUT a small modification to your Zoom ZT2 shows it is a LOT more than that!

pi@raspberrypi:~ $ !a
amidi -l
Dir Device    Name
IO  hw:3,0,0  ZOOM GCE-3 MIDI 1

So on my pi above that's how this thing shows up.

This is how it identifies itself

pi@raspberrypi:~/Software/ZoomPedal $ ./Identify.sh 

15 bytes read
00000000  f0 7e 00 06 02 52 6e 00  10 00 31 2e 32 30 f7     |.~...Rn...1.20.|
0000000f

AFAIK this is a B1XFour with 00 10 00.

Anyhow, I modified my (modified) version of your Zoom ZT2.

if sys.platform == 'win32':
    mido.set_backend('mido.backends.rtmidi_python')
    midiname = b"ZOOM G"
else:
    midiname = "ZOOM GCE-3:ZOOM GCE-3 MIDI"
    #midiname = "ZOOM G"

Then run it ... and I get the complete state of the B1XFour out! I then verify I can change the patch. I can change the FX1 P3 values etc ... bloody awesome mate.

So now remote control of the £60 hardware is possible - sure it had to be with the Guitar Lab .. but I mean off an embedded processor or whatever.

How to allow optional identifier string fromgce.zip

mungewell commented 2 years ago

Of course I'd like to support the GCE as best we can, but your comment confused me a little. At present the code matches (and connects) to the device if just the first characters match - this should also match the GCE's string.

Perhaps the GCE is presenting 2 different interfaces...?

I'm away from my pedals for a couple of weeks, but can put this on the queue to fix. Thanks.

shooking commented 2 years ago

I realise now that the GCE-3 always identifies as itself (makes sense).

But your code is hardwired to find a B1/G1(X). So the request was to allow a string to be provided to match the Zoom device

I think I see how, when one changes type, the GCE seems to look for MODEL.ZSP. Then it asks for the FLST_SEQ.ZT2 ... your code works a treat here! Next it asks "how many patches do I have and how many per bank". G5 has 200 in 0..3's. B3 has 150 in 0..2's B1XFOUR has 50 in 0..9's

It uses 46 command to get the patches (iirc you use 9?). So I need to write parsers for the B3 and G5 to understand the 45 format then it looks like we are I business.

Check you have a GCE-3 Ask it to set a specific pedal type Ask it to use a particular model. Grab the FLST Use this to get the FXID, GIDs, BMP, default values, max value. Check the number of patches and bank size Grab them Use specific parser to Grab out the description, FXs, parameters and the English paramete descriptions.

Done. The only other major thing it does is to ask "what is ascii description of parameters" - you already have the screen decoder.

The standard FXM_PN can be used to set values. Just need to watch logical slot for double size FX. But that are ones with U in them anyhow.

The only thing I can see missing on the GCE (except the specific patch parsers) is the global EQ. Not sure if it exists. I certainly never found the sysex for it. We can change the tempo and patch volume. So basically these lovely devices are super cool. Can use patch change to choose from available patches - it isn't limited to the last set Patch as Zoom suggests! So I got me a super portable G5n ... or B3 ... or ...

One further thing I not worked out yet. Why they bother to allow the X emulation - there is no pedal. Maybe there is a way to inject pedal signal in?

On Sun, 8 Aug 2021, 20:31 mungewell, @.***> wrote:

Of course I'd like to support the GCE as best we can, but your comment confused me a little. At present the code matches (and connects) to the device if just the first characters match - this should also match the GCE's string.

Perhaps the GCE is presenting 2 different interfaces...?

I'm away from my pedals for a couple of weeks, but can put this on the queue to fix. Thanks.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mungewell/zoom-zt2/issues/31#issuecomment-894844347, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFO7EV3GSSHDJ6OVP4I33TTT33LR3ANCNFSM5BXJF47Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

mungewell commented 2 years ago

But your code is hardwired to find a B1/G1(X). So the request was to allow a string to be provided to match the Zoom device

Not hardwired, still confused... should detect and connect to the GCE. I can/will add option to specify a full/exact string to match.

$ python3
Python 3.6.9 (default, Jan 26 2021, 15:33:00) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> a = "ZOOM GCE-3:ZOOM GCE-3 MIDI"
>>> b = "ZOOM G"
>>> print(a[:len(b)])
ZOOM G
>>> if (a[:len(b)] == b):
...    print("yes") 
... 
yes
>>>

As you say the SysEx control might be quite different.

I'd certainly be interested if there is a way to remotely control the expression pedal.

shooking commented 2 years ago

I see what u mean ... maybe it was because I had two pedals plugged in?

On Sun, 8 Aug 2021, 21:02 mungewell, @.***> wrote:

But your code is hardwired to find a B1/G1(X). So the request was to allow a string to be provided to match the Zoom device

Not hardwired, still confused... should detect and connect to the GCE. I can/will add option to specify a full/exact string to match.

$ python3 Python 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.

a = "ZOOM GCE-3:ZOOM GCE-3 MIDI" b = "ZOOM G" print(a[:len(b)]) ZOOM G if (a[:len(b)] == b): ... print("yes") ... yes

As you say the SysEx control might be quite different.

I'd certainly be interested if there is a way to remotely control the expression pedal.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mungewell/zoom-zt2/issues/31#issuecomment-894847737, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFO7EV3PCR7MYQTFHEIZ44TT33PFFANCNFSM5BXJF47Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

mungewell commented 2 years ago

Yes that would cause the issue, app will attach to the first pedal it finds.

You can try this patch, but I have not tested it against an actual pedal(s). Use the option -M x or --midiskip=x to skip over 'x' pedals and connect to the next... midiskip.patch.txt

shooking commented 2 years ago

Hmmh I found something quite exciting (I think it is) - not sure if there is any way to communicate directly without these traceable tools in tow?

Anyhow 1] I know now Zoom call their ports [ 'ZOOM G Series', 'GCE-3', 'ZOOM G11', 'ZOOM H8', 'ZOOM G6' ] (hint if we can meet privately I can show you how I know)

Mixing topics (as I do) I completely understand why you call the IDs like "0x3000130" - sorry I simply didnt understand where I am sure you are getting that info from now!! Let's just say I would love to compare notes how you found it - cos I am surprised how I did!

It seems Zoom call this a "type" ... so I am happy to cal the botton 4 hex as the GID and the top as the FXID.

I feel some exciting GCE-3 related times coming along. I see the looper and rhythm isnt supported.

shooking commented 2 years ago

thanks for sorting this out. Closing.