What could be easier than building a huge lever that the singer can bend notes, open filters, start samples or sequences with? Well, it wasn’t that easy in the end but Gig Performer helped me make it.
Of course no one needs stuff like that, but it’s fun for showing off. To me it’s important that things like these are no fake but actually work.
Building the lever wasn’t too hard: a broom stick, a potentiometer, a spring, and an Arduino. Specific models can pretend to be a USB MIDI interface so you can use them directly in Gig Performer.
Unfortunately the used Arduino library doesn’t support pitch bend but only CC messages with their 7 bit resolution. 128 steps are not enough for smooth transitions,
but how to make use of the Arduino ADC’s 1024 possible values (10 bit) then?
I had to find some maths to encode the sensor values into two different CCs - one coarse value and one fine value. The maths are like this (Arduino code):
ScaledValCoarse = ScaledVal/64;
ScaledValFine = ScaledVal % ScaledValFine;
Thanks to a scriptlet, I can combine these two messages back into one higher resolution pitch bend message in Gig Performer. It will output the positive half of the pitch bend range, so it’s starting in the center:
var
PitchCoarse, PitchFine : Integer = 0
On ControlChangeEvent(c : ControlChangeMessage) Matching 14,15
If GetCCValue(c) == 14 then
PitchCoarse = GetCCValue(c)
Else
PitchFine = GetCCValue(c)
End
SendNow(MakePitchBendMessage(PitchCoarse*64+PitchFine+8192))
End
The result: It’s accurate, smooth, and fun…
By the way: Since I’m running a hot backup, in my case the Arduino is not connected to the Mac directly, but to a rackmount iConnectivity MIDI interface that can attach to my two hosts simultaneously. Apart from that, I don’t trust the Arduino’s micro USB connection on stage, of course. I’m really happy with cheap USB-to-RJ45 adapters so I can use a regular LAN cable between the lever and my rack.