mungewell / zoom-zt2

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

B1On testing - FX m OnOff == F0 52 00 65 31 ${hexFX} 00 ${OnOff} 00 F7 #23

Open shooking opened 3 years ago

shooking commented 3 years ago

I wish there was a wiki where we could add this stuff - but in the meantime.

#!/bin/bash
export MIDI_DEV=`amidi -l | grep ZOOM | awk '{print $2}'`

# expect FX-1..5 0|1 off|on
# ie 1 
#    2 
theFX=$1
oo=$2
theFXMod=$(($theFX-1))
hexFX=`printf "%02x" $theFXMod`
OnOff=`printf "%02x" $oo`
probeString="F0 52 00 65 31 ${hexFX} 00 ${OnOff} 00 F7"
echo ${probeString}
theFile=temp.$$
amidi -p ${MIDI_DEV} -S ${probeString} -r ${theFile} -t 1 ; hexdump -C ${theFile
}; rm ${theFile}

Usage

pi@raspberrypi:~/Software/ZoomPedalB1ON $ ./FXM_OnOff.sh 1 0
F0 52 00 65 31 00 00 00 00 F7

0 bytes read
pi@raspberrypi:~/Software/ZoomPedalB1ON $ ./FXM_OnOff.sh 1 1
F0 52 00 65 31 00 00 01 00 F7

0 bytes read
pi@raspberrypi:~/Software/ZoomPedalB1ON $ ./FXM_OnOff.sh 2 0
F0 52 00 65 31 01 00 00 00 F7

0 bytes read
pi@raspberrypi:~/Software/ZoomPedalB1ON $ ./FXM_OnOff.sh 3 0
F0 52 00 65 31 02 00 00 00 F7

0 bytes read
pi@raspberrypi:~/Software/ZoomPedalB1ON $ ./FXM_OnOff.sh 3 1
F0 52 00 65 31 02 00 01 00 F7

Turns FX on or off at slot M. B1on display is not so easy to see as the B1XFour