Newbie seeks help

Hi, Ive been playing around in JUCE for a couple of weeks now, and have suceded in getting an app going with basic wav play back functions. I now want to start using the audioProcessor and audioProcessorGraph classes, but because I’m fairly new to c++ I’m finding extracting what I need from the demo sources very difficult.
I can see that i need to use a pair of audioGraphIOProcessors within the Graph to control input and output, and understand the concept of adding nodes, but I can not get my head round how to implement it. Would it be possible for someone to post the basic code for the creation of an AudioGraph, containing a couple of nodes? I dont need any of the actual dsp algorithms, as I have already designed those that i need.
Thanks in advance for any help offered, Doc.


same problem for me. Playing around with the AudioCallback is clear and works fine, but I don’t get the AudioProcessorGraph running.
The AudioPluginHost demo is quite complex and for starters hard to break down to the core of using AudioProcessorGraphs.
I thought, I could do with the following to just loopback input to output but it didn’t work (compiles and runs but the audio isn’t looped).

[code]class Player : public AudioProcessorPlayer
AudioDeviceManager audioDeviceManager;
AudioProcessorGraph* processorGraph;
AudioProcessorGraph::AudioGraphIOProcessor* inNode;
AudioProcessorGraph::AudioGraphIOProcessor* outNode;

processorGraph = new AudioProcessorGraph();

inNode = new AudioProcessorGraph::AudioGraphIOProcessor(AudioProcessorGraph::AudioGraphIOProcessor::audioInputNode);

outNode = new AudioProcessorGraph::AudioGraphIOProcessor(AudioProcessorGraph::AudioGraphIOProcessor::audioOutputNode);


const String error ( audioDeviceManager.initialise( 1, 1, 0, true, String::empty));

if (error.isNotEmpty())
  AlertWindow::showMessageBox( AlertWindow::WarningIcon,
                                                  T("Could not open an audio device!\n\n")+error );
   audioDeviceManager.setAudioCallback (this);


delete processorGraph;
So if anyone could give a short look and show me the (most probably obvious) error…



Ok, I tried a little more…
Giving the AudioProcessorPlayer my own written AudioProcessor to play works fine. The AudioGraphIOProcessors get added to the graph as I can see when calling processorGraph->getNumNodes(). But inNode and outNode don’t have any input or output channels, so I can’t connect them.
I understood that the AudioGraphIOProcessors provide the ins and outs from and to the graph, so should have at least so many in- and out-channels as are activated in the AudioDeviceManager.
Did I get something there totally wrong???
I could really need a hint, no matter how stupid my question may be, cause I’m totally stuck here :?:

I suppose they can’t know the number of ins and outs until you’ve actually started the device, so perhaps you should build the graph after the device is running?

Hi Jules,

I don’t understand that now. When giving the AudioProcessorPlayer a custom processor to play, which is created just at the same place as now the graph, all works fine. The number of channels of the buffer reached in to the processor is correct and changes when I (de-)activate some ins or outs with the audioDeviceManager. Shouldn’t the AudioGraphIOProcessors do the same and have a look at the buffer given to the graph by the processorPlayer???
My custom processor copied the first channel of the given buffer and in a loop over all channels in the buffer paste them there, so giving channel 1 in to all outs. Worked.

Thx for your help,

Sorry, I’m also confused by it now…!

This can’t be any hardware problem, can it? The audioPluginHost-Demo crashes, when I change the audio device to use my RME MADI Hammerfall ASIO driver. Unfortunately hadn’t had the time to debug this, but can give more details on tuesday.
So long any ideas for the channel-less AudioGraphIOProcessors are welcome :slight_smile:

Greets, Ingo

All right, seemed to be a problem of Visual Studio. I deleted the Debug-folder in my project and now the AudioGraphIOProcessors have the right number of channels. The in-node not having a input and the out-node vice versa is correct as I understand.

So I have two AudioGraphIOProcessors but I can’t connect them and AudioProcessorGraph::canConnect returns false…