RNBO is MaxMSP's new audio engine that allows you to export your Max patches as C++ code. This repository contains a GDExtension that allows you to use these exports in Godot as a stream or audio effect.
- Godot 4.0 or later
- C++ compiler (e.g. GCC, Clang, MSVC)
- SConstruct
- Clone this repository with
git clone --recurse-submodules - Export RNBO C++ Source Code in
rnbo-srcfolder- Ensure
Copy C++ library codeis checked in the export settings if you're exporting it for the first time.
- Ensure
- Comment all exception throws in rnbo source code (search throw in all sources)
- Godot does not support exceptions, so you need to comment them out. This is common in game engines for performance reasons.
- This is required for the first time you export the RNBO patch. For consequtive exports disable the
Copy C++ library codeoption in the export settings.
- Build the GDExtension with SConstruct
- Copy demo/addons folder to your Godot project
RNBO Effect is a GDExtension that allows you to use RNBO patches as audio effects in Godot. It is a subclass of AudioEffect and can be used in the same way as any other audio effect in Godot.
In RNBO you can get audio input using in~ 0 and in~ 1 (left and right channel respectively) and send audio output using out~ 0 and out~ 1.
You can use AudioStreamPlayer2D or AudioStreamPlayer3D to play RNBO stream. Add RNBOStream as a stream to the AudioStreamPlayer2D or AudioStreamPlayer3D node.
If you set playing to true, RNBOStream will send 1 to param play in the RNBO patch.
If you set param stop to 1 in RNBO patch, the stream will stop playing in Godot.
All parameters in the RNBO patch will be automatically exposed in Godot editor (except play and stop parameters). You can access all parameters you created in the RNBO patch using the same way you access any AudioEffect or AudioStream parameters in Godot.