How to trigger on a range of incoming midi messages?

gabriels

2009-04-21 22:20:45

I'd like to trigger on CC messages from a range of controllers. For example:
I have switches that output 7F when pressed and 00 when released. They're not programmable so I'd like to use MT to change them so they send only 7F when pressed, then 00 when pressed again, then 7F etc.

I understand how to do the conversion from momentary to toggle, but I don't know how I can, for example, force switches 1 through 10 to be toggle, then allow switches 11-15 to act as momentaries, then force switches 16-20 to be toggles, etc.

So my problem is not knowing how to set the range of switches that should be processed with a mom->toggle conversion, and set the ranges for the ones that should be allowed to remain momentary.

I can imagine that I'd have a translator for each switch...executing if its particular CC# is matched, but it seems unlikely that I'd really have to go to this rather plodding approach.
Gabriel

ruediger

2009-04-24 17:12:11

Hi gabriels,
try this:

Code: Select all


Translator 1: 7f
Options: stop=false
Incoming: MIDI B0 47 7f 
Rules: 
  if ga==0 then Goto "label127"
  qq=127
  ga=0
  exit rules, execute Outgoing Action
  Label "label127"
  qq=0
  ga=1
Outgoing: MIDI B0 47 qq 
Best regards,
RĂ¼di

gabriels

2009-04-25 13:40:45

Hi Rudi,
I think you misinterpreted what I was having trouble with. I did notice the momentary->toggle conversion in an earlier post, and it does work nicely. What I can only do in an awkward way is to define which switches should remain momentary and which should be converted to toggle.

So, in my setup I have a bank of 96 switches. I want:
S0->S31 to be converted to toggle
S32->S36 to remain momentary
S37->S47 to be converted to toggle
S48->S63 to remain momentary
S64 to be converted to toggle
S65->S72 to remain momentary
etc.

I did another posting (sorry) where I listed an overly complex solution to my problem, hoping someone could show me a better way to do this
See:
Post subject: Definesinput range but seems overly complex. Please help
I didn't define the exact ranges above, but just gave a simpler example.
Can you refine this somewhat?
Thanks,
Gabriel

gabriels

2009-04-25 13:59:16

I revisited my other posting and recall, now, that it tries to accomplish something a bit different from what I'm trying in this post. Still, the intent is similar, and an answer to either would probably work in the other.
Thanks,
Gabriel