Legato

Tatsu

2012-01-29 02:20:36

Hi,

This is my first post.
Is making legato practicable with MT?
Legato means to extend a note's duration until just before the next note's starting position. Cubase has Legato command in the MIDI/Functions menu, but a DAW which I have been using doesn't have this function. By sending MIDI from the DAW to MT, and returning processed MIDI from MT to the DAW, it seems so close and yet so far.

Any suggestions would be appreciated.

Tatsu

DvlsAdvct

2012-01-29 02:26:34

Hi Tatsu

Unfortunately I don't know the answer to this. I have, however, passed this on to the guy who should have some sort of answer for you. If you haven't heard in a few days just respond and I'll chase him again. We're all busy people after all.

J

florian

2012-01-29 20:32:25

Hi, interesting question!

First, you should create a route in the MIDI router from the incoming MIDI port (e.g. MT Virtual 1) to the outgoing MIDI port (e.g. also MT Virtual 1).
Then, create a new preset. Open the preset properties and set the Preset Default Ports to the input and output port you'll be using, e.g. MT Virtual 1 for both.

Now add these three translator entries:

Code: Select all

Translator 0: Play pending Note Off
  Options: swallow=true, stop processing=false
  Incoming: MIDI 90 pp qq
  Rules: 
    Label "ignore Note Off"
    if qq==0 then exit rules, skip Outgoing Action
    Label "if no pending legato note, do not stop current legato note"
    if g0==0 then exit rules, skip Outgoing Action
    Label "reset pending note off"
    pp=g0
    g0=0
  Outgoing: MIDI 90 pp 00
Translator 1: Play new note
  Options: swallow=true, stop processing=false
  Incoming: MIDI 90 pp qq
  Rules: 
    Label "ignore Note Off"
    if qq==0 then exit rules, skip Outgoing Action
    Label "remember the currently playing note"
    g0=pp
  Outgoing: MIDI 90 pp qq
Translator 2: Swallow other Note Off
  Options: swallow=true, stop processing=false
  Incoming: MIDI 80 pp qq
  Outgoing: None
Both translators don't do anything for Note On with zero velocity (i.e. Note Off). The "normal" note off message is swallowed, too.

Now the first translator will check if there is a pending note in the global variable g0. If it is 0, the translator will bail out and not do anything.
Otherwise, it will set pp to g0 (so that pp has the note number of the pending Note Off), and reset g0 to 0. Then it will send out the MIDI message for Note Off, using the note number in pp and zero velocity.

The second translator will remember the note that is played in g0 and play the note.

This preset will also (inevitably) remove all polyphony: only the last note will sound.
And there is one flaw: you cannot stop the sound! (see next post).

Florian

florian

2012-01-29 20:38:00

In this post, I'll add a way to turn off the playing note by just hitting the last note again.

Code: Select all

Translator 0: Play pending Note Off
Options: stop=false
Incoming: MIDI 90 pp qq
Rules: 
  Label "ignore Note Off"
  if qq==0 then exit rules, skip Outgoing Action
  Label "if no pending legato note, do not stop current legato note"
  if g0==0 then exit rules, skip Outgoing Action
  Label "reset pending note off"
  pp=g0
Outgoing: MIDI 90 pp 00

Translator 1: Play new note
Options: stop=false
Incoming: MIDI 90 pp qq
Rules: 
  Label "ignore Note Off"
  if qq==0 then exit rules, skip Outgoing Action
  Label "if we trigger the last note again, do not play this note."
  if g0==pp then pp=0
  Label "remember the currently playing note"
  g0=pp
  if pp==0 then exit rules, skip Outgoing Action
Outgoing: MIDI 90 pp qq

Translator 2: Swallow other Note Off
Options: stop=false
Incoming: MIDI 80 pp qq
Outgoing: (none)
The main change is in the second translator entry, where it sets the note number pp to 0 if we retrigger the last note. Then g0 is set to 0, too, and in the last rule, the outgoing MIDI message is not sent if pp is 0.

Enjoy!
Florian

Tatsu

2012-01-30 15:50:00

florian and DvlsAdvct,

Thank you very much for your efforts. It worked!
I understood that MT can behave as if it were Cubase's Logical Editor or its MIDI Transformer plug-in. This is a matter of joy for many DAW users. I'd share this happy experience with my friends who are using the same DAW.

Before
Image

After
Image

One track on the DAW sent MIDI to MT and another track received MIDI from MT at the same time. The last note doesn't have note off, but it's no problem because I can split the note with the DAW. I'll try it further. About polyphony matter, I feel faintly sorry, but still much better off having this function.

Tatsu

florian

2012-01-30 22:15:52

Hi tatsu,

makes me happy, too!

which software are you using it with? Just curious -- and it's also for the users searching the web for this exact problem...

Thanks!
Florian

Tatsu

2012-01-31 14:20:22

I'm using Presonus Studio One which is a relatively new DAW developped by ex-Steinberg members.

Tatsu

florian

2012-01-31 20:30:46

ah interesting. I happen to know one of the Studio One engineers :)
Florian

reginator

2014-07-31 17:34:47

Hi,

I'm using MT Pro with Waldorf Microwave and it's superb! Now I'm trying to make a Legato Control mode to use with Cakewalk Sonar X3 but my note off command is 90 pp '00' and not 80 pp qq. For some reason I'm getting lost on how to adapt Florian's Legato Control code from the above posts to work with this type of note off command.
Any suggestions or help is much appreciated!

Cheers,
Reggie

florian

2015-01-10 03:07:36

Hi, sorry reginator that we oversaw this post! My preset works with both 90 and 80 style for Note Off.
Thanks,
Florian

reginator

2015-01-10 07:36:18

Hi Florian, yes I finally figured that out after some tinkering. :D
By the way, MT pro is a fantastic program - and a life saver!