set midi channel of midi events with keystrokes

abducted

2011-04-13 09:30:08

hello,
Here is what I'd like to do :
I would like to use shortcuts on my pc keyboard to change the midi channel
of incoming midi events.
For example, when I press "7" on the pc keyboard, midi events received by translator (from any channel)
will be sent to midi channel 7 and channel 8 at the same time;
and when I press "9", events will be sent to channel 9 + channel 10.
Do you see what I mean?
Could someone explain me how to do this please?

edit : only the midi channel of note on/note off, modulation wheel, and pitch bend messages would be affected by this (the midi channel of control change messages would be unchanged)

Attigo

2011-04-26 23:37:34

Hi abducted,

You can do this with global variables. You should set up a preset that receives the keystrokes you want to change the MIDI channel and on those presses you can set the variable.

So if you press 7, you want this to set the global variables (2 because you are sending out on 2 channels) ga to 150 (that is decimal for the number 96 in hexadecimal which is the Note ON for MIDI channel 7) for and gb to 151 (same but channel 8). You now just have the variable in the position of the first byte of your outgoing MIDI message, for example your output would be:

ga 00 oo gb 00 oo

You need to send two output messages, one for each channel. oo is a local variable that just passes through the velocity message (0-127).

So once your global variables (channel selections) are set, and you trigger another preset that has the variables in the output, MT will send:

96 00 oo 97 00 oo

I hope you understand...

Scott

abducted

2011-05-02 10:39:58

thanks for the reply !
I had no time yet to try it, but I think I understand what you mean.
I have an other question please :
How the split a received chord into multiple midi channels?
For example, when translator receives a 3 note chord with notes like C-E-G,
it would send note C on channel 1, note E on channel 2 and note G on channel 3...

Attigo

2011-05-02 21:16:46

Hi abducted

You will need a translator for each note in, and just change the channel number on the output. Like this:

Code: Select all

[x] Translator 0: Note C
Incoming: MIDI B0 0C oo
Outgoing: MIDI B0 0C oo

[x] Translator 1: Note E
Incoming: MIDI B0 10 oo
Outgoing: MIDI B1 10 oo

[x] Translator 2: Note G
Incoming: MIDI B0 13 oo
Outgoing: MIDI B2 13 oo

0C is hexadecimal for C, 10 is hexadecimal for E and 13 is hexadecimal for G. This is what your note inputs should say, and I just assumed that your keyboard is sending on channel 1 in the first place (B0).

Hope this helps...

Scott

abducted

2011-05-03 20:10:52

thanks ! that helped me a bit but what I need to do is more difficult....
You see, I need translator to automatically detect any simultaneous notes and spread them over multiple midi channels .

But in fact midi notes from a chord aren't truly simultaneous, they are always one after an other (with a very small delay between them).

So the solution may be this :
Each new note received by translator should increase the number of the midi output channel until
it reaches channel 4 them go back to channel 1 , etc
Do you see what I mean?

for example
the first note received goes to channel 1
the 2nd to channel 2,
the 3rd to channel 3,
the 4th to channel 4,
the 5th to channel 1,
the 6th to channel 2, etc....

This would allow 4 note chords to be spread over 4 midi channels.

I'd like to know how to program this idea in translator please....

Attigo

2011-05-04 00:57:14

Ok, then you could do something with Global Variables. With each Note ON input, you just trigger a rule that does something like:

ga=ga+1

This way you will know how many Notes are on at one time. But remember to subtract on the Note OFFs too:

ga=ga-1

And on the outputs you just need to have the Channel and message type as the variable ga, such as:

ga 00 oo

This would give you value out as 00 00 oo, 01 00 oo, 02 00 oo and so on...

The hexadecimal number for Note ON messages is 90, which as a decimal is 144, so your default value for ga will need to be 144. so this will output a Note ON on Channel 1. Each channel above =(144 + how many channels above 1), ie Channel 3 is 146. You need to get a translator that sets ga as this on startup/launch:

ga=144

I hope this helps...

Scott

abducted

2011-05-06 10:16:38

ok, so I've tried this :

midi message trigger :

ga 39 pp


rules :

if pp=0 then exit rules, execute outgoing action
if gb=0 then gb=143
if gb=147 then gb=143
gb=gb+1



outgoing midi message:

gb 39 pp



So this translator works fine, but only for 1 note on the keyboard.
Each time I play this note, midi channel is increased until it reaches channel 4 then goes back to channel 1.

Do I have to make a translator for every note of the keyboard or can the note be a variable?

this would be something like this :

ga nn pp where nn would be the note, but it doesn't seem to work.

Attigo

2011-05-07 12:02:51

You will need a translator for each note you want to do this with...

Scott