I'm writing a VST plugin using the JUCE library, and the way it is set up is that you can write a block of code to process buffers as they are fed to the program, one by one, meaning the program has no knowledge of anything else when processing audio other than a single buffer.

This doesn't work for me, because the processing I need to do depends on a stretch of audio a few seconds long.

Is this a super unorthodox thing to do? How can this be done using JUCE?

This is specifically what I'm trying to make.

  • $\begingroup$ I don't know JUCE at all, but I know streaming signal processing: having to save your own state between calls to a work() function is super common, and unless it's explicitly forbidden, yo can probably just use the tools of your programming language to have persistent storage (depending on the language, class members, globals, static variables...) $\endgroup$ Jul 1 '21 at 23:43
  • $\begingroup$ If you need such a period time of audio, you may save it in another buffer. It's not unorthodox but quite common. $\endgroup$
    – ZR Han
    Jul 2 '21 at 1:14

Is this a super unorthodox thing to do?

No. That's fairly normal thing to do. Many algorithms will actually be prototyped this way

How can this be done using JUCE?

Sorry, I don't know. You can try making the buffer size very large and just process one buffer, which saves you the work of doing state keeping.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.