Notifications
Clear all

MIDI tool for non-legato?

5 Posts
2 Users
0 Likes
179 Views
 vVVv
(@vvvv)
Eminent Member
Joined: 2 years ago
Posts: 16
Topic starter  

Is there a midi plugin/tool that can create a small gap (on the order of milliseconds) between monophonic notes in order to ensure that the notes do not overlap at all? Something that will cut the first note as soon as the 2nd note on is detected, then hold/delay that 2nd note just long enough to separate them? I have something going that gets completely botched when the notes overlap, so I need the slightest space in between them when performing to get the right effect.


   
Quote
(@getdunne)
Illustrious Member Admin
Joined: 5 years ago
Posts: 4410
 

I wasn't able to find a plug-in that does this (though I admit I didn't search very hard), but this is the sort of thing that can be done using the free Protoplug VST by OSAR: https://www.osar.fr/protoplug/

Here's a very simple Lua script that may do what you require (without the 2 ms gap, which I suspect you don't really need):

require "include/protoplug"

curNote = 0

function plugin.processBlock(samples, smax, midiBuf)
  blockEvents = {}

  for ev in midiBuf:eachEvent() do
    if ev:isNoteOn() then
      local offEv = midi.Event.noteOff(ev:getChannel(), curNote, 0)
      table.insert(blockEvents, offEv)
      curNote = ev:getNote()
    end
    local newEv = midi.Event(ev)
    table.insert(blockEvents, newEv)
  end

  midiBuf:clear()
  if #blockEvents>0 then
    for _,e in ipairs(blockEvents) do
      midiBuf:addEvent(e)
    end
  end
end

Save as e.g. mono-no-legato.lua in the Protoplug/ProtoplugFiles/midi-effects folder, open in Lua Protoplug Fx (x64) VST in a MIDI-effect slot in Unify.

I have attached an example patch for Unify: unzip, drag/drop the .unify file into Unify to load it, then Save to your User Library. (This patch has the script above in it, so you can use it even if you haven't saved the script separately in Protoplug/ProtoplugFiles/midi-effects.)


   
ReplyQuote
 vVVv
(@vvvv)
Eminent Member
Joined: 2 years ago
Posts: 16
Topic starter  

Thank you so much for this!

 

Oddly enough, just as I was about to test this out and opened my project file (in Nuendo), the MIDI modules I was testing worked as intended without needing to modify anything, so apparently I don't need to add that gap. I have no idea how it fixed itself though! 


   
ReplyQuote
 vVVv
(@vvvv)
Eminent Member
Joined: 2 years ago
Posts: 16
Topic starter  

Out of curiosity, what kind of things do you end up doing/making with the Protoplug? I am not familiar with it, but I need more MIDI problem solving tools for making certain compositional processes work.


   
ReplyQuote
(@getdunne)
Illustrious Member Admin
Joined: 5 years ago
Posts: 4410
 
Posted by: @vvvv

Out of curiosity, what kind of things do you end up doing/making with the Protoplug? I am not familiar with it, but I need more MIDI problem solving tools for making certain compositional processes work.

I'm not sure if you're asking me specifically, or everyone.

Personally, I don't use Protoplug at all, because I don't have time. I only suggested it because it's already available and free.


   
ReplyQuote
Share: