USB Controller host Raspberry 3B+ with Boss GT-1

Started by niikkoo, June 03, 2021, 06:24:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

niikkoo

Hi All ,

i'm currently  working to build a USB controller Host  with Raspberry  in order to control  Boss Gt-1 with any midi  controller

main attented purpose is :
live set performing  , so no fine tuning with knobs, only  on off stomps , user banks , exp pedals
RPI : 3B+ tested ok  with OS Raspbian buster
script is based  on python  3.7+

update python to 3.7 : sudo python3.7 -m pip install pip

please install module required  for python :
- aio_usb_hotplug : https://package.wiki/aio-usb-hotplug
- trio :https://github.com/python-trio/trio
- configparser: https://pypi.org/project/configparser/
- mido : https://mido.readthedocs.io/en/latest/installing.html
- pandas  +numphy : https://pypi.org/project/pandas/

note:
python  3.7+ is using pip3 install module instead  of pip install , best is to use  sudo -H pip3 install "module name" to install it over all users  in your RPI
i call all my python scripts  with python3 instead of python to be sure  it is running whole python3 assemblies


How to get it work:
0- install all python  prequels  listed above (of course  :) )
1 - uncompress GT1-RPI-UHC.tar.gz  in your desired folder  in your /home/pi /..... folder
2- report your midi controller name with python script  ./GT1-RPI-UHC/ini_and_tools/get-MidiCtrlname.py
3- edit  userprefs.ini and replace  midi_ctrl entrie with wiht your midi controller name reported in step above
    replace rootpath  entrie with current location  for GT1-RPI-UHC folder
    rootpath must be enclosed by /
    each entry must be quoted with ''

4-report your GT1 VID/PID with python script  ./GT1-RPI-UHC/ini_and_tools/get-GT1-pid-vid.py
5- edit  userprefs.ini with with both  infos got for pid and vid , each entry must be quoted with ''


then midi CC mapping :

you will need  to  map your proper  midi CC , so you will need  :
1- report your midi CC infos  for each foot control  by running  script ./GT1-RPI-UHC/ini_and_tools/report-midiCC.py and note infos reported
eg: if i push my first foot controll it shows me  [176, 1, 127], i keep in mind 176, 1, 127

2- complete midi  mappings for each controller desired   in Midi-mapping.ini with each reported midi infos with report-midiCC.py
    value without quotes this time, but quotes empty midi vars with ''


auto run on session open  :
run.sh must be copied at same level as GT1-RPI-UHC folder

in terminal :
run crontab -e and select your favorite editor  if asked

at the end of crontab file,  copy  this command  and replace  with your located folder and point run.sh file
eg: my GT1-RPI-UHC folder is located in /home/pi/midi so i wrote :  @reboot /home/pi/midi/run.sh



self healing  on hotplug / plug off  GT1 usb:

script is detecting  your usb  GT1 because pid/vid  is referenced  in userprefs.ini
if your unplug GT1 usb script will be killed and then if you plugin back script will restart 

thanks to aio_usb_hotplug and trio module


script architecture :

run.sh launches main.py
main.py  manage MidiCTRL2GT1.py  by killing /reloading MidiCTRL2GT1.py script
MidiCTRL2GT1.py is  skeleton  of all things working  to controll midi input output based on sysex csv lib and ini files

sysx syslib:
i built  4 libs csv:  stomps,presets, expvol and expwah
each csv is referencing  sysex message for control
dont modify it if your are not  friendly  with sysex


Be carrefull with  python as it is case sensitive


Enjoy and dont be affraid to back to me  if you run with any issues , i will try  my best to help you



i want to give a special thank to Gumtown  and Elantric  whom helped me to understand sysex  and by providing me  Gumtown work with Fx-Floorboard GT1

joelquintel

#1
Thanks friend for the solution I'm new to the forum and with Raspberry, I would really like to make a usb controller for gt-1, I'm following your tutorial I would like to know if I can use the Raspberry pi zero instead of the Raspberry 3B+, thanks in advance.

mr_hollywood

This is really cool!!!
I'm trying something similar on Arduino, but just to change the curent patch. I can send the "F0 41 00 00 00 00 30 12 00 01 00 00 00 00 7F F7" binary message to select patch U1 via USB host sysex, and the GT-1 receives it, but it doesn't change patch. Any ideas? 

Elantric


gumtown

#4
Quote from: mr_hollywood on October 12, 2023, 11:00:31 AMThis is really cool!!!
I'm trying something similar on Arduino, but just to change the curent patch. I can send the "F0 41 00 00 00 00 30 12 00 01 00 00 00 00 7F F7" binary message to select patch U1 via USB host sysex, and the GT-1 receives it, but it doesn't change patch. Any ideas? 

GT-1 needs to be set to "Editor Mode" first.
the specific address for the GT-1 editor mode 'on' would be
F0 41 00 00 00 00 30 12 7F 00 00 01 01 7F F7

Then the GT-1 will respond to system exclusive messages for patch change, and will a patch 1lso send back patch data, knob changes, and parameter changes.

data for the first 4 patches is
F0 41 00 00 00 00 30 12 00 01 00 00 00 00 7F F7 = patch 1
F0 41 00 00 00 00 30 12 00 01 00 00 00 01 7E F7 = patch 2
F0 41 00 00 00 00 30 12 00 01 00 00 00 02 7D F7 = patch 3
F0 41 00 00 00 00 30 12 00 01 00 00 00 03 7C F7 = patch 4


Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/


mr_hollywood

Quote from: gumtown on October 12, 2023, 02:34:17 PMGT-1 needs to be set to "Editor Mode" first.
the specific address for the GT-1 editor mode 'on' would be
F0 41 00 00 00 00 30 12 7F 00 00 01 01 7F

Then the GT-1 will respond to system exclusive messages for patch change, and will a patch 1lso send back patch data, knob changes, and parameter changes.

data for the first 4 patches is
F0 41 00 00 00 00 30 12 00 01 00 00 00 00 7F F7 = patch 1
F0 41 00 00 00 00 30 12 00 01 00 00 00 01 7E F7 = patch 2
F0 41 00 00 00 00 30 12 00 01 00 00 00 02 7D F7 = patch 3
F0 41 00 00 00 00 30 12 00 01 00 00 00 03 7C F7 = patch 4


That's awesome! Thanks!!!

Do you know the code to turn off Editor mode?


gumtownadmin

#7
Not too sure on the checksum number, but it should be
F0 41 00 00 00 00 30 12 7F 00 00 01 00 00 F7
to switch Off Editor Mode.
Always remember that you are absolutely unique. Just like everyone else.

mr_hollywood

Works like a charm! Thank you so much for sharing this!!!

mr_hollywood

Does anyone know the code to turn CTL1 on and off?