Can MT do this?

hungaristan

2010-08-11 15:07:47

Hi, I need to create some scripts to control Live and Ableton support recommended to check out MT as a possible solution. I read the relevant sections in the MT manual before installing it, but I'm still not sure if MT could do exactly what I need:

1.)
A set of translators which remap incoming MIDI Note numbers according to the following rules:

If the Incoming Note number is equal to a predefined value then a variable should be added to it (with an initial value of 1) and then the variable should increase by 1, until it reaches a preset maximum value, when it should get reset to 1 (just like an ordinary loop counter).

Here's an example:
Incoming Note # to watch for = 60
Number of steps in Loop = 8
Inital counter value = 1

Pressing Note # 60 on the MIDI keyboard for the first time should produce an Outgoing Note# 61, pressing it again will produce an Outgoing Note# 62 ... ... the 8th time it should be translated to Note# 68 and the next one should be 61 again etc.
------------------------------
2.)
Multiple instances of the same translator should run with different initial settings.
------------------------------
3.)
Translators should be recalled by Program Change messages

Can someone confirm if this is all possible in MT?

Attigo

2010-08-17 06:09:44

Hey Hungaristan,

This sure possible! And not too difficult either...

To add in a counter, you use simple rules that add to a 'Global Variable' until the limit is reached then reset it - Just ass you presumed. For the example I used the first Global Var, ga. This is initially set (as a decimal number in the rules, 96 is what 60 is in Hex). I am assuming your keyboard key that you want to use is 90 60 7F (80 60 00 OFF) and I have used the next key to reset the value back to your first state, 61.

Here is the Translators that make this up...

Code: Select all

Translator 0: Set Initial MIDI Note Value
Options: stop=false
Incoming: on activation of this preset
Rules: 
  ga=96
Outgoing: (none)

Translator 1: Step Up MIDI Note - Note ON
Options: stop=false
Incoming: MIDI 90 60 7F 
Rules: 
  ga=ga+1
  if ga>=105 then ga=97
Outgoing: MIDI 90 ga 7F 

Translator 2: Step Up MIDI Note - Note OFF
Options: stop=false
Incoming: MIDI 80 60 00 
Outgoing: MIDI 80 ga 00 

Translator 3: Reset MIDI Note Value Value
Options: stop=false
Incoming: MIDI 90 61 7F 
Rules: 
  ga=96
Outgoing: (none)
Have a try and let me know how it goes! I hope this helps...

Scott