Accessing Audio Data from Demo Plugin Host


I am working on a project which requires me to record audio data as .wav files(of 1 second each) from a MIDI Synth plugin loaded in the JUCE Demo Audio Plugin host. Basically, I need to create a dataset automatically (corresponding to different parameter configurations) from the MIDI Synth.

Will I have to send MIDI Note On/Off messages to generate audio data? Or is there a better way of getting audio data?

AudioBuffer<FloatType> getBusBuffer (AudioBuffer<FloatType>& processBlockBuffer) const

Is this the function which will solve my needs? If yes, how would I store the data? If not, could someone please guide me to the right function/solution.
Thank you.


Obviously, if you are hosting a plugin instrument, you will need to send it MIDI data in order to produce audio.

If you only need to host one instrument plugin, it might be easier to just do your application from scratch, rather than trying to modify the JUCE plugin host demo application. The JUCE plugin host has not been designed for batch offline rendering purposes, you might need to make quite extensive modifications/additions to it to enable that.