No matter how much I debug, I continue to have issues with dead nodes in AudioProcessorGraph, that is, nodes that don’t get any signal despite being connected correctly. Printing the graph’s connections shows they are correct. The wiring I use is a simple mixer metaphor. Each channel strip has
- a sequencer (midi source)
- an instrument
- zero or 1 insert effect
- Volume/Pan/AUX send processor (2 in , 4 out)
All channel strips feed into a master effect (master bus) and the side chain of (4) feeds to an AUX effect (reverb). Its output also goes to the master bus. The master effect then goes to the graph final output. So far so simple.
Whether the bug occurs (random instruments not audible) seems to depend on the sequence in which the connections are added. Sometimes adding/removing an insert effect from one strip makes a previously inaudible instrument on another strip audible again (?).
I would suspect there is a bug in the render sequence computation. Or I am missing something important. Does the sequence of connecting nodes really matter? Should I rebuild the entire mixer from scratch on every change? Do you experience similar issues? What is the best way to debug this apart from printing the graph (which I did)?
Thanks so much in advance. Really want to narrow this down.
P.S: I’m using v1.53.106
Is it the same dead node every time? Can you reproduce it reliably?
Start removing nodes that work until you have the smallest set of nodes that re-produces the problem.
Then see if you can replicate the bug in a simple test app.
I have a relatively complex graph representing audio tracks, auxs and a master and disconnecting and reconnecting nodes (multiple inserts and multiple aux sends) hasn’t been a problem for me.
Have you used any feedback loops? That’s the only case I know where the rendering algorithm fails…
Thanks for your suggestions. I managed to narrow down a bug in the Juce code now. It is very simple to reproduce, so I wonder how it could have been undiscovered for so long. You can reproduce the bug as follows.
Setup a graph like on the first image. Playing the “Kore Player” (or whatever synth you have at hand) produces the correct output.
Now connect the “Insert Effect” (AUDynamicsProcessor here) in the other channel strip as shown in the second image. This makes the synth node dead, i.e. no more sound. While the synth itself is playing fine, its output is no longer delivered to the final node.
Something in the sequence computation code seems to drop the last connection between “Kore Player” and “Audio Output” ? Probably because the “insert” is added late and not sorted correctly?
Man, this is a hefty bug. Hopefully this simple example will help to iron it out.
Can anyone confirm the bug?
I’d be very interested in getting this sorted out, because my rather simple mixer does not work currently.
I can confirm it.
I noticed this a while ago, but I really don’t remember how I managed to forget about it!
Can you test it in 1.52 and see if the bug still exists? Perhaps it was introduced with the “optimizations”.
If I remember correctly it was working fine before the optimizations.
Just tested in 1.52 and it seems to work fine.
The bug only occurs if the nodes are created and connected in a certain sequence:
- First “channel strip” with a synth and MIDI input.
- Second “channel strip” with a synth and one effect.
- Add a new node “insert fx”, remove direct connections from synth to effect and “insert” the new fx in between.
Step 3 introduces the bug, i.e. causes the render ops to mess up. No idea whether this can be easily fixed. Did not yet have a look at the render ops sorter. At least the bug is reproducable with a simple example now.
What version exactly introduced the “optimizations”? I’d like to temporarily return to that version of the graph code, because my product doesn’t work anymore. I also recon that Jules might not be amused about having an official release out that is broken.
Thanks for the pointer.
Anyone of the optimisers already had a chance to look into this? I find it very diffcult to wrap my head around the code, lacking a higher-level conceptual documentation.
This is still a problem? I thought Jules reverted the change and it made it go away…
Sorry to bump this again, but it is still an issue. And a very serious one, because it breaks any host that uses AudioProcessorGraph with a mixer metaphor (inserts, sends)
The steps to reproduce the bug are still valid (see Juce demo host setup picture above).
I find the Juce code for graph routing very hard to debug. Perhaps someone who is involved with it more deeply can give a hint how to fix this?
Thanks in advance.
Hi ans, I’ve tried to follow your steps but I can’t seem to reproduce this scenario with the Plugin Host. I’m on OSX 10.7 with near latest tip and I used Alchemy instead of Kore Player.
Does this bug happen for you with the same setup but different plugins? I’ve found some pretty bizarre behaviour with certain ones. For example the following graph produces audio from my mic if the buffer size > 1024. Alchemy doesn’t have a source connected and beyond that it doesn’t even offer an audio input.
Thanks so far everyone for your input. Unfortunately this is still broken.
I have now discovered a strange case that may or may not be directly related (Easy to reproduce:) Alchemy does immediately mute all other plug-ins when connected (see picture). This happens with VST only, both on Mac and Windows. AU works fine. There are other VST that behave the same: U-he Diva & Zebra, for instance.
Therefore, to answer your question Graeme, it seems this happens with certain VST only.
WTF? To me this always looked related to the “graph optimization” code, but why does the same setup work with AU? Isn’t the optimization algorithm ignorant of the plug-in format? And, if it’s not the algorithm, what is it then? Am I paranoid, or could this be a threading issue? How else would one plug-in block another?
What would be the best way to debug this? We really need to get this fixed. It renders the whole Juce library almost useless for hosting otherwise. Any further input is much apprecieated.
Great! Thanks chkn. The proposed fix does the trick. (phew) What a relief.
Did I ever say what a wonderful place this developer community is to be?
just wondering, isn’t this fix in the current tip?
I am still with a previous release, but loooking at the current tip, no. It’s not integrated yet.
Would be great if it was intergated.