Midi translating on release, not press

kvitamin

2009-01-06 20:45:17

As a test, I set up a simple translator, when you press one midi note "A", it will trigger 3 different notes "BCD". This pretty much works, except that BCD don't sound when I press A, only when I release A. Any thoughts on how I can make it on press?

florian

2009-01-13 12:21:29

Hi, the third value in a MIDI Note On message is the velocity. A velocity of 0 is equivalent to Note Off. Now you can set up a translator like this:

Incoming: MIDI 90 40 pp
Outgoing: MIDI 90 42 pp 90 45 pp

which will play two additional notes when pressing note 0x40.

If you continue to have this problem, could you copy/paste your preset? (in the Windows version, you can just copy some translators with the Translator menu and then paste here into the forums)

Thanks,
Florian

kvitamin

2009-02-19 23:33:50

hmmm, I replaced the last two digits 00, with PP but now it is triggering on press AND release. Here's the preset.

Translator 0 :test_up
Options: swallow,3 rules
Incoming: MIDI 99 2D PP
Rules:
g0=g0
g0=g0+32
if g0>127 then g0=127
Outgoing: MIDI B0 48 g0

Any thoughts?

florian

2009-02-20 12:17:45

I don't understand what you want to achieve... Your code will change controller 48hex to to an increasing value, maxing out at 127... whenever you press or release note 2D. You should evaluate the value of pp.

Translator 0 :test_up
Options: swallow,3 rules
Incoming: MIDI 99 2D PP
Rules:
if pp=0 then exit rules, do not execute action
g0=g0+32
if g0>127 then g0=127
Outgoing: MIDI B0 48 g0

Still I don't know what this is doing useful... if you wrote what exactly you try to achieve, I could help much better.

Anyway, hope that help!
Florian

kvitamin

2009-02-20 14:03:23

sorry, I'll elaborate. that is one of two translators that control a midi knob with two buttons. press one button and the value goes up, press the other and it goes down.

What I posted was the up preset. The function of the preset works perfect, my problem is when the preset occurs. When I leave off the velocity digits for the incoming midi message, the translation happens not when I press the button, but when I RELEASE it. And when I have the incoming midi with PP as the velocity, the translation happens twice, once when i press the midi and then also when i release the button

I just want it to happen once, when actually I press the midi button, not when I release it.

florian

2009-02-20 15:54:37

well, have you tried my fix with the "if pp=00..." line?

kvitamin

2009-02-20 21:37:10

just tried it, works perfectly.

Awesome.