MIDI channel variable problem

Vitja

2016-01-19 21:55:24

Hi!

Long time no posts, or better said - questions :)

I have a Korg nanoKontrol2 that I use to control my RME Fireface 800.
I have to simulate Mackie control to use it with RME.

So I have different buttons that pan and most importantly move the focus on RME by 8 channels left and right, so I can pan channels that are far apart.

I had this done before with too many translators and I decided to do some homework and use few translators to do this.
I kinda did it in some way but now I have a problem. Read on :)

My nanoKontrol has may different MIDI channels (that is because I used it before I tried this with MIDI Translator) and I don't want to change that.

I need MT to recognize a different buttons that have different MIDI channel and CC. For CC I figured out how to do it. But in some bizarre way I'm stuck with the channel.

Ok I have buttons>A 1. CH1, CC36, 2. CH1, CC37
B 3. CH1, CC38, 4. CH1, CC39
C 5. CH7, CC41, 6. CH7, CC61
So this buttons have to move the focus of RME Mackie control left and right, so I can Pan the RME channels (with this same buttons). The 3 columns A,B,C, are the 3 channels of RME that I pan with 2 buttons on nanoKontrol.

Column A have to move Left, B to the Right, and C to the Left. All this buttons are momentary. And I programmed that when panned I get a led feedback on that pan.

So far I have this code for left and right focus move:

Translator I - Move left

Code: Select all

Incoming: B0 tt pp 
Rules:
if tt==36 then h3=1
if tt==37 then h3=2
if h3==0 then exit rules, skip Outgoing Action
h3=0
if gi==2 then exit rules, skip Outgoing Action
if pp==0 then gi=2

Outgoing: 90 2e pp
Translator 2

Code: Select all

Incoming: B0 tt pp
Rules:
if tt==38 then h3=3
if tt==39 then h3=4
if tt==40 then h3=5
if tt==60 then h3=6
if h3==0 then exit rules, skip Outgoing Action
h3=0
if gi==1 then exit rules, skip Outgoing Action
if pp==0 then gi=1
Outgoing:90 2f pp
So If I want to do this with more buttons that are not on the MIDI channel 1 I need to do it like this: Incoming xx tt pp
And then do the same thing as I did with tt variable? I tried and I can't get it to work.

Then I experimented with just the variable on MIDi channel on the incoming MIDI, but somehow MT doesn't recognize the xx variable when xx tt pp. I tried to see if I use xx tt pp and then in rules: xx=g9 - so I could see in Log what channel each button is, but it seems not to work. I'm doing something wrong here.

I tried to find any posts here where you translate different incoming massages to the same thing. But I could not find it.

Any help would be very appreciated! Thanx!

Vitja

Vitja

2016-01-19 22:01:46

Oh, I forgot to mentioned that gi variable is there to prevent moving focus further. I need to move just 8 channels (that is 1x 90 2f pp) left or right. So this little trick prevents moving to channels I don't use. And I need to do this also for down and up. But for this I can use another translator. Anyway, It is much easier using just two translators to do this, because if I want to add some more channels to move to I can just add some numbers and don't worry about getting lost in 100 of translators.

DvlsAdvct

2016-01-20 03:46:36

Hi Vitja. So there's a lot here and I'm going to try and get through it.

First, I'd use the variables oo pp and qq for the three bytes. If you end up replacing the channel (which I think you're going to have to) then use oo for it. I'm not 100% sure why the xx isn't working, but I can't see your examples. It may have something to do with how you're defining the variable.

That leads me to the second point. I want you to make sure you're variable values are correct. For the channel, keep in mind that the Rule value for your channel and message type (CC Channel 1 or B0) is 176. Or, in the rules, you could type 0xB0. This would allow MT Pro to treat the Hex value as your intending. That might fix your issue.

It also might be easier, instead of funneling them all into two translators, just have different translators for each channel. That way you don't need to overcomplicate the rules, but you can still add only certain messages in when needed.

I'm assuming your h3 variable is used for LED feedback.

Also, keep in mind, that every time a button is pressed h3 will equal 0. You have no commands to pull the rules out, so when you press a button that triggers the chain (Say, CC 36 on Channel 1), it will set h3 to 1, then to 0, then continue the chain.

I'm also assuming you want the signal to not trigger if pp=0? It's hard to tell, because you have the same gi=1 message in both translators. Is that for something else?
J

Vitja

2016-01-20 11:34:02

OK. So I guess that I have no knowledge about MIDI channel values :oops:

I really haven't deal with this value until now. So I guess somewhere in the process, I was having some 1xx and up values.

No, h3 variable is for detecting CC numbers and if they match, then translator can execute outgoing action.

I have a bunch of translators to deal with Leds, and that would be ned homework to do.

I know I could deal with this problem with bunch of translators, but I had something like 16 translators in the beginning for this particular application. And if I was trying to add same functionality to another button, it was a nightmare to do it. First of all, I had to lear how I did it before and that was the biggest problem. In one translator I can clearly see, haw this thing works and it is just a mater of adding some more values.

Thanx for your answer DvlsAdvct!

I will post my code when finished.

Vitja

nonspacial33

2016-01-28 04:50:12

just a hunch but i reckon your problem is that 0x90 (hex) in decimal is 144. so note on channel 1 (0x90) is 144 note on channel 2 (0x91) is 145 note on channel 8 (0x97) is 151... subsequently note Offs starting 0x80 are 128+ so note Off channel 8 (0x87) is 135... hope that helps. in your rules you must use decimal unless you're using the new dropdown translators where channel 1 is 0 and 16 is 15, i've had to change a lot to make it work with the dropdowns.