Old note tails in new state

Hey All,

I received an email today from a user reporting that sometimes when a rack is unused between two songs, or perhaps when a plugin is suspended between two states, that tail sounds from plugin sound out when the plugin is reactivated.

This is a problem I’ve been aware of for a while where some plugins don’t reset all their sounds when the plugin is suspended and then resumed. As usual the VST spec says nothing about what the plugin should do in this case - so I can’t really blame the plugin, but the spec also doesn’t provide a clear way to force all sounds off (and not all plugins honour the MIDI messages for this either).

One idea I’ve had in the back of my mind for a while now is that when a plugin is suspended and after it’s been removed from the audio pipeline switch into an offline processing mode, send it all appropriate note/sound off MIDI messages and then process it until all tail sounds go silent. This would clean up it’s output for when it’s reactivated again.

Before I do this however I’m wondering if this particular problem is affecting anyone else? I’m reluctant to add it if it’s mostly a non-problem.

Brad

Interesting - I’ve noticed this occasionally on some plugins (can’t remember which now), but since I don’t tend to put suspend/resume plugins much during songs, I don’t think it really affects me personally, other than being a little occasional anomaly when setting stuff up. Having said that, it’s one of those things that would add a little confidence if it could be fixed.

Neil

1 Like

Hi brad, unfortunately i noticed this behaviour many times…

I often start with sound A in t0 like piano with sound B suspended like strings.
In t1 i resume sound B and piano together and switch continually from only piano to piano+string but i don’t know a way to start to hear string only when it is resumed so without tails born from suspended state.

It would be nice if you could find a way about it.

(thanks always for your patience and dedication to develop this software).

Andrew

Hi Andrew,

Have you tried disabling the MIDI or audio routes to switch sounds, instead of suspending/resuming plugins?

Neil

Ah, right! I try immediatelly…

Ok, i’ll explain better:

I’m sorry for the case i mentioned, the effective case i have noticed the tail is not with two plugins that have both midi inputs but with a single instrument with midi input and an effect with sound input that i bypass with a toggle pedal (with binding) when i don’t want it with instrument together.

In other words the schema is:
output keyboard -> input midi piano plugin
output sound piano plugin -> input delay effect plugin
output sound effect -> main speaker

then i use binding to toggle the bypass of effect but when i disable bypass i hear the tail of the effect on the last piano notes played.

Ok, that’s it :slight_smile:

The problem is the sound…not the midi events…i think

Are you keeping the effect plugin active while bypassing it, or do you disable it? I would expect the tail if you disable it, but not if you just bypass it.

You could also achieve the same by switching the route from your piano plugin either to the effect or to the main speaker - essentially doing the bypass with routes instead. But with either method you would need to keep the effect running.

Neil

I can’t disable the effect because the sound of piano would be stopped instantly. For this i use bypass.

I find two ways to solve this problem, one is to use two copy of the same piano plugin, one that go directly to speaker, the second go to the effect, and with the binding (at the bottom of image) to toggle bypass.

This is good to solve the problem but the presence of two identical instrument plugin is ugly.

The second way is to use 2 states, one with piano that go directly to the speaker…(this image A)

and the second with the same piano that go to the effect.…(this image B)

using a binding to pass from state 1 to state 2 and back (look in the bottom of image A and B)

@brad and other users, do you think these are good ways to solve the problem or do you know other solutions?

Than you all :slight_smile:

Andrew.

Your second way is generally how I do it. Although I would usually put the piano and effect in a rack and have the two states as rack states, to cut down song load times (reuse loaded plugins).

Neil

Hi Neil, do you mean that the second way uses too time during passing from state 1 to state 2?

Can you explain me the schema to use two rack states instead of my second way? I studied the mechanism of rack but in this case i wouldn’t know how to set my song properly.

if you can with a picture…this would help me a lot.

Thanks.

Hi Andrew,

my variant of your scenario would be to create TWO routes from your piano plugin Stereo Out:

  • one to Output Port - Main Speakers
  • another to Classic Delay 1 - Stereo In

Then set your Delay’s mix to 100% and control the delay level with the gain of the route from your piano to the delay. This gain parameter you can automate with song state, so that you can adjust the level of delay for every part of your song. Think of this route gain as your “Send level” and of your delay as a “send effect”.

Saves you having a lot of different settings in your delay with various degrees of “wet-ness”.

Other than that, I’d second @Neil_Durant’s suggestion to contain your sound-generating plugins (together with their specific insert effects) within racks so you can re-use them across songs.

