Can't wrap my head around this....

ferluno01

2013-11-06 05:34:44

Hey all, I'm basically a n00b at this so I'm sorry if this question has been answered before. I've searched the forums and also tried to figure out my issue for the past couple hours with no luck. Basically I have a Xone K2 and when I press a button on the controller it sends a push signal and when I release the button it sends a release signal. What I'm trying to do in Traktor is have the button glow red when I have filter off and then glow green when I turn filter on. Using the mapping in Traktor I am only able to have the button glow red but not switch to green so I'm trying to figure out a work around using Midi Translator which I already have setup for other LED functions. I figure the easiest way is to just map the outputs in MTP. Can anybody give me any advice or tell me how to just set a button to switch back and forth between 2 colors? Thanks in advance for any help.

DvlsAdvct

2013-11-06 06:12:13

Hi Ferlune

To do this you need to set your K2 up so it doesn't use any internal pages on the buttons. There are multiple modes, but the only way to have different colors is to set it so there are no pages used by the controller and instead it would all be handled by presets in MT or modifiers in Traktor. Does that make sense? If not I can dig into the A&H manual.

Thanks
Jared

ferluno01

2013-11-06 08:16:21

Hi Jared, thanks for the reply. As far as latching layers on the K2, I already had those turned off so the issue is in my mapping. I think Traktor doesn't like the fact that the K2 sends out a release signal and perhaps that's where my issue is, but I could be wrong. Basically there are 2 things at the moment I'm trying to figure out and it seems it might be easier to just create some Translator's in MT as I already have some setup and working. I tried going the modifier route in Traktor but that didn't work for me.

1. I want to create a Translator that will allow me to make a button switch back and forth from red to green to red to green etc etc. I tried and tried but I couldn't figure out the solution. I found this video http://www.youtube.com/watch?v=uxUskSSlw2k where he's scrolling through 3 colors but I don't know how he did it.

2. I want to create a Translator in which I can make a button one color when I turn a knob to the left, another color when it's in the middle at 12 O'clock and another color when I turn it to the right. In my mind I would do this by setting the output for a range of input signals coming from the knob but I don't know if there's a way for me to set a Translator for a range of input signals instead of just a single input signal. Is this possible?

Sorry if this is confusing. I can go into more detail if needed.

DvlsAdvct

2013-11-12 21:01:40

So sorry for the late reply, ferluno01, the email got buried in my inbox and it slipped my mind.

It all depends on the output options for the MIDI Output. You need to alternate the output value using the button press as the input. So you need a translator with the Input port being the K2 and the Output port being the K2. If you have the output values for the colors I can fine tune what's below. It would look something like:

Code: Select all

Translator 1: Color Alternate
Incoming Message: 90 00 7F
Rules: g0=g0+1
if g0>=2 then g0=0
if g0==0 then Goto "Red"
if g0==1 then Goto "Green"
Label "Red"
pp=1
Exit rules, execute outgoing action
Label "Green"
pp=2
Exit rules, execute outgoing action
Outgoing Action: 90 00 pp
That make sense?
J

ferluno01

2013-11-14 07:20:25

Hey, thanks for replying and no probs at all as far as the late response. So I gave it a shot but still no luck so I'll try to better explain what I'm seeing.

On Input when Capture Midi is checked:

On press of the button the midi in reads 9C 24 7F
When I release the button I get 8C 24 00

On Output:

To set the color of the button to red I have to set the output to 9C 24 7F
To set the color of the button to green I set it to 9C 6C 7F

Am I supposed to make 2 translators using the rules you posted, one for each color? Sorry for the noob questions but thanks for any help you can give me.

DvlsAdvct

2013-11-14 22:45:09

Oh that's my mistake. So don't worry about the release of the button. Instead, in the rules, change them to look like:

Code: Select all

Translator 1: Color Alternate
Incoming Message: 90 24 7F
Rules: g0=g0+1
if g0>=2 then g0=0
if g0==0 then Goto "Red"
if g0==1 then Goto "Green"
Label "Red"
pp=36
Exit rules, execute outgoing action
Label "Green"
pp=108
Exit rules, execute outgoing action
Outgoing Action: 90 pp 7F
You should only need the one translator, and it will cycle through the two colors. That makes sense.

ferluno01

2013-11-15 03:15:33

Jared, thanks a lot! This works perfect! Though, I'm still a bit confused by how the rules work. I was able to add the ability to toggle the 3rd color too but I just figured it out by deduction rather than comprehension. Anyway I appreciate all your help with getting this figured out.

DvlsAdvct

2013-11-15 03:37:19

So it's really simple, once you understand what the rules are doing. We have two variables being used: a global variable g0; and a local variable pp. Global variables are stored by Bome MIDI Translator and can be recalled. Local variables can only be calculated when the translator is triggered and are instantly forgotten. So, it doesn't matter what value pp was the last time you pressed the button, it only matters when you press it. That make sense? g0, on the other hand, can be added to every time the button is pressed because MT remembers what it was.

Whenever the button is pressed it is adding to the value of g0, and then changing the outgoing signal based on what g0's value is. When g0 reaches 2 (in my example, 3 in yours) it resets to 0 and keeps cycling. It looks a LOT more confusing than it is, but it's also a very streamlined method of calculating them. Let me know if you have any questions, though :)

ferluno01

2013-11-18 07:55:59

Well...I sorta see what you're saying lol. Thanks for helping explain it a bit better. :) I did noticed though some odd behavior. If I hit button 1 and it turned green and I hit it again it would turn red, then green, etc etc, no problems. But...if I hit button 1 and it turned green and then I hit a different button, when I would hit button 1 again it would stay green. I then had to hit button 1 again and only then would it turn red. (does that makes sense? lol) Same thing applied to any other button that I was setting up to cycle the colors for. Is this something I can fix where no matter what other buttons I hit the if the button is say green it will turn red the next time I hit it?

DvlsAdvct

2013-11-18 17:43:25

Do you have those rules in each translator? They should only be in the first. If you want a different button to cycle colors the translator needs a different global variable. Instead of g0, g1, or g2 or g3.

The available global variables are:

g0, g1, g2...g9, ga, gb, gc...gy, gz

and you can use g, h, i, j, k, l, m, n, y, z

Make sense?

ferluno01

2013-11-18 17:58:32

OHH! well that makes sense now. I'm not home at the moment but will give it a shot later on after work. Thanks for this, this is going to fix the issue cause I was using the same rules for each translator...Still lots to learn. :)

DvlsAdvct

2013-11-18 18:26:11

It's a long process. It wasn't that long ago that I had no idea how any of this worked. :)