BORIS: a live-input granular plugin with RNBO and JUCE
Hello folks,
I post this here because (yep) I'm proud of my first audio plugin, made with RNBO and JUCE, but also because, when I started, I struggled with documentation and finding examples for what I needed. Since it's all open source and available on GitHub, maybe it can be useful to someone.
This is not only my first RNBO project, it's also my first C++ application, so I can't guarantee things are done the standard or the elegant way, but it does what expected and it does it quite smoothly.
The plugin is a live-input granulator. The granular engine is designed to be truly realtime: grains can begin playback as soon as the first input samples arrive, without waiting for a complete segment of audio. A margin is calculated dynamically in case of playback speed (pitch shift) > 1.
Also, start time, duration, and playback are accurate down to the single sample, ensuring clean, phase-coherent output. When used transparently, with no elaboration applied to the grains (except for envelope), the output resembles the source.
The dsp code can be found in /dsp/Granulator.cpp. It's being realized using code generated with RNBO as a basis, and still partially relies on the RNBO api. It's cleaner, more human readable and (much) more efficient, but the main structure is still there.
I'm happy to answer to doubts, take feedbacks and fix bugs :)