Assign range of MIDI input values to keystroke

kiirtan

2009-07-20 19:17:13

I want to be able to assign one knob to two different toggles on Ableton...

is there a way I can use Bome's to map the range of the knob to different states of a button on the client program?

For example:
Range 0 to 64 = Toggle 1 ON / Toggle 2 OFF
Range 32 to 96 = Both Toggles ON
Range 97 to 126 = Toggle 1 OFF / Toggle 2 ON

Thanks,
K

florian

2009-07-22 23:49:54

Sure! let's use g0 to remember if Toggle 1 is ON (i.e. g0=1), and g1 for Toggle 2. Otherwise we'd send repeated Toggle ON commands all the time (and toggle off, as well!).

We'll need to separate this by toggle function, so we need 4 translators:

Code: Select all

Translator 1: Toggle 1 ON
Incoming: MIDI: B0 01 pp
Rules:
 if pp>96 then exit rules, skip outgoing action
 if g0=1 then exit rules, skip outgoing action
 g0=1
Outgoing: Keystroke <Switch Toggle 1 to ON>

Translator 2: Toggle 1 OFF
Incoming: MIDI: B0 01 pp
Rules:
 if pp<=96 then exit rules, skip outgoing action
 if g0=0 then exit rules, skip outgoing action
 g0=0
Outgoing: Keystroke <Switch Toggle 1 to OFF>

Translator 3: Toggle 2 ON
Incoming: MIDI: B0 01 pp
Rules:
 if pp<32 then exit rules, skip outgoing action
 if g1=1 then exit rules, skip outgoing action
 g1=1
Outgoing: Keystroke <Switch Toggle 2 to ON>

Translator 4: Toggle 2 OFF
Incoming: MIDI: B0 01 pp
Rules:
 if pp>64 then exit rules, skip outgoing action
 if g1=0 then exit rules, skip outgoing action
 g1=0
Outgoing: Keystroke <Switch Toggle 2 to OFF>
If Toggling uses the same keystroke, just insert the same keystrokes in Translators 1/2, and 3/4, respectively. As an exercise to the user would then be an optimization to squeeze everything into two translators :) But you can also just leave it as it is. If it works, that is!

Regards,
Florian

kiirtan

2009-07-24 16:17:59

Thanks man! =)

I believe this only works on Pro, right? Well, I was thinking about aquiring it ... guess this just helps my decision.

florian

2009-07-31 14:50:04

Hi Kiirtan, indeed, rules are only available in the pro version...
Florian