Singlepress, doublepress and modifier keys

Hi there!

I created some bindings which allows to fire different actions on singlepress, doublepress or on press with a modifier key.

Example:
Midibutton 1 singlepress: Start/Pause
Midibutton 1 doublepress: Stop

Midibutton 2 + Midibutton A: Select Rack 2 State A
Midibutton 2 + Midibutton B: Select Rack 2 State B
Midibutton 2 + Midibutton C: Select Rack 2 State C

The doublepress can also be used as a safety function: for preventing to accidently hit the “next song” button, assign it as a doublepress action and leave the singlepress action empty.

If someone is interested, I can share the files with the bindings for all that.

Greetings, Tom

4 Likes

Hi Tom,

that does sound interesting. I’d like a look at your files, please.
Cheers,
Neil

Me too please - I’m not sure how I’d use it in practice, but I’m interested to see how you’ve done it :relaxed:

Neil (the other one)

Just finished work for today :wink:

Ok, I have little time right now, but perhaps you cn figure it out how the binding stuff works.

DoublePress.cantabileSong (42.4 KB)
SecondFunction.cantabileSong (38.3 KB)

The main idea behind the doublepress functionality is, to enable a certain midi routing for an amount of time. When you press the same button a second time within that time range, it will get routed through the activated midi routing but on a different midi channel. The rest should be clear.

The idea behind the modifier key is to enable a midi routing with a unique target midi channel while the modifier key is pressed. That lets you choose different actions for one button which gets pressed while holding down the modifier key.
Another nice feature of this is that you can perform two actions simultaneously while holding down two modifier keys.

If you have any further questions, feel free to ask.

Greetings, Tom

6 Likes

could you explain a bit the structure and working of your files?

Greetings! I stumbled on this post as I was trying to make some MIDI bindings with a modifier key. Unfortunately OP never got back to posting about this one, and the files he kindly posted don’t reveal much since I don’t have the objects he’s calling.

But I poked around with this idea, and came up with a pretty workable solution. First I’ll talk generalities.

So, my solution was basically to take a given MIDI input source and run it through a rack that sits inbetween the origin input and where I want it to go. Sitting in this rack is a MIDI route that basically passes things unchanged, and another MIDI route that maps one MIDI channel to another. The first route is on, and the second is disabled. Then, in this rack, I bind one particular button from the midi controller to momentary toggle both routes.

You then only have to make sure that the bindings 1) listen to the output from that rack instead of directly from the midi controller and 2) listen to specific channels instead of omni.

OK, specifics time!
In my case, I used an Akai MIDIMix. This is a pretty powerful, inexpensive little controller - but it has a couple quirks. Still, I’ve found it very useful and highly recommended if you are ok getting your hands dirty. It’s quirks are gonna throw a couple wrenches in our plan. You can read more about it’s inner workings at the doc linked below.*

So, I wanted to use the various buttons (intended for Rec and Mute) to call up patches in a setlist, since my band does not do actual planned setlists. However, I wanted to be able to call up more than 16 different songs quickly, so I wanted essentially a “second layer,” bringing my total to 32. Conveniently, the Solo button already does something similar. Without this button pressed, the “mute” buttons send a note on channel 1 - WITH this button held down, the “mute” buttons now send the same note on channel 2. But, unfortunately, it does not effect the “rec arm” buttons. That’s where the rack comes into play.

So, in my case, I wanted all this in the background rack. So within the background rack, I made another rack that I pointed the MIDIMix to.

Inside that rack is one route that just patches the input to the output, and a second that does whatever modifications you want your “modifier” button to do. Bind enabling of both of these routes to the modifier button, and invert them. Making the binding momentary will vary depending on how your midi switch works. Since mine sends “note on” on press and “note off” on release, I used the “Note (Switch)” event type.

Now when you make your bindings, have the source be the output of that rack. In my case, since the hardware itself modifies the top row of buttons, anything from MIDI channel 1 I could leave unchanged. I’ll probably make them listen to the rack instead of the midi controller eventually, just for consistency sake. But for now it’s fine.

1 Like