Classic or Pro for special action on edges of cross fader?

florian

2009-05-03 19:19:34

Hi, a potential user of MT asked the following question:
What version for Windows do I need of Midi Translator for the following action:

I have a DJM-800 mixer which I want to use the cross fader to load the selected track to the left or right deck. I want the last say 5% left and 5% right to cause the "load" in the right or left deck. So basically I wish to have a small range of values to pass the proper midi signal to Serato. Would this be classic or Pro?
Thanks for the help!

florian

2009-05-03 19:36:28

the answer is, as often with relatively well defined translations, that you can do it with MT Classic, but you'll be much better off with Pro. Let me explain:

PRO
In Pro, you got "Rules", which enable you to directly implement your type of action:

I assume that the cross fader sends CC#1 on MIDI channel 1. Then create a new translator in MT with the following incoming action:

Code: Select all

Translator 1: load left
Incoming: MIDI B0 01 pp
So now, variable pp is initialized with the current value of the cross fader, e.g. 0 for left...64 center...127 right.

Now let's add the rules:

Code: Select all

Rules:
  gp = pp * 100
  gp = gp / 128
  if gp<=5 then exit rules, execute Outgoing Action
  exit rules, skip Outgoing Action
The first two rules calculate the percentage and store in (arbitrary) global variable gp. We use a global variable because we want to use them later on.
The third line is the "rulification" of your statement "last 5% left to cause the "load" command. This translator's outgoing action is only executed if the cross fader's value is less or equal than 5% of its entire range.
At last, we must tell MT to not execute the outgoing action otherwise.

Then, define the outgoing action:
Outgoing: Keystroke or MIDI message to load left deck
I don't know how you'd do that in Serato, but you should be able to find out.

Now for loading the right deck, we create another translator with the same incoming action, but just two rules:

Code: Select all

Rules:
  if gp >= 95 then exit rules, execute Outgoing Action
  exit rules, skip Outgoing Action
Here you can see that we re-use the value of the previously calculated percentage.

So the full preset look like this:

Code: Select all

Translator 1: load left
Incoming: MIDI B0 01 pp
Rules:
  gp = pp * 100
  gp = gp / 128
  if gp<=5 then exit rules, execute Outgoing Action
  exit rules, skip Outgoing Action
Outgoing: Keystroke or MIDI message to load left deck

Translator 2: load right
Incoming: MIDI B0 01 pp
Rules:
  if gp >= 95 then exit rules, execute Outgoing Action
  exit rules, skip Outgoing Action
Outgoing: Keystroke or MIDI message to load right deck
CLASSIC
Now with the classic edition, you cannot do any rules, so you'd need to manually enter all values that you want to translate:

Code: Select all

Translator 1: load left 1
Incoming: B0 01 00
Outgoing: keystroke/MIDI message for load left deck

Translator 2: load left 2
Incoming: B0 01 01
Outgoing: keystroke/MIDI message for load left deck

Translator 3: load left 3
Incoming: B0 01 02
Outgoing: keystroke/MIDI message for load left deck
...
So for every value in the 5% range, you need to create an own translator, also for the right deck. You'll end up with with 12 translators. Now imagine, you want to use 15%. In Pro, you just change 2 lines in the rules. In Classic, you'd need to add dozens of translators...

So, as far as this is concerned, Classic can do it, but clumsily. See the next post for an extra feature.

Florian

florian

2009-05-03 19:45:38

Now both solutions above have one problem: if you move the slider in the 5% edge range, it'll cause multiple "load deck" commands, as the slider value will always be in the 5% range, but when you change it, MT will issue a new outgoing action.

To fix this, you'll need the PRO to detect repeated actions. The clue is to check out what the percentage was when the last "slider move" MIDI message came in. Luckily, we used a global variable (gp) to remember the percentage, so we have it already. Just need to use it! So that it isn't overwritten when calculating the percentage, we use variable "gl" to store the last value:

Code: Select all

Translator 1: load left
Incoming: MIDI B0 01 pp
Rules:
  gl = gp
  gp = pp * 100
  gp = gp / 128
  if gl<=5 then exit rules, skip Outgoing Action
  if gp<=5 then exit rules, execute Outgoing Action
  exit rules, skip Outgoing Action
