laserbeak43
2005-09-22 19:48:30
hi i want to send a note on message with any note number on a certain channel with a velocity between 1-127. how would i go about doing this?
florian
2005-09-23 00:08:20
Hi,
Midi Translator expects "hexadecimal" notation. Hexadecimal is a number system where each digit has not only 10 but 16 different values. For the values 10 to 15 are used the letters A..F. So counting from 1 to 20 is like this:
dec hex
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 A
11 B
12 C
13 D
14 E
15 F
16 10
17 11
18 12
19 13
20 14
A note on message is three bytes, e.g.
90 40 7F
the first is the status:
9 0: the 9 means NOTE ON, the 0 means on MIDI channel 0. To play on channel 4 you need to use 93. Channel 16 is "9F" (always one less).
The second byte is the key. 40 hex is 64 decimal. The key number is from 00 to 7F (=127 decimal).
The last byte is the velocity. In the example it is the highest velocity 7F = 127 dec.
Pressing the help button in "Edit Translator" will give you a quick hex<->dec converter.
please provide me with more details if I misunderstood.
Florian
laserbeak43
2005-09-23 00:41:20
wow thanks for all that information but what i wanted to know is if i coulf set the key input so that it would accept any key from the specified channel withought having to make a new translation for evry key.
florian
2005-09-23 10:46:51
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
laserbeak43
2005-09-23 19:06:57
wicked! thanks i'll check it out!!