Page 1 of 1

Help using global variables Traktor Pro / DDM4000

Posted: Fri Sep 05, 2008 12:53 am
by josephperkins
Right... I've finally got my DDM4000 which took a life time to arrive.

I've just moved to OZ and they seem to get things alot later than us brits.

I want to use the midi functions to control traktor 4 decks.

Richie Hawtin has a similar setup to what i'm trying to achieve. Stacked macros etc. One button to exit all loops, sync decks.

[/url] ... 539bda[url]

Behringer DDM4000 midi send chart here

[/url] My aim is to use a number of MT prese ... Dchild

Posted: Fri Sep 05, 2008 7:59 am
by ruediger
Hi Josehp,

thanks for trying Midi Translator on OS X.

You should use global variables to remember the State of the Decks and when you switch the preset ( = switch the deck ) you should send the state to the LED`s. So you can remember the previous state.

Beta 3 has no support for multiple Midi In / Midi Out Ports. We have the technology, but we have to implement that in the OS X version. Until we provide that in a new version, I think it will be hard to make to setup go work.

You need Midi In and 2 Midi Outs . One to the Unit back for LED´s and one to Traktor. Maybe you start with Windows and the beta release which has the functionality.

If you have purchased MT pro, I can send you a link!


Posted: Sun Nov 09, 2008 6:40 am
by josephperkins

Has this been implemented in beta 6? can you give me an example of how to use the global variables.

Posted: Sun Nov 09, 2008 12:16 pm
by ruediger

the MAC beta 6 has not the functionality of multiple Midi Ports.

You can use the global variables in the rules. They are starting from ga. You can see them in a drop down list.


Translator 1: New Translator
Options: stop=false
Incoming: MIDI oo pp qq
Outgoing: MIDI oo pp ga

You receive a midi message an save the values in local variables. Then you increment the global variable ga. In the outgoing midi message you can use the global variable again.


Posted: Mon Nov 24, 2008 4:41 pm
by florian
quick clarification: you can also use a global variable in the incoming MIDI message. But usually it makes more sense to use a local variable.


Posted: Tue May 05, 2009 12:02 pm
by josephperkins
Hi All

Could you please post a simple guide to using global variables.

I would like to create a number of presets to control the four decks in Traktor Pro. moving between presets will update the state of the LED's.

For example DECK A FX is on, moving to preset B (DECK B) FX is off - using the same LED.

I'm back on a PC now so using 1.7

I've found a few examples but can't get my head round it. A two preset example should be enough,

Question 2

I would like to scroll through MTP presets using two buttons.

moving forwards / backwards.

Preset 1,2,3,4,

Each preset will be used to control deck A-D

I would like the LED's to correspond with the selected preset.

LED 1,2,3,4, (The DDM4000 has a number of LED's labelled 1,2,3,4 which is perfect)

I've found an example which uses one button to scroll, but i would like to scroll backwards deck B to A.


Posted: Wed May 06, 2009 6:13 am
by josephperkins
looks like this will work for my second question...

BUT: How do i program this so that the midi note remains on. like a toggle.

How would the led's work? moving from preset 1 to preset 2 the leds need to update.

Code: Select all

Translator 1: Output NUM1 if ga=0 
INCOMING: MIDI <midi message for the MIDI button> 
 if ga!=0 then exit rules, do not execute action 

Translator 2: Output NUM1 if ga=1 
INCOMING: MIDI <midi message for the MIDI button> 
 if ga!=1 then exit rules, do not execute action 


Translator 5: Increment Counter 
INCOMING: MIDI <midi message for the MIDI button> 
 if ga>=4 then ga=0 
OUTGOING: <none> 

Posted: Thu May 07, 2009 12:53 pm
by ruediger

doesn´t look so bad.

Use Preset Change::Activate by Name/Number as outgoing action. In this preset you use translators with incoming Preset Change: On activation on this preset. There you can trigger the MIDI messages for led´s.

Best regards,

Posted: Thu May 07, 2009 11:49 pm
by josephperkins
Hey ruediger - Thanks for confirming.

Still a bit unsure how to use global variables so that switching between presets will update the state of the LED's

See question 1 in my previous post

Can you give an example - using two presets

Thanks alot for your help. And well done with the 1.7 update it rocks.

Can't wait for the osx release so i can go back to my MAC

Posted: Sat May 09, 2009 6:05 am
by josephperkins
I know the moderators are busy - Are there any other MT PRO users that would like to help me out.

This should get me going.

Two presets:

One button on my DDM4000 CC73 (toggle button)
The button can receive midi feedback on CC74

lets say preset 1 is activated - And button CC73 is pressed (Output message to toggle the LED on CC74
So the button is ON.

Activated preset 2 (Where button CC73 has been programed to output CC75)

LED should turn off because the button has not been pressed on Preset 2.

Let me know if this doesn't make sense -

Posted: Mon May 11, 2009 9:43 am
by josephperkins
now who wants to make a very frustrated man happy.

Posted: Wed May 13, 2009 9:41 am
by ruediger
Hey man,

that´s a pretty good explanation. Should work like this (not tested):

Code: Select all

Translator 1: LED ON / OFF
Options: stop=false
Incoming: MIDI CC 73 
  if ga==0 then Goto "labelLEDOFF"
  exit rules, execute Outgoing Action
  Label "labelLEDOFF"
Outgoing: MIDI CC qq 

With the global variable g0 you save the state of the button. In the local variable qq you say what the outgoing MIID message to the button is.

Hope that helps!


Posted: Thu May 14, 2009 9:25 am
by josephperkins
Hey rudi

How would this work with 2 presets?

can you explain whats happening after each line.

So the incoming message will be different.

Whats happening here qq=116 ? qq=117?

i'm using two presets so the same button has a dual purpose. i.e the same button outputs two different CC messages.

Sorry i'd just like to understand whats happening,

Can the same global variable be used for additional buttons?

Posted: Fri May 22, 2009 8:55 am
by ruediger

we don´t need two Presets anymore. It´s more simple in the example I have send to you.

I understood it like this:

You want to use the same button for different outgoing messages. So I use the global variable ga to achive this either or.

I explain my idea step by step:

ga = 0 at the beginning.

1. Then you press the button a first time.

Code: Select all

Incoming: MIDI CC 73 

Code: Select all

if ga==0 then Goto "labelLEDOFF" 
is fullfilled, so you jump to line:

Code: Select all

Label "labelLEDOFF" 
qq is set to 117 and ga is set to 1. OUtgoing midi message is then:

CC 75 (117 = Hex75)

2. Then you press the button a second time.

Code: Select all

Incoming: MIDI CC 73 
Then the first condition is not fullfilled and you set qq = 116 and ga back to 0.

The outgoing midi message is then:

CC 74

Next time you can go back to 1. then to 2. and so on.


Posted: Sat May 23, 2009 3:53 am
by josephperkins
Hi Rudi

Thanks for the step by step walk through. i don't think i was clear in my previous posts about what i want to achieve.

I use Traktor with four decks, and want to create a number of different presets as follows

Preset 1 - standard eq's (kill switches)
Preset 2 - Deck 1 - Cue points select (EQ kill buttons)
Preset 3 - Deck 2, as above
Preset 4 - Deck 3, as above
Preset 5 - Deck 4, as above

Now the DDM4000 supports midi feedback, so i want the LED's to update depending on what preset is selected. Some LED's are also dual colour

So preset 1 could be selected - The buttons will act as normal kill switches (eq mode).

Selecting preset 2 will send out 8 midi messages turning the 8 buttons leds on.

They will send different midi messages programed to select different cue points in traktor.

Now, moving back to preset 1 will update the LED's to their current EQ state.

I really need to understand how to save the LED state for each preset.

Posted: Wed Jun 10, 2009 8:46 am
by ruediger

sorry for the late reply.

Is this still an issue for you?

Best regards,

Posted: Thu Jun 11, 2009 12:45 pm
by josephperkins
Hey Rudi

I still need your help with this, did my previous post make sense?

Posted: Mon Jun 15, 2009 1:55 pm
by ruediger

hmm, I don´t understand what´s your problem with that. Take a global variable for each LED state you want to save. So if you sent out a LED state, save this value in a global variable. On reactivating this preset , send out all LED Midi messages out to the unit.

B0 g0
B0 g1
B0 g2

and so on.


Posted: Thu Jun 18, 2009 7:26 am
by josephperkins
Hi Rudi

Could you give an example? I understand what your saying but don't know to implement this?

Sorry :)

Posted: Fri Jun 19, 2009 7:09 am
by josephperkins
Rudi - Has kindly created a sample template for the above, Let me know if anyone wants it, I'll share my template once its working

Again Thanks Rudi

Re: Help using global variables Traktor Pro / DDM4000

Posted: Thu Aug 23, 2018 11:54 pm
by sjcaldwell

I'm currently trying to help someone with something similar here. Does anyone have a project file with any success that they have had in the past?


Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/SPAM