# Writing Custom Plug-In Instrument

**URL:** <https://qa.fmod.com/t/writing-custom-plug-in-instrument/23700>\
**Category:** FMOD Engine\
**Created:** [November 21, 2025, 9:12pm UTC](https://qa.fmod.com/t/writing-custom-plug-in-instrument/23700 "2025-11-21T21:12:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [November 28, 2025, 12:27am UTC](https://qa.fmod.com/t/writing-custom-plug-in-instrument/23700/2 "2025-11-28T00:27:57Z")

</div>

If you happen to be familiar with Max MSP, we have a C++ example for turning RNBO patches into DSPs, which might be a good starting point [Making plugins using RNBO - #17 by jeff\_fmod](https://qa.fmod.com/t/making-plugins-using-rnbo/21181/17).

If you want to tackle it yourself, the only real difference between an effect and an instrument in FMOD is the presence of an input buffer. If you report 0 input buffers and 1 output buffer for [`FMOD.DSP_DESCRIPTION.numinputbuffers`](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_description_numinputbuffers) and [`FMOD.DSP_DESCRIPTION.numoutputbuffers`](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_description_numoutputbuffers) respectively, FMOD Studio will treat it as a generator and allow you to place it in the timeline. The fmod\_noise example demonstrates this (and it sounds like you’ve already found it). With that as a base all you will need to do is:

- Replace the `FMODNoiseState::generate` method with an oscillator (replace the `rand` with `sinf` and give it different values over time)
- Expose frequency as a parameter

```cpp
FMOD_DSP_INIT_PARAMDESC_FLOAT(p_freq, "Frequency", "Hz", "Frequency", 60, 20000, 440);

```

- Make as many parameters and oscillators for each voice you want to support

With that, you can trigger your DSP as a [Plug-in Instrument](https://fmod.com/docs/2.02/studio/working-with-instruments.html#plug-in-instruments) and control the frequency with [Automation](https://fmod.com/docs/2.02/studio/glossary.html#automation).

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

---

_[View the full topic](https://qa.fmod.com/t/writing-custom-plug-in-instrument/23700)._
