Cascading plug-in tutorial - issue regarding convert to application

Hi there

I’m finding a couple of issues with the “Convert the plugin into an application” section of the “Cascading plug-in effects” tutorial:

https://docs.juce.com/master/tutorial_audio_processor_graph.html

There are two things:

a) Nasty oscillator on start up/first use
When I run it based on the completed converted code (AudioProcessorGraphTutorial_02.h) and apply an Oscillator I get a gnarly distorted tone. Switch it to (for example) Gain, and then back again and I get the expected nice clean Sine wave tone.
This issue is replicable for me on MacOS, iOS and Windows. I’ve tried a few things but haven’t yet managed to solve it.

b) Missing “Empty” from the selection
Unlike the plugin version, the application version doesn’t start up with Empty for each of the slots. In fact there’s no option for it. To fix this I did the following:

Line 448 change to: (adding Empty as an option)
juce::StringArray processorChoices { "Empty", "Oscillator", "Gain", "Filter" };

Lines 320, 329, 342, 355 change: (offsetting the drop down selection behaviour)
else if (choice->getSelectedId() == . . .
to
else if (choice->getSelectedId()-1 == . . .

Line 211 insert: (preselecting Empty as the start up choice)
processorSlot1.setSelectedId(1);
processorSlot2.setSelectedId(1);
processorSlot3.setSelectedId(1);

I hope my part b) section is of some help. As for a), the Oscillator issue itself, it would be great to get some thoughts on how best to fix this please.

Cheers

Jeff

1 Like

Hey there, has anyone got any thoughts on this please?
As JUCE tutorials go this one was a little bit confusing/frustrating in this regard. @t0m might it be worth addressing?

Cheers

Jeff

Hi. Did you ever figure out the cause of the distorted tone? I’m getting this when I try this tutorial, but also in my own project using the audio graph. I was hoping this tutorial would help me fix this but it seems to have the same problem!

Hey @japatchett I don’t believe I ever did get to the bottom of this one actually. I remember it being pretty frustrating at the time. Be good to know what was going on!

I didn’t. I gave up in the end and just made an audioprocessor who’s only job was to host a single VST and got processBlock to hand the buffer to the VST. Worked perfectly. I managed to sort of reproduce the problem by double processing so I sent the block to the VST twice. I suspect that’s what’s going on inside the audio graph. Oh well.

1 Like