Write to disk in VST or AU?


#1

Hi! I’m just getting started in developing a plugin and discovered that it was possible to convert a MAX/MSP patch to VST through max’s Gen~ and JUCE. However a lot of functions are disabled in Max when working towards the plugin-format. Amongst them is the write soundfile to disk. My vst will be a recording plugin to take the audio from a daw and write soundfiles in a specified folder on the computer. But I haven’t seen this in another vst and I wonder if someone could shed a light on this before I start banging my head against the wall, is it possible to write files to disk using the vst or au-format in a daw? Max’s way appears to be difficult to go down, I might have to partner up with a C++ master for this. Is JUCE the best way to use for this purpose? Thanks in advance!


#2

Yes, see https://docs.juce.com/master/classAudioFormatWriter_1_1ThreadedWriter.html which buffers audio data and writes it to disk (it can’t be written to a file directly from the audio thread, that might take too long). It shouldn’t be much work to add this to an existing JUCE plug-in.