Fundamentals
Export Targets
Code Export
Patcher UI
Special Topics
RNBO Raspberry Pi OSCQuery Runner
Managing Raspberry Pi Exports
Connect audio + MIDI hardware, load local audio samples, control your Pi remotely with rnbo.remote, and manage exported patches.
Managing Exports
Use the Patch Name configuration option to identify your patch after exporting it to the Raspberry Pi.
If you export multiple patchers to your Raspberry Pi, you can switch between them using this name. You have a few options for telling the Pi to swap patchers. Using the rnbo.remote object, use the @patchername
attribute to select between active patchers.
You can also send an OSC message to your Pi to make it switch patchers. A message like /rnbo/inst/control/load 0 simple-noise
will load the patcher "simple-noise" into slot 0
.
Additionally, you can also use the Raspberry Pi Export Debug Interface to select between exported patchers.
Finally, you can configure the Raspberry Pi to switch between exported patchers in response to MIDI program change messages. First, you must change the default behavior of the Pi runner, which is to switch presets in response to MIDI program change messages. Use these OSC messages to configure your Pi.
/rnbo/config/patcher_midi_program_change_channel omni
— this configures the Pi to map MIDI program changes to patcher changes on all channels.
/rnbo/inst/config/preset_midi_program_change_channel none
— this configures the Pi to disable the mapping from MIDI program changes to preset changes on all channels.
After configuring the Pi in this way, MIDI program changes messages on any channel should switch between exported patchers.
Send a patcherdestroy
message to the rnbo.remote object to remove an exported patcher from the Raspberry Pi.
Controlling the Pi
Connected Audio Devices
For the Raspberry Pi to be ready to run exported RNBO code, it must be connected to a supported audio interface. Most current audio usb inserfaces will work, just as long as the audio interface is Alsa class-compliant .
Navigate to the Configuring Audio Guide to to configure audio settings on the Raspberry Pi with the connected audio hat or interface. Once the audio settings are configured and the Pi is updated, the target is now ready to be configured for export.
Once exported, The RNBO Runner will take advantage of the configured audio devices inputs and outputs if there are associated in~ and out~ objects . For more on how this works, check out the Audio I/O Guide.
Connected MIDI Devices
Midiin and midiout objects in the exported RNBO code can be used on the RPi target to send and receive MIDI messages on the RNBO Runner. This means any MIDI hardware connected to the Pi's interface will be able to send and receive Midi data.
These can also be used to sync up to other hardware. For a more detailed overview, see Synchronization and Locking to Transport in RNBO guide.
Local Samples on the Raspberry Pi
Sample Data in RNBO can be exported to the Raspberry Pi by checking the Copy Sample Dependencies box creates a media folder to the Output directory on export. Any sample data referenced by buffer~ and data objects' file
attribute will be exported to a folder on the Raspberry Pi .
Remote control via the rnbo.remote object
The RNBO code on the Raspberry Pi can be set and retrieved from the object in Max. The rnbo.remote object is a max-level object included in the RNBO package that allows for loading and hot-swapping patches on the Raspberry Pi. Once Loaded, setting and receiving changes on parameters, presets, data references, MIDI, transport timing, and inport and outport values can all be done via the rnbo.remote . When the rnbo.remote is on the same network as the Rasperry Pi with running RNBO code, it can reference that Pi by its name, enabling remote control and retrieval of changes to patches on the Pi.