Learn Exporting to the Max External Target

Getting Started

Welcome to RNBO

Quickstart

RNBO Basics

Key Differences

Why We Made RNBO

Coding Resources

Fundamentals

Audio IO

Messages to rnbo~

Using Parameters

MIDI in RNBO

Messages and Ports

Polyphony and Voice Control

Audio Files in RNBO

Using Buffers

Using the FFT

Export Targets

Export Targets Overview

VST/AudioUnit
Max External Target

Max External Target Overview

Exporting to the Max External Target

Raspberry Pi Target
The Web Export Target
The C++ Source Code Target

Code Export

Working with JavaScript
Working with C++

Special Topics

Sample Accurate Patching
Scala and Custom Tuning

RNBO and Max for Live

RNBO Raspberry Pi OSCQuery Runner

Metadata

Export Description

Raspberry Pi GPIO

Updating the RNBO Package

Exporting to the Max External Target

The Max External Target is available from the Target Export Sidebar. It allows you to export your rnbo~ patcher as a Max external object to be loaded and configured just as any other object in a Max patcher.

Max External Export

With the rnbo~ patcher open, select the show export sidebar option to open the export target sidebar. Then select the Max External Export Target from the target list by double-clicking this option.

Configuration

The configuration window provides various configuration options related to the export.

Required Settings

To export you must specify an output directory, the platform(s) you want to export to, and the name of your object.

Output Directory By default your externals will be saved to the folder ~/Documents/Max 8/Packages/RNBO Generated". You can change this destination by selecting 'Choose' next to Output Directory to save your Max external to your preferred location.

NOTE : Selecting a filepath that is within Max's search path will allow the external to be accessed by Max immediately after the target has been exported. The default location is already in Max's search path.

External Platform You can choose to export your external for mac (.mxo), win (.mxe64), or all('.mxo' and '.mxe64') for both MacOS and Windows platforms.

External Name The name of your Max external. This is the actual name you will type into the object box in Max to load the external and is "example" by default.

NOTE: The name of the external can only include lower case ascii characters, digits, underscores, and dots. It must start with a character or digit.

Optional Metadata

The Author's Name, External Description, and External Tags sections are optional and will provide metadata in the external for use in the File Browser and reference file.

External Author's Name Sets the name of the object author for use in the file browser or package manager.

External Description A short description of the objects function. This is imported into the External's reference page.

External Tags Adds tag metadata for use in the file browser. These Tags are used to augment search and autocompletion within Max. Tags must be comma separated.

Additional Settings

Include Transport Attribute When the box is checked, the external will have a transport attribute that can be used to synchronize the external with a named transport object in Max.

Write Multi-channel Wrapper Checking this box creates an multichannel init file in the output directory, exposing the external to the MC wrapper for multichannel capability

Codegen: Polyphony Voice Settings:

  • Linked Exports the number of voices set from the rnbo~ object with the @polyphony attribute . Uncheck if you want to export a different polyphony count than specified in the @polyphony attribute in the rnbo~ object.
  • Disabled Disables polyphony for the code generated from this export.
  • Voice Count Sets the desired maximum voice count for simple polyphony. Note : This does not affect the behavior or voice count of any rnbo subpatchers that use polyphony.

Codegen: Expose per Voice Params Enable if you want to modulate the params of individual voices separately instead of as a group.

Parameters and Messages

Messages to your Max External work the same way as with Max. You can set parameters from the Max Object Inspecto or a connected attrui using the same prefix. Similarly to other Max objects, you can also set parameters messages to the Max External using messages and setting arguments.

Attrui and the Inspector

In the attrui and Max Object inspector for the Max External, the default value of parameters is exposed as a float value of 0.. This value can be set using a different value using @value in param and param~.

The default range of parameters are exposed as normalized values (0.0- 1.0). The @min and @ max values of the param and param~ objects will set the range for the parameter.

Parameter values can be exposed as an on/off (0/1) toggle in the inspector and attrui for the object, rather than a symbol. Setting the param object with @enum 0 1, exposes the parameter with an on/off style toggle in attrui and the inspector. It also sets the parameters @value to the corresponding value of 0 or 1. This is a feature of param but not param~.

Arguments

When you instantiate your Max External, you can set the parameters just like other Max objects using arguments . In the Max external object, Use the @ character followed by the name of the parameter you'd like to set - then the value.

Buffers and Data

If your RNBO patch contains buffer~ or data objects, the Max External will contain those data references as well. For buffer~, or for data objects with @type float32, the exported Max External will create attributes that you can use to map these to Max buffers. So, if your exported external has a RNBO buffer~ object named "buffer_one", you could create an instance of your external with the text myexternal @buffer_one jongly to map that internal buffer to the Max buffer named "jongly."

The exception to this rule are RNBO data objects with @type float64, which is the default type for data objects. These will not create a named attribute in the exported external, and cannot be mapped to Max buffers. They are internal to the exported external. However, you can use the "@file" attribute to fill these data objects automatically, with the contents of that file, whenever you make a new instance of your exported external.

MIDI

When we exported we selected Codegen: Enable MIDI - which allows us to access the notein object inside our Max External using the rightmost inlet.

Controlling RNBO Externals with Transport

Enabling the Include Transport Attribute allows any included metro and/or phasor~ objects with @lock 1 to be controlled by the transport in Max. To do this, set the @transport object's @name attribute to match the rnbo external object's @transport attribute. Setting the attributes of transport can now be set to start, stop and set a master clock for your external. For more information see the guide on locking objects to transports.

rnbo_maxexternal6.png

When the checkbox for Include Transport Attribute is left unchecked, the exported external will reference Max's global transport for timing of the external.

MC

You can check the Write Multi-channel wrapper configuration option to enable your external to be used inside an MC Wrapper in Max.

There's no need to add the mc. prefix to the title of your external.

Selecting this option will allow you to instantiate an MC wrapped version of your external by adding the mc. prefix. Just as in other max objects with the MC prefix, prefixing 'mc.' to the external embeds the object in the MC Object Wrapper .For instance, if an object is called 'example~', for instance, typing 'mc.example~' will show the mc wrapped version of our object just as other objects with the mc. prefix. You can then select the amount of channels you'd like to use with the @chans attribute, along with all of the multichannel features from Max 8.

Polyphony

With Polyphony Settings set to Linked at the time of export, the number of voices set from the rnbo~ objects @polyphony value sets the number of voices for the external.

If Polyphony Settings is set to Voice Count, and exported your Max external, you can set the number of voices directly in the export sidebar next to voice count.