Get audio output from synthetizer


#1

Hello,

I’m new to Juce … and I would like to know what is the best way to get the “audio” output from the synthetizer…
in order to record it eventually…

Thanks


#2

hmm you’re going to have to give more information than that! :slight_smile:

Do you mean the synthesiser class?


#3

Yes, the synthesiser class

I have a synthesiser object loaded with samplerSounds.
I would like to get the “Audio” output of the synthesiser to apply a filter on it or process it in realtime and record it eventually …

I guess I need to code that in the getNextAudioBlock methode or something like that…

Thanks for your help


#4

Well you need something to call that function (renderNextBlock) so that it will pass an audio buffer in, fill it with data and then move it somewhere else. The simplest way is to create an AudioDeviceManager. This will take care of the audio settings etc so all you have to do is create a callback function and register it with the ADM.

In there you’ll have your synthesiser class with renderNextBlock and using the parameters of the callback function (i.e the buffers and samplerate it provides). That should help you start at least! If you were making an audio plugin, it’d be easier to get something going.


#5

Hi,

My program is based on the demo (AudioSynthPage) so I have the AudioDeviceManager etc…
But I’m not sure how to do put a filter on the audio output… in order to record it after…

When you say " create a callback function and register it with the ADM" , I’m not sure what you mean and how to do that …
I know the “addAudioCallback” & “addMidiInputCallback” methods … but

Should I use the “addAudioCallback” methode ?
if yes I’ll need a other AudioIODeviceCallback object ?

Thanks