What is Coypu?

Coypu is a package of methods and classes for Pharo designed for live-coding music on the fly. It was originally built as a controller for SymbolicSound Kyma via OSC, but today it can drive any OSC-compatible application, external MIDI hardware, or its built-in audio engine EcoPhausto.

Its string-oriented syntax is heavily inspired by TidalCycles, and the name is a tribute to Kyma's Capytalk dialect — the coypu being a rodent closely related to the capybara.

â„šī¸ Coypu is tested on Pharo 11, 12 and 13. All examples in this documentation target Pharo 13 unless noted otherwise.

Requirements

Pharo

Download and install Pharo from pharo.org/download. Grab the latest stable version (13 recommended). The Pharo launcher is the easiest way to manage images.

Audio engine — choosing your backend

Coypu can send sound through several backends. Pick one:

BackendWhat it doesRequires
EcoPhausto Built-in audio engine, zero external setup Nothing extra — comes with Coypu
SuperDirt / SuperCollider Full-featured sampler & synth via OSC SuperCollider + SuperDirt
Kyma SymbolicSound hardware/software Kyma system + OSC licence
MIDI hardware Trigger any MIDI device pharo-sound (PortMidi)
💡 If you are just getting started, use EcoPhausto — it requires no external software and starts playing immediately inside your Pharo image.

Installing Coypu

Using Metacello (recommended)

Open a Playground (CMD+P on macOS / CTRL+P on Linux & Windows), paste the snippet below, select all and press CMD+D / CTRL+D to evaluate:

Metacello new
    baseline: 'Coypu';
    repository: 'github://lucretiomsp/coypu:master';
    load

Metacello will download and install all required packages. Depending on your connection this takes 1–3 minutes. A progress bar appears in the bottom-right corner of the Pharo window.

âš ī¸ If you see SSL certificate errors, make sure your Pharo image can reach GitHub. You may need to accept a security dialog on first run.

Your first sound

Once installed, open a Playground and evaluate these lines one by one (select a single line and press CMD+D / CTRL+D):

"Start EcoPhausto — you should hear all preset sounds playing."
EcoPhausto start.

"Create a new Performance object."
ep := EcoPhausto new.

"Launch the performance. It is empty for now."
ep playFor: 128 bars.

"Add your first sequencer — a kick on beats 1 and 4."
#(1 0 0 1 0 0 0 0) asSeq to: #kick.

"Add a snare on a clave rhythm."
#cumbiaClave asRhythm to: #conga.

"Stop everything."
ep stop.
â„šī¸ CMD+I (macOS) or CTRL+I (Win/Linux) on any expression opens a Pharo Inspector — great for exploring return values in real time.

Listing available instruments

To see what instruments EcoPhausto provides, evaluate:

EcoPhausto listAllInstruments.

The result is printed to the Transcript (open it with CMD+O+T / CTRL+O+T). Each instrument name is the symbol you pass to to: when creating a sequencer.

Optional: connecting SuperDirt

If you want to use Coypu with SuperDirt's sample library, start SuperCollider with SuperDirt booted first, then use asDirtNotes and asDirtIndex to route sequences to SuperDirt instruments. No extra configuration is needed inside Pharo — the messages are sent over OSC on the default port.

"Send a melodic pattern to SuperDirt's 'acid' synth."
'-/8 , 38 , 56*2 , -/4 , 41 , 66' asDirtNotes to: #acid; envMod: '0.8 0.2 0.3'.

Next steps

You now have a working Coypu setup. Continue with: