The classes Coypu is built from and the messages they answer — Performance, Performer, Sequencer and the players that drive them.
1. The class map
| Family | Classes |
|---|---|
| Performance | Performance, Transport, PerfType, PerfTypeMooflod, PacaAddress |
| Performer | Performer and six subclasses |
| Sequencers | Sequencer, SequencerMono, SequencerPoly, MfSequencer, Rhythm |
| Players | SequencerPlayer, SequencerPlayerLinear, SequencerPlayerCyclic |
| Cyclic | CoyArc, CoyEvent, MondoAlternation |
| Scales & chords | Scale, Chord, JazzMarkovMelody |
| SuperDirt | SuperDirt, SuperDirtSynth, DirtSingleEvent |
| MIDI | MIDISender, MIDIReceiver, PortMidi |
| GUI | The VerticalFader family, FaderWindow, keyboard controls |
Coypu also extends the base classes heavily — Integer, ByteString,
ByteSymbol, Array, Number — which is where the terse
syntax lives. Those are catalogued in
Pattern Operators.
2. Performance
A singleton subclass of Dictionary, keyed by instrument name. Reach it with
Performance uniqueInstance; Performance new deliberately raises.
2.1 Transport and tempo
| Message | Effect |
|---|---|
| play | Start the transport — about four days at 120 BPM |
| playFor: n | Run for n steps |
| playCyclicFor: n | Run for n cycles, resolving alternations |
| stop | Halt |
| freq: / freq | Step duration in seconds — use with bpm |
| bpm: / bpm | Tempo in beats per minute |
| loop: n / unloop | Wrap the transport every n steps, or release |
| transportStep / transportStep: | The current step counter |
| incrementTransportStep | Advance it by one, modulo the loop length |
| maxStepNumber: | The loop length directly |
| activeProcess | The forked transport process |
| resetAllSequencers | Return every part to its first note |
2.2 Mute, solo and state
| Message | Effect |
|---|---|
| mute: aKeyOrArray | Remove one or several parts, snapshotting first |
| muteAll | Remove everything |
| solo: aKeyOrArray | Remove everything else |
| unmute: / unsolo: | Call restore — the argument is ignored |
| restore | Reinstate the snapshot |
| temporarySave | Snapshot without changing anything |
| backup | The snapshot itself |
mute:, muteAll, solo: and
temporarySave all write the same single backup, and
unmute:/unsolo: discard their argument entirely and restore the
lot. See Performing §4.1.
2.3 Contents
| Message | Effect |
|---|---|
| at: key put: aSequencer | Install a part — what to: does |
| remove: key | Take a part out |
| performer: / performer | The backend adapter. Setting it mutes everything |
| activeDSP: / activeDSP | The Phausto DSP, when using PerformerPhausto |
| dirtMIDIDevice: | The SuperDirt MIDI device name |
| transpose: n | Shift every part |
| rhythm: aRhythmOrSeq | Give every part the same gates |
| swap: a with: b | Exchange two parts |
| length | The longest pattern in the Performance |
| logger | The MyoLogger used for performance messages |
3. Performer
An abstract adapter. Subclasses implement playEventAt:in:, which is called once
per trigger with the Sequencer and the current note index.
| Class | Sends |
|---|---|
| PerformerSuperDirt | /dirt/play OSC to 127.0.0.1:57120. Default note 0 |
| PerformerPhausto | Parameter writes and gate trigs into an in-image DSP |
| PerformerMIDI | MIDI notes and CCs, plus clock and start |
| PerformerKyma | /vcs/… OSC to a Paca(rana) on port 8000 |
| PerformerLocal | Gate and note OSC to a local listener |
| PerformerPhaustoMooflod | A Phausto variant for the Mooflod performance system |
| Message | Effect |
|---|---|
| playEventAt: i in: seq | Send one event. Subclass responsibility |
| playFor: n | The transport loop — a forked process at timing priority |
| playCyclicFor: n | The cycle-based transport loop |
| defaultNote | 60, except SuperDirt's 0 |
| noteFromSoundToken: | Extract n from 'bd:3'; SuperDirt only |
| index:to: / level:to: | Route those two parameters to the right place per backend |
4. Sequencer
4.1 The data it holds
| Accessor | Holds |
|---|---|
| gates | The pattern: 1 triggers, 0 rests |
| notes | MIDI note numbers, one consumed per trigger |
| durations | Length of each note, in steps |
| gateTimes | Proportion of the duration the gate stays open; 0.9 by default |
| noteIndex | How many triggers have fired — the wrap index |
| midiChannel | MIDI channel for this part |
| dirtMessage | SuperDirt parameters |
| extraParams | Synth parameters for Kyma, Phausto and MIDI CC |
| soundPattern | Sample folder names |
| seqKey | The instrument name it is filed under |
| orbit | SuperDirt orbit, assigned automatically |
| player | The SequencerPlayer driving it |
| cycleLengths / divisors | Cyclic playback data, set by the Mondo parser |
Counting messages: trigs and numberOfTrigs give the number of
triggers, gatesSize the pattern length, and size is a synonym for
the trigger count rather than the length — which surprises people.
4.2 Transformations
| Message | Effect |
|---|---|
| to: aSymbol | Install into the Performance |
| , aSequencer | Concatenate gates, notes and durations |
| * n / times: n | Repeat |
| offset: n | Rotate the gates in place |
| flip | Invert triggers and rests |
| reverse | Reverse gates, notes, durations, indices and gate times |
| palindrome | Append the reverse to the original |
| transpose: n | Shift the notes |
| progression: intervals | Repeat once per interval, transposed |
| asPolySeq | Convert to a SequencerPoly |
| queryFrom:to:cycle: | Ask for the events in a slice of a cycle |
4.3 Mono, Poly and Mf
| Class | Difference |
|---|---|
| SequencerMono | One note per trigger. What asSeq and every named rhythm answer |
| SequencerPoly | A chord per trigger. What chords: answers |
| MfSequencer | A variant used by the Mooflod performance system |
| Rhythm | An Array subclass of gates, with the named-rhythm registry on the class side |
Rhythm list is built by scanning for the <rhythmCreation>
pragma, which is also what generates the
Rhythm Library.
5. Sequencer players
A Strategy deciding what one transport tick means for a Sequencer. Each Sequencer holds one
in its player slot.
| Class | Behaviour |
|---|---|
| SequencerPlayerLinear | The default. One step per tick; if the gate is 1, fire the note at noteIndex and advance it |
| SequencerPlayerCyclic | Queries the Sequencer for the events inside each slice of a cycle. Used by Mondo patterns; supports subdivision, alternation and per-event divisors |
Sequencer or Performance.
6. The cyclic classes
| Class | Role |
|---|---|
| CoyArc | A time span within a cycle, as a fraction from 0 to 1 |
| CoyEvent | An event: an onset within the cycle and a note index |
| MondoAlternation | A <a b c> group — its choices and how fast it advances |
These exist so a pattern can be queried rather than stepped: ask a Sequencer what
happens between 0.25 and 0.5 of cycle 3 and it answers a collection of
CoyEvents. That is what makes Mondo's nested subdivisions possible.
7. Supporting classes
| Class | Role |
|---|---|
| Scale | 18 scales as interval arrays — see Melody & Scales |
| Chord | 64 chord entries, with list and traceList |
| JazzMarkovMelody | Weighted scale-degree melody generation |
| SuperDirt | Sample folder location and helpers |
| MIDISender / MIDIReceiver | PortMidi wrappers |
| PacaAddress | Caches the resolved Kyma Paca(rana) address |
| Transport | Transport state |
| MyoLogger | Performance logging |
| VerticalFader family | On-screen faders for OSC, MIDI, Kyma and SuperDirt |
| KeyboardToOSC family | Computer-keyboard control surfaces |
| RanaTheme | A dark Pharo theme for live coding |
9. Troubleshooting
Performance new raises an error
It is deliberate — it is a singleton. Use Performance uniqueInstance — §2.
aSequencer size returned the wrong number
size answers the trigger count, not the pattern length. Use
gatesSize for the length — §4.1.
A Sequencer plays the wrong notes after I changed its gates
noteIndex keeps counting across the change. p resetAllSequencers
realigns everything — §2.1.
My Mondo pattern behaves like a step pattern
Its player may have been replaced. The Mondo parsers install
SequencerPlayerCyclic; transformations that rebuild a Sequencer can drop back
to the linear default — §5.
Two parts have the same SuperDirt orbit
Orbits are assigned by a counter incremented per Sequencer and wrapped at 12, so heavy
session churn can collide. Set it explicitly with orbit:.
Where is the list of everything a Sequencer answers?
Browse Sequencer in Pharo — the protocols are grouped by purpose, and the
LiveCoding ones are what this manual documents.