Outgoing: Keystroke or MIDI message to load left deck

Translator 2: load right
Incoming: MIDI B0 01 pp
Rules:
  if gl>=95 then exit rules, skip Outgoing Action
  if gp>=95 then exit rules, execute Outgoing Action
  exit rules, skip Outgoing Action
Outgoing: Keystroke or MIDI message to load right deck
As you can see, I just add a rule that prevents the load command if the last value has already been in the 5% edge range.

This type of enhanced logic is pretty much impossible with MT Classic. You could probably do it by using different presets but that would be getting a real mess.

Hope that helps!
Florian

Rossd

2009-05-03 21:33:11

Florian,
Very exciting. My partner and I have been working over the last two days to get this right. Let me give you the full concept.

***Updating this post to better reflect the concept***

Were somewhat old fashioned DJ's that play at pretty darn big clubs. We are just moving off of CD's. We believe we have a way to use our DJM800's and Serato with MT Pro in a manner which will allow us to not have to touch the computer while playing. A very exciting proposition. Here is the entire concept to add to your already terrific help.


1. XFader in middle position >=45%<=55%

2. Move Xfader to >=55 <=95% and send one keystoke (Shift-Right Arrow) to load track to deck B (of course xfader to = >=5% <=45% will send one to load track A)

3. Slide Xfdr to 95-100% or 0-5% sends keystroke "Ctrl(,)" (Original email to you) and 1st Beat is marked as Cue point.

Want to load a new track in A or B? Move XFader back and do steps 1-3 again...

Can you help work through this?

FYI, just bought my MT Pro to work as you help, two more license purchases from us on the way, I'm willing to bet a few more after that :-)

Ross

florian

2009-05-10 19:27:07

Hi Ross,

here it is, though it's not tested... please do so yourself and verify with the log if everything works as expected.

Code: Select all

Translator 1: Initialize variables
Options: stop=false
Incoming: MIDI B0 01 pp 
Rules: 
  gl=gp
  Label "gl is the previous percent position"
  gp=pp*100
  gp=gp/128
  Label "gp is the new percent position"
Outgoing: Keystroke: Shift(Left )

Translator 2: load A
Options: stop=false
Incoming: MIDI B0 01 pp 
Rules: 
  if gl<45 then exit rules, skip Outgoing Action
  if gl>55 then exit rules, skip Outgoing Action
  Label "now gl was in the center area"
  if gp<=5 then exit rules, skip Outgoing Action
  if gp>=45 then exit rules, skip Outgoing Action
  Label "now gp is in 5..45% range."
Outgoing: Keystroke: Shift(Left )

Translator 3: mark left cue point
Options: stop=false
Incoming: MIDI B0 01 pp 
Rules: 
  if gl<=5 then exit rules, skip Outgoing Action
  if gp<=5 then exit rules, execute Outgoing Action
  exit rules, skip Outgoing Action
Outgoing: Keystroke: Ctrl(, )

Translator 4: load B
Options: stop=false
Incoming: MIDI B0 01 pp 
Rules: 
  if gl<45 then exit rules, skip Outgoing Action
  if gl>55 then exit rules, skip Outgoing Action
  Label "now gl was in the center area"
  if gp>=95 then exit rules, skip Outgoing Action
  if gp<=55 then exit rules, skip Outgoing Action
  Label "now gp is in 55..95% range."
Outgoing: Keystroke: Shift(Right )

Translator 5: mark right cue point
Options: stop=false
Incoming: MIDI B0 01 pp 
Rules: 
  if gl>=95 then exit rules, skip Outgoing Action
  if gp>=95 then exit rules, execute Outgoing Action
  exit rules, skip Outgoing Action
Outgoing: Keystroke: Ctrl(, )
You can download this preset here:
http://www.bome.com/midi/translator/pre ... tures.bmtp

Regards,
Florian

Rossd

2009-05-10 20:10:20

Thank you, I look forward to getting home and trying this out.