6.4.2. RNBO Tutorial #1 - Simple Gain¶

Fig. 6.70 Simple gain patch in RNBO¶
The above patch is designed to show how audio signal is routed in RNBO using a simple gain object. This patch includes no parameters that the user has any direct control over upon exportation to Emote. Despite the patch’s limited functionality, hopefully it will serve as an effective introduction to routing signal in the RNBO environment.
Download the maxpat file here: Simple Gain.
6.4.2.1. Inputs and Outputs¶
When instantiating the rnbo~ object in Max, no signal inlets or outlets are created by default. One must create the desired amount of in~ and out~ objects within the RNBO subpatcher, after which the corresponding number of inlets/outlets will appear on the rnbo~ object.

Fig. 6.71 RNBO~ object, with two signal inlets and outlets¶
In this case, two in~ and two out~ objects exist within the RNBO subpatcher, so two signal inlets and two signal outlets appear on the rnbo~ object in the main patcher.
Upon exporting to Emote, the algorithm will also have two signal inlets and two signal outlets, viewable within the FX chain window.

Fig. 6.72 After exporting, the algorithm can be added to the Emote FX chain with the same amount of inputs and outputs as in RNBO¶
6.4.2.2. Gain~ Object¶
Max/MSPs gain~ object is shown to the user as a slider or fader, and provides a set amount of gain to an incoming signal. Gain~ can access values from 0-157. These values are not directly equivalent to gain in decibels. In this case, the gain is set to a constant value of 130, which is the equivalent of roughly 6 dB of gain. A value of 128 represents unity gain.

Fig. 6.73 The above objects are used to set the gain to 130 upon loading the patch¶
Loadbang is used to ensure that every time the patcher is loaded (or uploaded to the H9000), gain~ is set to a value of 130.
6.4.2.3. Testing the Patch¶
One advantage to using RNBO for algorithm development is the ability to test effects directly within Max without having to reupload to a hardware device every time a change is made. The main Max patch for this simple gain algorithm is shown below:

Fig. 6.74 Playlist~ object used to test patches within Max¶
Both signal outlets from rnbo~ are routed to ezdac~, allowing audio to be monitored through your computer speakers or any audio device. The rnbo~ signal inlets receive audio signals from a playlist~ object containing four short audio files. Playlist~ makes it very quick and easy to test a RNBO patch on a variety of audio files of your choosing, although ezadc~ can also be used if you’d like to play an instrument through your effect.
Upon exporting to Emote, the algorithm will appear in the algorithm location designated by the user when exporting from Max and must be dragged to the FX chain to be used. The algorithm has no user controls, but provides a constant amount of gain to an incoming signal (roughly 6 dB).