Plugin instance and its ProcessBlock method time

Hello dear colleagues.

As you know a plugin processor has processBlock method where all the magic happens.
And as I understand, the method triggering depends on your sound card interruption.

The question is:
I have several instances of my plugin in my DAW. Is it guaranteed that processBlock method of each plugin instance is executed at the same time?

Why I am asking: The instances of my plugins send information to a remote host where I have another plugin, and I want to synchronize processBlock execution with master and slave.

Thank you in advance.

What do you mean “at the same time”?

If the host does single-threaded processing, then the processBlock calls must happen one-after-the-other.

If the host does multi-threaded processing, then processBlock calls may happen simultaneously, but the starts of the blocks are unlikely to be synchronised in any way.

3 Likes

Quite the opposite I expect it’s very likely it will not be executed at the same time! Think about it, if one instance is after another then clearly the first one has to be processed before the second one can. If they are on separate channels, assuming they are being processed in parallel (far from a guarantee), then the chances they will be called at the same time seems unlikely, because at the very least it will depend on the time it takes for any processing that occurs before the plugin.

Then you also have to consider how your plugin responds when it’s being used for an offline bounce in which everything will basically happen as fast as it possibly can.

In other words there are rarely any guarantees.

1 Like

I run instrument plugin remotely. Let’s say, a kontakt player. From my master computer, inside my master plugin processor’s processBlock I am collecting midi events and send then to remote (slave) computer where my remote instrument plugin (host) has to process this midi events inside its processBlock and send audio buffer back to play in master. You may think of Vienna Ensemble Pro in this context.

So, I am trying to send a command to my slave host to trigger remote processBlock in order to sync master and remote processBlock methods.

If I get you correctly, I have to sync each master plugin instance to its corresponding remote processBlock?

You need to add a fifo buffer so it is filled independently of the processing time. There is no way it could be synchronised without locking and priority inversion, even relying on a network.