Making plugins using RNBO

I am not a programmer (although I dabble and can read code decently). However I have lots of experience with Max.
Their new RNBO program looks interesting and I was wondering how doable it would be to construct a plugin for FMOD using RNBO and its C++ conversion feature.

Any insight would be much appreciated

1 Like

It looks like it should be possible to use the exported RNBO C++ artifacts inside an FMOD plugin.

So, you would still need to write an actual FMOD plugin and link in the RNBO C++ stuff yourself, but it looks like it should be totally doable to wrap an FMOD Plugin around a RNBO patch.

3 Likes

Thank you Jeff for the explainer. Now I need to figure out how to build an FMOD plugin from scratch ahahah

2 Likes

We have two example plugin projects in our Core API examples to help get you started. If your RNBO patch generates audio and you need it to behave like an FMOD instrument, then I would start with the fmod_noise example. If your RNBO patch requires audio input and you are needing something like an FMOD effect then the fmod_gain example would be more appropriate.
I would start by building either of those without any changes to verify everything is setup correctly, then add the RNBO stuff once you’ve got something running in FMOD Studio.
The Core API examples can be found in the FMOD Engine package on our Download page. Please let me know if you run into any issues getting setup.

1 Like

Very interested in RNBO and FMOD, seems lile it could have a lot of potential. It would be really awesome if there were any tutorials available. Looking forward to hearing more about your progress :smiley:

Hey Jeff,

is it possible to wrap free commercial VST dll’s and make them work in FMOD?

Sorry for the delayed response- just got back from GDC.
Maybe with Max you could do something with the vst~ node and export that to the as-of-yet theoretical FMOD RNBO plugin.
Otherwise, it is technically possible to make an FMOD DSP that calls into a vst’s processing functions, but it would be quite involved, and in either case your resulting FMOD DSP could only be run on Windows / Mac.

Thanks Jeff.
Is the compatibility with only desktop platforms true also if I were to make a vst from scratch through RNBO?

RNBO has the option to export source code, which should be portable to any platform, so a plugin made from scratch with RNBO should be able to run anywhere.

Hi Jeff,

I managed to get a generator RNBO plugin to work as an effect plugin in FMOD, but not as a generator like fmod_noise.

I’m not passing in any input to RNBO either way:

_rnboCore->process(nullptr, 0, _audioOutputs, channels, length);

all I did differently was changing the input number to 0 in FMOD_DSP_DESCRIPTION. For some reason, that crashes FMOD Studio when the plugin instrument is played.

It sounds like you are doing everything correctly, and I think I have found your call stack in our crash reporter.
It appears to be crashing when reading the minimum value of a float parameter. Can you please confirm that all of the float parameters you have defined in your FMOD_DSP_PARAMETER_DESC_FLOAT have valid floatdesc min and max values defined?
In the fmod_noise dsp example that would be the 5th argument of the FMOD_DSP_INIT_PARAMDESC_FLOAT call:

FMOD_DSP_INIT_PARAMDESC_FLOAT(
    p_level,
    "Level",
    "dB",
    "Gain in dB. -80 to 10. Default = 0",
    FMOD_NOISE_PARAM_GAIN_MIN, // possibly null
    FMOD_NOISE_PARAM_GAIN_MAX,
    FMOD_NOISE_PARAM_GAIN_DEFAULT
);

Otherwise, if you could please send feedback next time you get a crash, I should be able to search for your email address and know definitively that I am looking at the correct incident in our crash reporter.

Glad to see other people taking on the idea.
My work priorities have changed so I might not need to build my plugin anymore. However Id still love to try something in the near future.

1 Like

just sent the crash report (where can I find it locally? it’s not in the AppData\Local\FMOD Studio\CrashReports folder)

and yes, I have two float parameters. Both of them have the min max set

Thanks for that, I can see it is crashing due to an access violation, 6 frames into your plugin’s process callback. So possibly a nullptr being read, or out of bounds array/memory access.

Provided you have a debug version of the plugin, you should be able to attach a debugger to the FMOD Studio process, put a breakpoint in your process callback, and step through the first process call to see what’s going wrong.

The crash dump should just be in the root directory of “%LOCALAPPDATA%\FMOD Studio”.

@jeff_fmod Thanks for the help! It turns out the code needs to send the signals to some dummy buffer, which only gets allocated in prepareToProcess(), which is hooked up to the Reset callback as you said, and I assumed that it would always be called before it’s played, but it apparent doesn’t (but it did for the effect version??). To fix it, I just needed to explicitly call Reset in Create.

1 Like

Hey Nicholas,

do you think you could share with me, even privately, your first working plugin effect that you made from a RNBO export?

My coding skills are too limited for me to understand as of now how to make all the parts work. I tried for a couple of days using ChatGPT but could only get me so far. If you don’t want to, no problem, just thought I would try cause there isn’t anyone else on the web that has made something like this publicly available.

Thanks again :slight_smile:

For everyone’s information, we recently added a RNBO wrapper to our Core API examples.
You can download the Core API examples from the FMOD Engine section of our downloads page.

After installation, the Core API Examples can be found in “C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\examples\vs2019\examples.sln”.
If you aren’t familiar with Visual Studio, here are the steps to get the RNBO example building:

  1. Install Visual Studio following the Install C and C++ support in Visual Studio guide
  2. Open this file as an admin
  3. Change your build configuration to “Release” and “x64” in the top left
    image
  4. In the Solution Explorer on the left, right click on the “fmod_rnbo” project and select Set as Startup Project
  5. Right click on the “fmod_rnbo” project again and select Properties
  6. Go to Configuration Properties → C/C++ and add the rnbo and rnbo/common directories to the “Additional Include Directories” field
  7. Hit “Apply” and “Ok”
  8. Right click on the “fmod_rnbo” project and select Add → Existing Item
  9. Navigate to your RNBO source .cpp file, select it, and hit Add
  10. Do the same thing for the rbno/RNBO.cpp file
    image
  11. Hit F5 to build your project
  12. Ignore the error that pops up
  13. Navigate to "C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\core\examples\vs2019_builds\fmod_rnbo\Release\x64". The .dll file is the built plugin.

You can then copy the fmod_rnbo64.dll into your FMOD plugin directory, and use your exported RNBO patch inside FMOD Studio with Add Plug-in Instrument → FMOD → RNBO. You can build the FMOD plugin for any other platform by downloading the Core API examples for that platform and following these steps.

1 Like

hey sorry I totally missed your post! but thankfully ^ Jeff and the fmod folks just offered something that’s better than anything I could come up with!