output only when last button released

limitedheadroom

2013-05-01 04:43:46

Hi all,

I'm pretty new to MT and wonder if anyone here could help me with something that has to be possible, and not too hard, I just can't figure out the solution.

I have an effect that is triggered by receiving midi notes, there are 8 presets, each triggered by different MIDI notes in an octave. Preset 1, triggered by a C3 is effect bypass. Then a D3 will trigger preset 2 and so on up to preset 8 on C4. The presets latch, so if you play a note, you then have to play C3 again to revert to no effect (it only responds to note on). I am using Bomes to take CC messages from buttons my controller and send out notes. The buttons send 127 when pressed and 00 when released. I have 2 translators for each button, one sends the appropriate note on when the button is pressed, the other sends a C3 when the button is released. This way there is effect with my hand on a button, no efect when I release, so no more having to go back and play C3 to turn off the effect which is a big improvement. The problem I am trying to solve is this. If I hold button 1, it send out D3 and I get preset 2, if I then hold button 2 as well, it sends E3, preset 3, all good, until I take my finger off button 1. It then sends out a C3 and I get no effect, even though i still have my finger on button 2. I want to program Bomes so that it won't send out the C3 note until I have released my finger from ALL the buttons, and only at the time I take my finger off the last button. So if I am pressing the buttons in a legato style the effect keeps going.

I have been trying to do it with variables, eg. if ga>=1 then ignore outgoing action,on all the translators that send out the C3 on button release. But I can't figure out how to make this work so maybe I'm barking up the wrong tree, I feel like it must be quite simple to achieve.

I hope this all makes sense, I'd really appreciate any help.

Thanks.

DvlsAdvct

2013-05-01 13:04:30

Hi limitedheadroom

What you want to do is totally achievable, we just need to have the keys cross reference each other so they know more than one is being pressed at a time. What you should do is designate a global variable as a check, and we'll have it count based on every key you have pressed at once. And then we won't let the outgoing message send on release. For this example we'll use ga as our variable.

Code: Select all

Translator 1: D3 Press
Incoming Message: 90 41 7F
Rules: ga=ga+1
Outgoing Message: 90 41 7F

Translator 2: D3 Release
Incoming Message: 90 41 00
Rules: ga=ga-1
if ga>0 then exit rules, skip outgoing action
Outgoing Message: 90 40 7F

Translator 3: E3 Press
Incoming Message: 90 42 7F
Rules: ga=ga+1
Outgoing Message: 90 42 7F

Translator 4: E3 Release
Incoming MEssage: 90 42 00
Rules: ga=ga-1
if ga>0 then exit rules, skip outgoing action
90 40 7F
Make sense?

limitedheadroom

2013-05-03 15:30:26

That works a charm. I thought it was something to do with global variables, but I didn't realise you could make a rule like ga=ga+1 to alter the global value.

Thank you

DvlsAdvct

2013-05-03 19:02:41

Awesome :)