No Audio until Editor loads in DAW

JUCE 7 question
I have created a few basic plug-in VST3s. The VSTs produces no audio until the editor is displayed.

if the VST is setup on multiple tracks in a DAW, those tracks will produce no audio until you click on the VST to force it to draw. I have tested in Reaper and Cakewalk on PC.

Debugging shows the audio buffers are working but all samples are 0.0000f. Once the editor is loaded the samples begin showing the actual audio.

Not sure where to begin in fixing this issue.

Does the VST produce audio when you click the DAW’s play button (while the editor is not visible)?

No. As I stated, if I use the VST on any tracks they never produce audio until you click on the VST and the editor loads.

If this only happens when the VST is inserted on more than one track, it’s likely because you’re using global or static variables.

I probably have many global and static vars.

But it happens on a single track single instance. If the VST is not visible, no sound is produced. Buffers are all Zero’s.

Once the editor loads, I get sound from then on. If I have several VSTs running they are all silent until I visibly load the editor. Once loaded, the VSTs work normally from then on. Visible or not.

It is something Juce is doing right before the editor is loaded.

@kerfuffle Thanks for the help, much appreciated.

I do not have any Global or Static vars. I have public vars within the Processor that the editor can access.

I have found an older VST (different) that works correctly. I am now going thru the 1000’s of lines of code looking for something different between the two. Hoping you are correct with some kind of variable sharing issue.

But no luck so far.

It’s a little odd that you would have 1000s of lines of code and didn’t notice the problem when you didn’t have that much code yet. Was this code written by an AI?

The normal mode I run in is just this VST in a track all by itself. Once I get the track recorded, I render it and move the rendered track. I never use it in the mode it is failing. Until very recently.

I have written several much smaller VSTs that all work normally. It is this giant beast that is the problem.

To further confuse things: I recompiled some of my smaller VSTs that worked and now they dont work either. I am on Visual Studio 2022. I tried several versions of JUCE and none work.

So older VSTs work. New ones do not. All using the same code methods.

My next step is to redo my parameter code. Currently using ValueTrees. If that does not work I will move on to Visual Studio 2026 or go back to 2019. Or just delete all of my VSTs and forget I ever wanted to do this in the first place. LUL.

I just got an older (smaller) VST to work by redoing the parameter code. I modded my code to follow the tutorial code and it worked. I still need to do some testing but its a good start!!!

Scary how it worked for years then didn’t.

Note to self: NEVER UPDATE SOFTWARE IF IT IS WORKING.

Thanks Kerfuffle.