# Making plugins using RNBO

**URL:** <https://qa.fmod.com/t/making-plugins-using-rnbo/21181>\
**Category:** FMOD Engine\
**Created:** [January 31, 2024, 8:57pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181 "2024-01-31T20:57:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![GiacomoF](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@GiacomoF](https://qa.fmod.com/u/GiacomoF)\
**Post date:** [January 31, 2024, 8:57pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/1 "2024-01-31T20:57:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [February 1, 2024, 1:41am UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/2 "2024-02-01T01:41:35Z")

</div>

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

- RNBO processes through a `RNBO::CoreObject`, which you could create inside a [`FMOD_DSP_CREATE_CALLBACK`](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_create_callback) and save to your [`FMOD_DSP_STATE::plugindata`](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_state).
- You would need to match that with a call to release the `RNBO::CoreObject` inside your [`FMOD_DSP_RELEASE_CALLBACK`](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_release_callback).
- To prepare RNBO for playback, you could call `RNBO::CoreObject::prepareToProcess` inside [`FMOD_DSP_RESET_CALLBACK`](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_reset_callback), passing in the sample rate from [`FMOD_DSP_STATE_FUNCTIONS::getsamplerate`](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_state_functions) and the block size from [`FMOD_DSP_STATE_FUNCTIONS::getblocksize`](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_state_functions).
- To process a block of audio you could call `RNBO::CoreObject::process` from the [`FMOD_DSP_PROCESS_CALLBACK`](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_process_callback). `SampleValue` appears to just be a pointer to an array of `double`s, and [`FMOD_DSP_BUFFER_ARRAY::buffers`](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_buffer_array) is a pointer to an array of floats, so you would need to convert FMOD’s `float` buffer into a `double` buffer before passing it to RNBO, and then convert the resulting `double` buffer from RNBO into a `float` buffer for FMOD to use.
- For getting and setting parameters, RNBO has `getParameterValue`/`setParameterValue`, which you could call from [`FMOD_DSP_SETPARAM_FLOAT_CALLBACK`](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_setparam_float_callback)/[`FMOD_DSP_GETPARAM_FLOAT_CALLBACK`](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_getparam_float_callback). You would need to declare each parameter in the [`FMOD_DSP_DESCRIPTION::paramdesc`](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_description) array.
- RNBO exports a patcher called `rnbo_source.cpp`, and a folder called `rnbo` containing the static RNBO library. There are no other libraries that need to be linked in, so the RNBO patch should be able to run on all of our supported platforms.

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.

---

<div class="post-metadata">

**Author:** ![GiacomoF](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@GiacomoF](https://qa.fmod.com/u/GiacomoF)\
**Post date:** [February 1, 2024, 6:55pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/3 "2024-02-01T18:55:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [February 1, 2024, 10:19pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/4 "2024-02-01T22:19:06Z")

</div>

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](https://fmod.com/docs/2.02/studio/fmod-studio-concepts.html#instruments), 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](https://fmod.com/docs/2.02/studio/fmod-studio-concepts.html#effects) 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](https://fmod.com/download#fmodengine) page. Please let me know if you run into any issues getting setup.

---

<div class="post-metadata">

**Author:** ![deHaan](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/dehaan/32/68_2.png) [@deHaan](https://qa.fmod.com/u/deHaan)\
**Post date:** [February 4, 2024, 1:32pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/5 "2024-02-04T13:32:19Z")

</div>

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 😃

---

<div class="post-metadata">

**Author:** ![GiacomoF](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@GiacomoF](https://qa.fmod.com/u/GiacomoF)\
**Post date:** [March 13, 2024, 11:39pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/6 "2024-03-13T23:39:07Z")

</div>

Hey Jeff,

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

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [March 26, 2024, 9:35pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/7 "2024-03-26T21:35:54Z")

</div>

Sorry for the delayed response- just got back from GDC.  
Maybe with Max you could do something with the [`vst~`](https://docs.cycling74.com/max8/refpages/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.

---

<div class="post-metadata">

**Author:** ![GiacomoF](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@GiacomoF](https://qa.fmod.com/u/GiacomoF)\
**Post date:** [April 2, 2024, 6:49pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/8 "2024-04-02T18:49:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [April 2, 2024, 9:58pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/9 "2024-04-02T21:58:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nicholas\_asitp](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@nicholas\_asitp](https://qa.fmod.com/u/nicholas_asitp)\
**Post date:** [April 12, 2024, 4:12pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/10 "2024-04-12T16:12:23Z")

</div>

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:

```auto
_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.

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [April 14, 2024, 11:44pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/11 "2024-04-14T23:44:26Z")

</div>

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`](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#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:

```cpp
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.

---

<div class="post-metadata">

**Author:** ![GiacomoF](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@GiacomoF](https://qa.fmod.com/u/GiacomoF)\
**Post date:** [April 15, 2024, 5:26pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/12 "2024-04-15T17:26:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nicholas\_asitp](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@nicholas\_asitp](https://qa.fmod.com/u/nicholas_asitp)\
**Post date:** [April 15, 2024, 8:39pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/13 "2024-04-15T20:39:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [April 15, 2024, 11:26pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/14 "2024-04-15T23:26:01Z")

</div>

Thanks for that, I can see it is crashing due to an access violation, 6 frames into your plugin’s [process callback](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_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”**.

---

<div class="post-metadata">

**Author:** ![nicholas\_asitp](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@nicholas\_asitp](https://qa.fmod.com/u/nicholas_asitp)\
**Post date:** [April 16, 2024, 12:15am UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/15 "2024-04-16T00:15:45Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![GiacomoF](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@GiacomoF](https://qa.fmod.com/u/GiacomoF)\
**Post date:** [September 10, 2024, 8:12pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/16 "2024-09-10T20:12:08Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [September 11, 2024, 12:14am UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/17 "2024-09-11T00:14:14Z")

</div>

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](https://fmod.com/download#fmodengine) section of our downloads page.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/9/9e3137ec7527d6c3534a4a777090cce6d012acef.png)

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](https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=msvc-170) guide
2. Open this file as an admin
3. Change your build configuration to “Release” and “x64” in the top left  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/8/80b44d5d701e41c79934b9cb3736b9d8ae2f18e2.png)
4. In the Solution Explorer on the left, right click on the “fmod\_rnbo” project and select _Set as Startup Project_  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/b/bf637b476ca07747f9c6821e8107b522130d62f2.png)
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  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/6/654d979afbcaa7beffd0beed6aa6d6de2e7dcf1c.png)
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](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/3/39d2594322be125851d61807d1607be9b4988ed6.png)
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](https://fmod.com/docs/2.02/studio/plugin-reference.html#loading-plug-ins), 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.

---

<div class="post-metadata">

**Author:** ![nicholas\_asitp](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@nicholas\_asitp](https://qa.fmod.com/u/nicholas_asitp)\
**Post date:** [September 11, 2024, 2:36am UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/18 "2024-09-11T02:36:18Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Capraise](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@Capraise](https://qa.fmod.com/u/Capraise)\
**Post date:** [February 8, 2025, 8:36am UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/19 "2025-02-08T08:36:57Z")

</div>

Completely missed this forum entry, but also last year, I made an RNBO wrapper for fmod. It’s not as neatly organised as this one from you, but for whoever is interested it can be found here: [https://github.com/JFuellem/RNBO-FMOD-Wrapper](https://github.com/JFuellem/RNBO-FMOD-Wrapper). Compared to the one in the examples, it also features the possibility to retrieve 3d-attributes like position or velocity back in rnbo and set other settings about the lifetime.  
The code is quite messy, but I lack the time currently to revisit it…

I also made this website: [plugincompiler.jrfsound.ch](https://plugincompiler.jrfsound.ch), where you can compile for different platforms and don’t have to bother with dependencies. As some things sometimes don’t work, it’s purely donation based aka free to use.

If there’s any feedback I’m of course glad to hear it.

---

<div class="post-metadata">

**Author:** ![GiacomoF](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@GiacomoF](https://qa.fmod.com/u/GiacomoF)\
**Post date:** [February 10, 2025, 5:54pm UTC](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/20 "2025-02-10T17:54:58Z")

</div>

Thank you for sharing this!  
I will try it out as soon as I can and report back

[Next page](https://qa.fmod.com/t/making-plugins-using-rnbo/21181.md?page=2)
