# Duration of overlap to trigger Legato?



## williemyers (May 7, 2013)

h'lo all,
a question that's always perplexed me?
using Kontakt 5 (full) as a plugin in DP (Digital Performer) 8, I get "Legato" by having the tail of the first note "overlap" the onset of the second note. 
what I don't know is, how much "overlap" is necessary to trigger "Legato"?
DP8 runs in "ticks" - usually 480 ticks/quarternote. So, if I've quantized heads & tails, I will then extend the durations by about 005 ticks, creating overlaps. 
But would the Kontakt 5 script be activated by as little as 5 ticks? Would it look for a bigger overlap? *OR*, will this vary from script to script and, as this info's not readily available from the developers (I've tried), how would I know how much overlap is needed to activate Legato?
many thanks for your thoughts


----------



## MozillaUser (May 9, 2013)

It depends on "who's saying"  Usually, the script must check if the old note is still present at the very moment of triggering - no matter how many ticks it will last afterwards. At least, that's how I do my scripting in this respect. In the Vienna Tool, the "script" checks - and the user can tweak it - even if the old note is NOT overlapping the new note: if the old note is gone longtime ago, it won't trigger any "legato" sequence, if the old note is gone within a certain time threshold, it will trigger the legato. From my point of view, this is a bogus and it harms more than it helps, but ... if they used to do things this way, I mentioned it here, since you asked this question.
Now...if we talk about "what must the ear actually hear? must an acoustic gap exist? must the old note and the new note acousticcaly overlap?" ... now this is completely another range of questions, and it largely depends on "which instrument you are scripting for". I guess Big Bob is the one to answer these, much more competent than I'll ever be.
Hope it helps,
Mozil


----------



## Big Bob (May 9, 2013)

I'm not exactly sure what you are trying to determine. The degree of overlap of notes required to trigger a legato effect will depend on the software that is providing the legato effect.

With a script-controlled legato, the process amounts to this:

Whenever a new note is detected ie whenever a new NCB (on note callback) is triggered, the script will immediately try to determine if there is still a prior note active. If so, and if the script operates in a mono mode, the prior note is terminated and the new note transition is made using the legato effect.

For the SIPS scripts, the overlap only need be a few milliseconds generally. But, if your reason for asking this question is to determine the minimum overlap you should provide in a MIDI sequence to guarantee that some script will see it as a legato connection request, the best way to find out would be empirically. Use some simple test sequence and start out with say a 50ms overlap. Then keep shortening the overlap until the legato effect becomes iffy. Then add some reasonable pad to this value.

Is there some reason why you can't use a generous overlap? I mean, why do you have to be stingy with the overlap? :roll: 

Rejoice,

Bob


----------



## williemyers (May 16, 2013)

Mozil & Bob, thank you so much for your detailed replies! It's clear that I didn't understand the "triggering Legato in Kontakt" process as well as I had thought that I did! More study, more study....
But BTW, Bob, in repsonse to "Is there some reason why you can't use a generous overlap? I mean, why do you have to be stingy with the overlap?', the answer would be that I have have to port my midi tracks over to a notation prog. (SIbelius/Finale), so it helps to keep note durations as accurate as possible and take a load off of the notation prog's "import" function.
Thanks again


----------

