Filter out double Note On message?

Whipsmack

2007-04-04 14:22:35

First off i'll just say this is a really nifty program and appears that it would be very powerful if I was any good at scripting :(

However i'm not good at scripting, I wouldn't even know where to begin. Anyways, my problem... I'm trying to have my keyboard send a keystroke right when I HIT the key. When I did this it would either send a double keystroke, one for on, and one for off. Or only an off....

My keyboard has velocity sensors so there are many many different ones to use, how can I make it so that it sends a keystroke in output only once when I hit the key, no matter how hard or how soft.

I noticed theres another post on this, and your response really lost me unfortunetly.

"ust for everyone else reading this question:
to trigger the Outgoing Action for any velocity, use a variable for the velocity:

Incoming: 90 40 pp

where 90 is the MIDI code for Note On on channel 1, 40 is the key number (a key somewhere in the middle of the keyboard), and pp is the velocity.

In order to separetely capture Note On and Note Off, there is a trick: Note Off is commonly sent as Note On with velocity 0. So for that, use a Translator before the Translator above: it captures the Note Off message:

Incoming: 90 40 00

By selecting "Stop Processing" (in the General tab), the MIDI message is "swallowed" so that it will not be executed by the following Note On Translator."

I don't know what you mean by using a variable for the velocity.

Thanks

Whipsmack

2007-04-04 14:39:30

HAH! okay I understand now especially after reading this...although a bit confused why I have to make an empty transalator, but it works! great program thanks!

"sure, that's what variables are for. Variables are oo, pp, ...
You can replace a number with a variable to catch all possible values for that number:

90 pp qq

will catch all NOTE ON messages on channel 1. You can use the variables in the outgoing message, too. E.g. Send controller 7 with the value of the velocity of the key:

B0 07 qq

Now there is one small problem: when the velocity (qq above) is 0, it means NOTE OFF. So the solution to exclude 0 from qq is to create a new Translator before your "real" translator and let it catch the message with 0 velocity. So, say you want to convert all key down messages to controller 7 messages, do it like this:

Translator 1:
General: Stop processing: yes
Incoming: 90 pp 00
Outgoing: nothing (or empty MIDI OUT field)

Translator 2:
General: Stop processing: yes
Incoming: 90 pp qq
Outgoing: B0 00 qq

Stop Processing means that Midi Translator will not continue with further Translators, even if their Incoming Action matches (otherwise you have Translator 1 and Translator 2 executed).

However, you can create multiple actions for one incoming message by creating 2 Translators with the same input action and unchecking the first Translator's "Stop Processing".

FLorian"

florian

2007-04-05 17:42:56

Hi Whipsmack,

great you found the solution yourself! With the Pro version of Midi Translator, you can do this without the awkward "empty" translator entry, by using a rule "if pp==0 then exit rules, do not execute outgoing action".

Florian