Page 1 of 1

Developer question: Controlling Giada with Pedal Board

Posted: Thu Jan 16, 2020 5:24 am
by aum108
Hi there,

I've bought a vintage pedal board, with 10 spring-loaded on-off switches, and want to drive Giada with it in home recording and live performance.

For the developers here, what would you advise as the ideal way to control aspects of Giada via pedal keystrokes? The kinds of things I'm wanting to do are:
  • single track -- mute, play, record, overdub, overwrite
  • multiple tracks -- turn a whole group of tracks on/off
  • switch between different song parts -- intro, verse, chorus, middle 8, breaks, outro
Given that Giada is based around FLTK, and that the simplest way of getting events to FLTK objects is via keystrokes, I thought to:
  • Get an old computer keyboard, and install its controller inside the pedal board case
  • Wire up each of the 10 switches to one of the keys on the keyboard
  • Patch Giada: write FLTK keyboard event handlers within Giada, to call routines in user-provided scripts, specified in Giada config; I was thinking of using a lightweight scripting language engine such as Lua, or possibly allowing user to provide a shared lib with C++ functions/methods
However, before going down that path, I thought I should check in with the Giada developers to see if there might be a better way of accomplishing this.

Bottom line is I want to be able to program different pedals to potentially achieve several different tasks at once.

Keen for your thoughts, folks


Re: Developer question: Controlling Giada with Pedal Board

Posted: Sat Jan 18, 2020 9:27 am
by FFT
Hi aum108,

Let me ask you a very dumb question first: what kind of signal does your vintage pedal board emit? Is it audio only? Any MIDI capabilities?

Re: Developer question: Controlling Giada with Pedal Board

Posted: Sat Jan 18, 2020 6:44 pm
by aum108
The board is a Roland FC-100 (mark 1). It has a pre-MIDI output, but there is literature on the net for ways to convert it to the electrical levels and connector compatible with MIDI with low parts count and light soldering/cabling effort.

On reading the manual, it appears the pedal's MIDI messages appear largely specific to Roland equipment -- lots of "System Exclusive" stuff. That's why I thought it might be simpler to just bypass the MIDI encoder and instead, encode keystrokes, which are much easier to feed into FLTK, and thus send directly into Giada's event stream.

However, if you can suggest an easier way to build functionality into Giada for arbitrary combinations of operations, driven by MIDI events, I'm all ears.


Re: Developer question: Controlling Giada with Pedal Board

Posted: Sat Jan 18, 2020 7:50 pm
by aum108
I've just thought of another approach.

I could install a Raspberry Pi into the pedal board, connect to the computer via ethernet networking. Then, a daemon on the Pi connects to a TCP socket that Giada has open on the computer. The packets would be very simple on-off messages such as "01=1\n" for "pedal 1 on", and "10=0\n" for "pedal 10 off" etc.

The question then is how to best feed these events into Giada's event handling framework. I haven't gone deeply enough into Giada's code to best figure this out, which is why I'm seeking ideas from the Giada developers.

Another approach is to build a "libGiada" framework. This would be an API which can connect to a live Giada instance and trigger its object methods. Then the question of how to interface the pedal board to it would be moot, since it would be up to whatever client program is linking to the libGiada API.

Any advice guys? I really need to sort this, because I need looping which can switch instantly between different groups of channels for part changes, and drive this from pedals not fingers. Also, it would add value to Giada to make it extensible like this.

Re: Developer question: Controlling Giada with Pedal Board

Posted: Tue Jan 21, 2020 10:03 am
by FFT
Ok, so the first thing I would do - before diving head first into the source code - is to check if the MIDI output of your pedal board works with Giada. It should be able to detect and handle any kind of MIDI input, even if Roland-specific.

You could try to learn those MIDI messages in Giada, as described here and see what happens. The MIDI learning capabilites in Giada should cover almost all your needs.

Let me know how it goes 😉