The classes Coypu is built from and the messages they answer — Performance, Performer, Sequencer and the players that drive them.

1. The class map

FamilyClasses
PerformancePerformance, Transport, PerfType, PerfTypeMooflod, PacaAddress
PerformerPerformer and six subclasses
SequencersSequencer, SequencerMono, SequencerPoly, MfSequencer, Rhythm
PlayersSequencerPlayer, SequencerPlayerLinear, SequencerPlayerCyclic
CyclicCoyArc, CoyEvent, MondoAlternation
Scales & chordsScale, Chord, JazzMarkovMelody
SuperDirtSuperDirt, SuperDirtSynth, DirtSingleEvent
MIDIMIDISender, MIDIReceiver, PortMidi
GUIThe 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

MessageEffect
playStart the transport — about four days at 120 BPM
playFor: nRun for n steps
playCyclicFor: nRun for n cycles, resolving alternations
stopHalt
freq: / freqStep duration in seconds — use with bpm
bpm: / bpmTempo in beats per minute
loop: n / unloopWrap the transport every n steps, or release
transportStep / transportStep:The current step counter
incrementTransportStepAdvance it by one, modulo the loop length
maxStepNumber:The loop length directly
activeProcessThe forked transport process
resetAllSequencersReturn every part to its first note

2.2 Mute, solo and state

MessageEffect
mute: aKeyOrArrayRemove one or several parts, snapshotting first
muteAllRemove everything
solo: aKeyOrArrayRemove everything else
unmute: / unsolo:Call restore — the argument is ignored
restoreReinstate the snapshot
temporarySaveSnapshot without changing anything
backupThe snapshot itself
One snapshot slot, and no per-key memory 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

MessageEffect
at: key put: aSequencerInstall a part — what to: does
remove: keyTake a part out
performer: / performerThe backend adapter. Setting it mutes everything
activeDSP: / activeDSPThe Phausto DSP, when using PerformerPhausto
dirtMIDIDevice:The SuperDirt MIDI device name
transpose: nShift every part
rhythm: aRhythmOrSeqGive every part the same gates
swap: a with: bExchange two parts
lengthThe longest pattern in the Performance
loggerThe 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.

ClassSends
PerformerSuperDirt/dirt/play OSC to 127.0.0.1:57120. Default note 0
PerformerPhaustoParameter writes and gate trigs into an in-image DSP
PerformerMIDIMIDI notes and CCs, plus clock and start
PerformerKyma/vcs/… OSC to a Paca(rana) on port 8000
PerformerLocalGate and note OSC to a local listener
PerformerPhaustoMooflodA Phausto variant for the Mooflod performance system
MessageEffect
playEventAt: i in: seqSend one event. Subclass responsibility
playFor: nThe transport loop — a forked process at timing priority
playCyclicFor: nThe cycle-based transport loop
defaultNote60, 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
Timing The transport computes each step's target time from a monotonic microsecond clock and accumulates, rather than sleeping a fixed interval, so timing does not drift. Event sending is forked at a lower priority so a slow backend cannot stall the clock.

4. Sequencer

4.1 The data it holds

AccessorHolds
gatesThe pattern: 1 triggers, 0 rests
notesMIDI note numbers, one consumed per trigger
durationsLength of each note, in steps
gateTimesProportion of the duration the gate stays open; 0.9 by default
noteIndexHow many triggers have fired — the wrap index
midiChannelMIDI channel for this part
dirtMessageSuperDirt parameters
extraParamsSynth parameters for Kyma, Phausto and MIDI CC
soundPatternSample folder names
seqKeyThe instrument name it is filed under
orbitSuperDirt orbit, assigned automatically
playerThe SequencerPlayer driving it
cycleLengths / divisorsCyclic 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

MessageEffect
to: aSymbolInstall into the Performance
, aSequencerConcatenate gates, notes and durations
* n / times: nRepeat
offset: nRotate the gates in place
flipInvert triggers and rests
reverseReverse gates, notes, durations, indices and gate times
palindromeAppend the reverse to the original
transpose: nShift the notes
progression: intervalsRepeat once per interval, transposed
asPolySeqConvert to a SequencerPoly
queryFrom:to:cycle:Ask for the events in a slice of a cycle

4.3 Mono, Poly and Mf

ClassDifference
SequencerMonoOne note per trigger. What asSeq and every named rhythm answer
SequencerPolyA chord per trigger. What chords: answers
MfSequencerA variant used by the Mooflod performance system
RhythmAn 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.

ClassBehaviour
SequencerPlayerLinearThe default. One step per tick; if the gate is 1, fire the note at noteIndex and advance it
SequencerPlayerCyclicQueries the Sequencer for the events inside each slice of a cycle. Used by Mondo patterns; supports subdivision, alternation and per-event divisors
Why a Strategy and not a subclass Sequencer already varies along another axis — Mono versus Poly — so playback behaviour lives in a separate object. It also means a new playback mode can be added without touching Sequencer or Performance.

6. The cyclic classes

ClassRole
CoyArcA time span within a cycle, as a fraction from 0 to 1
CoyEventAn event: an onset within the cycle and a note index
MondoAlternationA <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

ClassRole
Scale18 scales as interval arrays — see Melody & Scales
Chord64 chord entries, with list and traceList
JazzMarkovMelodyWeighted scale-degree melody generation
SuperDirtSample folder location and helpers
MIDISender / MIDIReceiverPortMidi wrappers
PacaAddressCaches the resolved Kyma Paca(rana) address
TransportTransport state
MyoLoggerPerformance logging
VerticalFader familyOn-screen faders for OSC, MIDI, Kyma and SuperDirt
KeyboardToOSC familyComputer-keyboard control surfaces
RanaThemeA dark Pharo theme for live coding

8. Where to go next

DocumentWhat it covers
Pattern OperatorsThe base-class extensions that make the syntax terse.
PerformingThese messages in live use.
Phausto & MIDIWhat each Performer sends.
Rhythm LibraryThe rhythm registry, rendered.

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.