Fork Me on GitHub


Max/MSP/puredata-like music patching in the browser

download .ZIPdownload .TGZ


patchosaur is a Max/MSP- and puredata-like patching environment that runs in a browser. It supports audio and MIDI. All of the audio is synthesized in real time in javascript by audiolet. It's a buggy work in progress and not usable yet, but it can do some cool things.

demo patchosaur patch

Installing dependencies to run locally

Install node.js, git, dependencies

Check out patchosaur

Do one of the following:

Install patchosaur's node.js dependencies:

cd patchosaur
npm update # install or update node.js dependencies from package.json

Run it

To start a patchosaur server:

rake start

Now open Chrome and visit http://localhost:7777. It might work in Firefox, haven't tried.

To start a local patchosaur server in production mode (js and css all concatted and minified):

rake start:production

To see a list of other tasks:

rake -T

Making Patches

Press 'h' to toggle help. Double click to create a new object or to edit an existing one. To connect an inlet to and outlet, click an outlet (it should pulse), then click the inlet. To move an object, drag it. To create a comment, create an object starting with c, like c "this is a comment".

To remove an object or patchcord:


No real document support. After the app loads, the patch documents/testDoc.json is loaded. Every time the patch is edited, it is saved to this file. To edit a new document, replace the contents of documents/testDoc.json with []. To "save," move the file.

Audio objects (~ suffix)

Units that have audio inputs or outputs have a tilde suffix (*~, cycle~). Some of them do not work yet (any with multiple outputs, buffer stuff, callbacks). Most of them are directly wrapped from Audiolet. See the sections "DSP" and "Operators" in the Audiolet API Documentation for argument and inlet specifications.

For example, in the Audiolet API Documentation, under "DSP", the Lag constructor takes 3 arguments: audiolet, initial value (default 0), and lag time (default 1). The first argument, audiolet, is passed for you. Arguments (initial value, lag time) can be optionally passed as patchosaur arguments: lag~ 0.5, 0.1. The inputs in the documentation are value and lag time. You can make patchcord connections to audio inputs from audio outputs, and to audiolet parameters from function inputs.



MIDI travels over websockets from the patchosaur server. See the unit. This is just a proof of concept for now, but seems to work fine for input.


Play with it, submit an issue, fork it.

Writing Units

Units are little programs that can be connected by patchcords. They are all defined here, where there are many examples. To add a unit, define a class in the units directory that extends patchosaur.Unit, add a setup method, and then register it: patchosaur.units.add MyUnit.

Units can change model attributes during setup, which will be reflected in the ui view:

They can also expose attributes that do stuff:

They should name themselves in a class variable (see examples, @names = ['spigot', 'gate']).They can read arguments from the model (@objectModel.get 'unitArgs'), which is an array. When an object is created, everything before the first space is set as unitClass, which is used to look up a unit by name, and everything after is surrounded by square brackets and parsed as JSON. route 1, 4, 5's args become [1, 4, 5], while route 1 4 5 fails to parse.

Documenting units

In addition to setting names as a class variable, units can set tags and help. This doesn't do anything yet, but in the future it will show in help (press 'h' to show, right now just displays a list of units).

Writing custom audiolet nodes

Up next

Future Ideas

List of current units

Many of these are not working, and the list is probably out of date. The list is copied from the in-app help (press 'h')