If/Then statements

SuperX7

2008-01-30 22:38:47

Hi guys,

First off, hello to everyone! :D

Im wondering if its possible, to set up If/Then statements to perform the following:

"If incoming note is equal to or higher than F#4, then keypress and hold T"

It is vital the the outgoing keypress is held, until another statement is satisfied (more variations of the above), in addition, if none of the statements are satisfied, then nothing is done. Im trying to get my head around this but having difficulty... Can any of you experts help? :|

EDIT: At the same time, if two conditions are met, then I need to be able to execute and keypress and hold command on two keys.

ARGG... EDIT2: They dont necessarily have to be keystrokes, can be Control values (>== 60) etc..

florian

2008-02-01 11:26:18

Hi,

yes, you can do such things with MT Pro. E.g. to respond to everything higher than use these translators:

Code: Select all

Translator 1:
INCOMING: 90 pp qq
RULES:
IF pp<78 THEN exit rules, do NOT execute Outgoing
IF qq=0 THEN exit rules, do NOT execute Outgoing
OUTGOING: Keystroke DOWN: T

Translator 2:
INCOMING: 90 pp qq
RULES:
IF pp<78 THEN exit rules, do NOT execute Outgoing
IF qq!=0 THEN exit rules, do NOT execute Outgoing
OUTGOING: Keystroke UP: T
Both translators will respond to any Note On messages from MIDI (on the first MIDI channel). The first parameter is the note number, which is set to pp. The second parameter is the velocity, which we assign to qq. Now the rules first check the note number: if it's smaller than 78, do not process this event. The second rule checks the velocity. Outgoing action is either pressing or releasing the key in question.

The same way you can do it for controller messages as incoming trigger.

Regards,
Florian

SuperX7

2008-02-01 21:05:47

Aha!

I didnt know we could put "90 pp qq" under incoming, d'oh!!!! No wonder I couldnt figure out how to do this.

Thank you Florian, you're a star! :mrgreen: