JuceDemoPlugin AU doesn't produce any sound

Hi All:

I’m new here. I’ve downloaded the latest version of Juce and compiled JuceDemoPlugin in Xcode. Everything ok, except for the plugin itself. It shows ok in AULab, loads ok, but it doesn’t produce any sound output.

I’ve debugged and verified that the plugin was receiving midi note on messages (ok), and checked synth.renderNextBlock (buffer, midiMessages, 0, numSamples) [PluginProcessor.cpp:241]. Everything seems to be ok, the buffer seems to being filled with data [PluginProcessor.cpp:122] but for an unknown reason, I don’t have any audio output nor any level output reading from AULab meters.

I’ve tested other AU (NI FM8) and it works ok.

What could be happening?
Does somebody have a working AU simple synthesizer example code?

Thank you very much for any help.

My system: Macbook white 2.13 Ghz intel core 2 duo, osx 10.6.4, xcode 3.2.4.

Max

The demo isn’t marked as being a synth, so maybe AULab isn’t expecting it to make a noise (in the absence of any input signal, anyway). Maybe try changing that flag, or try another host!

I compiled with the following settings in JucePluginCharacteristics.h

[code]#define JucePlugin_Build_VST 0 // (If you change this value, you’ll also need to re-export the projects using the Jucer)
#define JucePlugin_Build_AU 1 // (If you change this value, you’ll also need to re-export the projects using the Jucer)
#define JucePlugin_Build_RTAS 0 // (If you change this value, you’ll also need to re-export the projects using the Jucer)

#define JucePlugin_Name “Juce Demo Plugin”
#define JucePlugin_Desc “Juce Demo Plugin”
#define JucePlugin_Manufacturer “Raw Material Software”
#define JucePlugin_ManufacturerCode ‘RawM’
#define JucePlugin_PluginCode ‘Jcdm’
#define JucePlugin_MaxNumInputChannels 0
#define JucePlugin_MaxNumOutputChannels 1
#define JucePlugin_PreferredChannelConfigurations {0, 1}, {0, 2}
#define JucePlugin_IsSynth 1 // IS SYNTH
#define JucePlugin_WantsMidiInput 1
#define JucePlugin_ProducesMidiOutput 0
#define JucePlugin_SilenceInProducesSilenceOut 0
#define JucePlugin_TailLengthSeconds 0
#define JucePlugin_EditorRequiresKeyboardFocus 1
#define JucePlugin_VersionCode 0x10000
#define JucePlugin_VersionString “1.0.0”
#define JucePlugin_VSTUniqueID JucePlugin_PluginCode
#define JucePlugin_VSTCategory kPlugCategSynth
#define JucePlugin_AUMainType kAudioUnitType_MusicDevice // ok, it appears in the list of AU
// #define JucePlugin_AUMainType kAudioUnitType_Generator // doesn’t work, no midi input
#define JucePlugin_AUSubType JucePlugin_PluginCode
#define JucePlugin_AUExportPrefix JuceDemoProjectAU
#define JucePlugin_AUExportPrefixQuoted “JuceDemoProjectAU”
#define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode
#define JucePlugin_CFBundleIdentifier com.rawmaterialsoftware.JuceDemoPlugin
#define JucePlugin_AUCocoaViewClassName JuceDemoProjectAU_V1
#define JucePlugin_RTASCategory ePlugInCategory_SWGenerators
#define JucePlugin_RTASManufacturerCode JucePlugin_ManufacturerCode
#define JucePlugin_RTASProductId JucePlugin_PluginCode
#define JUCE_ObjCExtraSuffix JuceDemoPlugin // stuff
#define JUCE_USE_VSTSDK_2_4 1[/code]

But no sound output anyway. I will try to traceback synth.renderNextBlock [PluginProcessor.cpp:241] to see if there is something :? .

Definitely try a different host before you burn a lot of time assuming that this is a problem caused by the plugin. AUlab can be a bit odd sometimes.

I know this is an old thread, but this issue still stands. It looks like the code below is executed after the the plugin has rendered its audio, but it should occur before. It only manifests itself in the AU plugin because the AU doesn’t have any input channels.

// In case we have more outputs than inputs, we'll clear any output // channels that didn't contain input data, (because these aren't // guaranteed to be empty - they may contain garbage). for (int i = getNumInputChannels(); i < getNumOutputChannels(); ++i) buffer.clear (i, 0, buffer.getNumSamples());

Looks like the code ultimately comes from in jucer_AudioPluginFilterTemplate.cpp.

[quote=“CowTipper”]I know this is an old thread, but this issue still stands. It looks like the code below is executed after the the plugin has rendered its audio, but it should occur before. It only manifests itself in the AU plugin because the AU doesn’t have any input channels.

// In case we have more outputs than inputs, we'll clear any output // channels that didn't contain input data, (because these aren't // guaranteed to be empty - they may contain garbage). for (int i = getNumInputChannels(); i < getNumOutputChannels(); ++i) buffer.clear (i, 0, buffer.getNumSamples());

Looks like the code ultimately comes from in jucer_AudioPluginFilterTemplate.cpp.[/quote]

The only purpose of that template code is to illustrate the fact that there may be different numbers of ins and outs, and to create a safe end-to-end plugin that won’t blow your ears off if you try to run it.

The whole method is supposed to be replaced with your own code… Should I make the comments more clear about that?

Hi Jules,

Yes, I think you should make this more clear. I just ran into the same problem. Took me one day to find the reason, because it was not that obvious, where to look at first. 

Yeah, I just scratched my head for a long time wondering why there was no output from my first plugin attempt. Once I found this thread, viola..