Script or Scriptlet for Latching Sounds

Hi all,

Just wondering if it was at all possible to create a script or scriptlet that works exactly like the latch function in Omnisphere. I tend to use that function a lot and would like that same functionality for other plugins.

If you don’t know how the Omnisphere latch function works it basically latches your notes and turns off those notes when you hit the latch button again.

My use case specifically is that I will latch a pad or arpeggiated sound then latch it. I will then cut off any “midi on notes” from reaching the plugin by using a midi filter so I can leave the pad/arp latched and I can play another patch over the latched patch.

With Scripting and AutoSustainer that is possible.

Try this:

[Gig] AutoSustain Scriptlet

So are you saying by modifying the script on AutoSustainer to fit my needs I can accomplish this? I did try that scriptlet but it’s meant to play new notes and turn off the old ones. I need the latch to work exactly like latching in Omnisphere by just holding out the chord, turn off “note on” via a filter and then I can play piano, etc over the latched pad or arp without reactivating or affecting the latched notes. Hopefully I’m making sense, I will see if I can find a youtube video showing this functionality in Omnisphere so you get a better idea of what I want to accomplish.

Here’s a pretty decent example. Fast forward to 2:10.

So for my understanding:

Latch means that all played notes keep playing until you press latch again.
This could be implemented by blocking the notes off message for a MIDI In Plugin when LATCH is enabled and then send all notes off for that plugin when LATCH is disabled

2 Likes

Ah! Don’t know why I didn’t think of that. I must have a mental block of some kind. I will experiment with that later. Thanks for your help. I’ll let you know how it turns out.

Try this:
ANO.gig (29.5 KB)

Just replace the GX-80 plugin with one you have.

1 Like

Thanks! Much appreciated!

So that was almost perfect. The only difference is that the Omnipshere latch function will also latch sounds that are currently being held out with the sustain pedal. So if I hit some notes and hold sustain down, then let go of the notes and still have the sustain pressed down to hold out the notes. Then I hit latch it will still latch the sound.

Not sure if it’s possible to make it happen that way but if it’s not what you provided was great and I can make that work. Thanks again!

Understand, now the widget when pressed of just sends All Notes Off.
Maybe a script which uses the AUTOSUSTAIN function would do the trick.
Or the All Notes Off message should only be sent when the sustain pedal is NOT pressed.
Let me think

1 Like

Try this, not perfect.
When you play notes while LATCH is enabled, they do not stop sounding when you stop play.
Now press sustain - while LATCH is enabled -
hold sustain, disable LATCH => the sound is not stopped until you release sustain.

Quick&Dirty and far from perfect.

ANO.gig (30.1 KB)

Another try
ANO2.gig (30.4 KB)

Another try
ANO3.gig (30.7 KB)

So it’s basically doing the opposite of what I would need it to do. How it needs to behave is as follows:

Play the notes
Press sustain
Release notes while holding sustain so it keeps playing
Enable latch
Release sustain
Notes stay latched

At the same time it would need to retain the current functionality which is
Play notes
Enable latch
Release notes
Notes stay latched

Also, I noticed in your latest one it does this thing where it increases the velocity of the notes to 100.

I appreciate your help. If this has gotten too complicated then I think the first one you created should suffice. Thanks!