No output when plugin is synth


Hi guys,

When I select the “Is a synth” checkbox in the projucer, my plugin don’t give any output.
When I unselect it, my synth gives output.

I have a very simple code right now to generate white noise (in the processBlock function):

for (int channel = 0; channel < totalNumInputChannels; ++channel)
    float* channelData = buffer.getWritePointer (channel);
    for (int i = 0;i<buffer.getNumSamples();i++){
        channelData[i] = ((float)rand()/RAND_MAX*2)-1;

I am using the standard template for an audio plugin.
Can anyone help me out?

Thank you


You are using the “totalNumInputChannels” for your outermost loop. If your synth doesn’t have any inputs, this will result in the loop not being run.

Change “totalNumInputChannels” to “totalNumOutputChannels” and you should be good.


And some more general advice: When something doesn’t work, your first response should be to USE YOUR DEBUGGER!

If you had stepped into this function you’d have immediately seen that it never entered the loop, so would have probably figured it out right away!


Thank you guys.
Jules, which debugger do you recommend?
I’m using Xcode for developing.


Then you just answered your own question!


Another tip: in the forum search type:
debug plugin xcode

Lots of valuable reads… :wink: