Learn Architecture

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
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

RNBO Architecture

In this document we'll discuss how RNBO is designed, and how the different parts of RNBO work together to provide a seamless experience.

In this document we'll discuss how RNBO is designed, and how the different parts of RNBO work together to provide a seamless experience. None of this information is necessary for working with RNBO. However, it will improve your understanding of how RNBO works, and it may sharpen your intuition about how to work with RNBO.

Puzzle Pieces

RNBO is made up of a number of modular parts. When you edit a RNBO patch, or export a patch to a target, the parts all work together to make it happen.

RNBO Architecture

These are the most important parts of the RNBO architecture, with some indication of the kind of data that moves between them. There's Max, which is where you edit your RNBO patchers, the RNBO Server, which processes RNBO patches and turns them into code, and the Cloud Compiler, which builds finished targets on demand. The LLVM compiler turns C++ code into machine code—code that can actually tell the machine what to do.

How it Works

Unlike Gen, RNBO doesn't run inside of Max. The first time you create a rnbo~ object, Max starts the RNBO code generation server. This server bulids a list of all the RNBO objects that exist, and then sends a description of them back to Max. That allows Max to present a RNBO patch—an interface that you can use to build a RNBO patch as if you were making a Max patch. Whenever you make a change to a RNBO patcher, Max sends the graph description of the patch to the code generation server. Code comes back, which Max compiles and inserts into the audio graph.

patcher_diagram.png

Exporting

As you're editing your patcher, you may decide that you want to export, either to code or to a compiled target. In this case, the flow chart looks very similar, except with an extra step. Instead of sending the code back to Max, the RNBO server looks up the recipe for a given target, then follows that recipe to build the target from the RNBO patch graph.

  • C++ - Write the generated C++ code to a file on disk.
  • Web Export - Generate C++ code, send it to the Cloud Compiler to compile the code to Web Assembly (WASM).
  • Audio Plugin - Generate C++ code, then send it to the Cloud Compiler to build a finished plugin.
  • Max External - Generate C++ code, then send it to the Cloud Compiler to build a Max external.
  • Raspberry Pi - Generate C++ code, then send it to the connected Raspberry Pi.