Synthesizer Audio output buffer

Hi!

I need to “catch” the audio stream output from the synthesizer to be able to adjust the actual audio after the sythesizer… How to do that? I’m pretty new to JUCE. :slight_smile:

Thanks,
Masqutti

Hey Masqutti, you probably have the synthesiser output in the process block or similar, so just put your additional processing afterwards?

Ok, thanks for the tip… I just have synth[channel]->rendernNextBlock(…) there… How can I get the output to work with it? I didn’t find any method inside synthesizer class for it. :frowning:

Hey Masqutti, I’d recommend going through the tutorials!

https://www.juce.com/tutorials

1 Like

…what lessp tried to explain was: find the place, where your synth[channel]->rendernNextBlock(…) is called. After that you can apply an audio processor on that block afterwards:

// prerequisite:
ScopedPointer<AudioProcessor> myProcessor = new MySuperProcessorClass();
myProcessor->prepareToPlay (sampleRate, blocksize);

// where your synth is driven:
// (if no midi data is there, create some empty one:)
MidiBuffer midi;
synth[channel]->renderNextBlock (buffer, 0, buffer.getNumSamples());
myProcessor->processBlock (buffer, midi);

As alternative you can make up an AudioProcessorGraph and connect the processing chain there.

HTH

1 Like