To illustrate for your case:

  • put both your piano and your delay into a rack (“Piano rack”).
  • within the rack create a MIDI route from “Rack MIDI In” to your Piano’s MIDI In port
  • create your audio routes as above, except that instead of connecting to Output Port - Main Speakers, you connect to “Rack Stereo Out”
  • Now create one rack state with the route from your piano to the delay muted (either gain to -oo or by de-activating the route from the piano to the delay (keep the route from the piano directly to rack output active. Call this rack state “Piano dry”
  • Create another rack state with the route from your piano to the delay active (in addition to the route to rack stereo out). Set the gain level of this route to taste, so you have just enough delay. Call this state “Piano with delay”. Make sure that the state behavior for the route from piano to delay has “gain level” ticked!
  • Now in your song, for any song section, you can simply create a song state that selects one of your rack states for the piano rack (piano with delay for intro, piano dry for verse, …). I would name my song states after the song sections (intro, chorus, verse, solo) and for each, simply select the needed rack states for all of my racks

Just use your racks like you would use preset-based synths…

Cheers,

Torsten

1 Like

There’s nothing more I can add - @Torsten said what I was going to say, and more, clearer than I would have :relaxed:

Neil

1 Like

Hey Guys,

Build 3177 has some experimental code so that when a plugin is stopped it:

  1. Sends note off events for all currently held notes
  2. Send a All Sounds Off event on all 16 channels
  3. Processes audio until the plugin’s output goes to silence (or very close to silent anyway)

The main side effect might be a very small delay if you’re stopping many plugins - the actual delay will depend on the plugins in question, how long they take to go silent, how quickly they process audio etc… the plugins I tested with took between 4 and 20 ms to flush which I think is acceptable.

If you find unacceptable delays, send me a log file so I can check it out.

Brad

1 Like

Hi Brad, i didn’t dare to ask…you listened the voice in my mind. The three points you wrote are exactly what i was thinking to solve the problem completly.

Before test the solution of @Torsten i will test the last
Build then i will reply.

Absolutely correct and foundamental the third point you mentioned so in this way, if i suspend the effect the sound would not stopped instantly.

Thank you.

Hi Brad…i tried the build 3177 but…strange…i heard the sound stopped almost instantly…the set up is this with onscreen keyboard binding to toggle the suspend/resume property of the effect.

What am I doing wrong? :slight_smile:

Hi @Torsten, I tried your setup, i like it, better gain control during the performance but for my context it’s not perfect because, if the piano plugin has a reverb itself like church reverb, when i use the state that switch from “Piano dry” to “Piano with delay”, the natural reverb effect pass into the delay getting the tail effect again (main topic problem).
At this point also the second way i used and described, is wrong for the same reason.

So the mechanism of preventing midi events to go in wrong plugin, i think, could be better :slight_smile:
therefore the first way i used (two instance of piano plugin) is the nearest to the solution because there is a “physical” wall while switching from the first instance of piano (that goes to main speaker) and the second instance (that goes to delay effect).
What do you think?


To be more correct we need two states instead the binding that switch the bypass property:

  • one state with the first instance of piano enable and the second disabled
  • another state with the second instance of piano enable and the first disabled
    Switching between them i get a perfect flow midi event to the correct input midi plugin and then in the correct output.

The only ugly thing is the couple of instance.

Naaaaah, I don’t like the idea to use two piano plugins just to manage the effects. There is a far cleaner way to do this.

Then I suggest you do the same with your reverb as with the delay: keep your piano completely dry and use a separate plugin for reverb. Feed it with a separate “send” route from your piano. This way, you can create an individual mix of both effects for each state. If you do it this way, the reverb for the notes from “Piano dry” will decay for the previous notes, and the new notes played with “Piano with delay” will only get delay.

This is the reason why, if effects are such an essential part of your sounds, I would always keep sound generators and effects separate. Makes things so much easier and cleaner…

My setup would be:

  • put your piano, a reverb, and a delay into a rack. Keep the piano plugin completely dry
  • create three routes from your piano to rack stereo out, to reverb stereo in and to delay stereo in
  • connect the outputs of your delay and reverb to rack stereo out
  • keep the route from your piano to rack stereo out at 0dB at all times, mix your reverb and delay to taste for each state
  • e.g. for state “piano dry”, both sends are off; for state “piano with reverb”, only the send to your reverb is at, say, -12dB; for “piano with delay”, the send to your delay is at -6dB, etc.
  • if you want to go really crazy, you can even create a second route from your delay to your reverb and mix between dry and reverberated delay for those fancy “delay in a cathedral” sounds…

Done :smile:

And if you are looking for a nice reverb to add to your pianos: take a look at Valhalla VintageVerb: doesn’t cost a lot, but sounds very nice indeed. Great reverb to use live!

Cheers,

Torsten

1 Like

Your approach convinced me obviously :smile: :smile:
In that case i have not any kind of disturb over the clean piano sounds.

It was a test to see if you were clever…ahah no, i’m joking naturally, it was a good example for me and the other people to understand better the problem, its facets and make the solutions more clear.

Thank you for the setup explained and the plugin recommended, i will try tomorrow. :relaxed:

Andrew

Sorry, I wasn’t very clear on this. By processing until the plugin’s output goes to silent I mean that it’s done in the background. You won’t hear that output tail (it’s immediately discarded by the flush process). The idea is to simply flush the plugin’s output so it doesn’t sound out again when the plugin is resumed.

To be clear, when you suspend a plugin:

  1. Its output is soft-muted (to avoid clicks and glitches)
  2. Real-time audio processing stops calling the plugin
  3. The plugin is “flushed” (the three steps I described above)
  4. The plugin is told processing has finished

Now, next time the plugin is resumed there won’t be any left over held notes, sustain pedal, effect tails, release samples etc…

Ahh ok, understood! Perfect, perfect, thanks! You’ve been very clear!

Andrew. :relaxed:

1 Like