Guide
Introduction
What Mora and Mora Studio are, who they are for, and how to read this documentation.
On this page
- Mora in thirty seconds
- Mora and Mora Studio
- Three ways into the project
- For an audience member
- For a musician or creative coder
- For a language or tool developer
- What the system includes
- By area
- What sets the design apart
- Patterns remain available after evaluation
- Lisp is the working language
- Audio and visuals can share temporal structure
- Influences
- What Mora is not
- The name
- How to read these docs
- Conventions
- Code examples
- Channels and orbits
- Sample banks and collections
Mora is a Common Lisp livecoding language for composing temporal patterns, sound, and visuals in a system that remains open to inspection and change while it runs. This page introduces the language and Mora Studio, suggests where different readers can start, and explains the conventions used throughout the documentation.
Live coding makes programming part of a performance. Mora gives performers a concise language for patterns and a full Lisp environment behind it. A few expressions can sequence sound, shape an audiovisual scene, or transform material over time. When an expression is evaluated, selected parts remain available as objects rather than disappearing behind an opaque result.
(bpm 140)
(d1! (>> (s "bd [hh hh] sn hh")
(every 4 #'rev)
(gain 0.9)))
(d1! (silence))Evaluating a pattern without an audio backend still constructs a useful, queryable object; it does not produce sound by itself. First patterns walks through both routes.
Mora is the language and system. Mora Studio is its optional native editor and performance environment. Studio brings the language into an editor with structural editing, documentation, interactive feedback, and a visual performance canvas.
Studio is one way to use Mora, not a requirement for the pattern language. The non-graphics layers can also be used from an SBCL REPL or another Common Lisp listener, from tests, or from another host, without Studio or OpenGL. Within Studio, the editor and evaluation model is separate from the native GL renderer, which allows substantial work from a plain Lisp REPL. See the Studio overview and System architecture.
A performer edits code to change relationships in time: which sounds occur, how phrases develop, how visual structures respond, and how one part interacts with another. The code is an active part of the performance, not merely a script started beforehand.
Mora brings musical patterns, programmed visuals, and measured audio into one environment. These are related but distinct sources of information. A visual can follow the same symbolic events as the music; it can also respond to actual audio analysis.
Mora combines the temporal pattern approach familiar from TidalCycles with Common Lisp’s ability to grow a language from inside a running program. Its basic question is: what events appear in this span of time? Rhythms, melodies, parameters, and visual behavior can be built by composing answers to that question.
Because a pattern answers a question about a time interval rather than stepping through one permanently consumed list, a short expression can describe a repeating pattern without enumerating every future event. Mora offers compact pattern notation, transformations, sample and stem selection, pitch and harmonic tools, temporal arrangements, audio routing, visual composition, and an interactive Lisp environment.
The terse notation is intended for repeated live editing. A performer can change a rhythm string, transform a phrase, layer stems, adjust a shader chain, or define a new operation. When a short pattern needs to become something more specific, the surrounding Lisp image provides functions, variables, macros, exact ratios, classes, generic functions, and inspectors.
Mora is SBCL-first Common Lisp. Its temporal model uses rational, half-open spans and event queries. Mora retains a designated set of semantically operative evaluated constructs as CLOS pattern instances, and its scheduler and tools obtain their behavior through generic functions and open protocols. Introspection exposes the retained structure; intercession changes future interpretation through applicable methods. Extending the system can mean defining another pattern class or specializing a protocol method, rather than adding another case to a central list of recognized types.
The level of the protocol matters. CLOS implements Mora. A Mora pattern object can be a metaobject relative to the pattern language without being a CLOS class metaobject, and without Mora extending the whole CLOS metaobject protocol.
Retention and extension are selective. Not every intermediate construction object is retained, a custom extension does not automatically gain every editor affordance, and a new interpretation may apply only to a particular class family. The scheduler and backends are separate from the notation layer, and visual operators are pattern objects with an adjacent GLSL interpretation for that subset. Common Lisp and CLOS and What remains after evaluation cover this in depth.
- Temporal composition and mini notation, including subdivisions, alternation, rests, repetition, and transformations.
- Musical structures such as named pitches, scales, chords, voicings, arpeggiation, and explicitly authored meter.
- SuperDirt sound output, type-first sample and stem workflows, and optional managed audio extensions.
- Shader operators, ordered post-processing, event-linked visuals, and measured-audio visualizations.
- A native Studio with source feedback, inline controls and views, documentation, and structural editing.
- Optional machine-listening and ML tools for discovery, generation, and complementary sample ranking.
These facilities compose, and a composition uses only the ones it needs. ML is optional; it is not needed to write or hear a pattern.
| Area | What it covers |
|---|---|
| Temporal patterns | Rational span queries, layering, mini notation, transformations, deterministic stochastic choices, signals, and patterned arithmetic. |
| Musical structure | Named pitches, scales, chords, voicings, arpeggiation, authored meter, exact metrical clocks, step operations, arrangements, and source-window loops. |
| Performance | Channel replacement, mute/solo, tempo and transport control, scenes, orbit levels and crossfades, MIDI policies including pitch-bend/MPE support. |
| Sound | SuperDirt OSC output; optional SuperDirtMora managed voices, sample-loop behavior, ordered inserts, continuous controls, shared modulation, and ducking. |
| Samples | Indexed discovery, metadata filters, repeatable import/sync workflows, type-first part/stem selection, variant progressions, and explicit tempo/key matching. |
| ML and analysis | Measured input/orbit analysis, optional music/text embeddings, constrained generation, and local PHALAR complementarity ranking. Dependencies and model terms differ by tool. |
| Visuals | Shader operators, event-linked visuals, ordered post-processing, GPU ASCII image processing, and extensible rendering mechanisms. |
| Studio | Structural editing, completion/snippets, documentation, inspector, token feedback, interactive inline views/controls, fullscreen/zen, SLYNK, and gated MCP integration. |
| Other outputs | Optional OSC, MIDI, speech, serial, MQTT, and Csound adapters. These require explicit configuration and applicable devices/services. |
Mora’s design emphasis is the combination of retained decomposition, runtime method extension, Lisp embedding, and clients such as Studio.
A pattern answers a temporal query: what events occur in a given span? Mora represents selected evaluated constructs as retained CLOS objects. Their structure can be inspected, and their interpretation can be changed by extending the applicable protocol methods in the running image.
The emphasis is on the representation that remains after evaluation, and on what performers and tools can do with that representation. Live changes affect future queries; they do not rewrite audio already dispatched or frames already rendered.
Mora’s terse pattern notation is embedded in Common Lisp. Ordinary functions, macros, classes, generic functions, and the inspector are available when a composition needs to become a new instrument or language feature. defpattern and deftransform provide concise extension routes; they are not the only routes. See Extending Mora.
>> composes temporal patterns and visual operator trees. Channel forms can coordinate audio and visuals, while co-emit links visual information to the actual events of a pattern. Measured audio analysis is a separate route for waveform- and spectrum-driven behavior.
An event-linked visual and a spectrum-reactive visual solve different problems. The first follows the score’s event structure; the second responds to measured audio. A composition can use either or both.
Explicit :post chains apply post-processing in written order. ASCII rendering, pixelation, glow, scanlines, and other passes are effects to compose, not merely preset names. These mechanisms let artists build their own visual instruments. See Sound, image, and shared time.
TidalCycles supplies an important temporal and notational lineage. Common Lisp and CLOS supply the working environment and extension mechanisms. The Art of the Metaobject Protocol and Ploy’s open interpreter inform the architectural ambition. Christopher Alexander’s pattern languages inform a longer-standing interest in systems that can be altered meaningfully in their situation of use.
Mora is not a browser-based Strudel clone, a JavaScript transpiler, a DAW replacement, or a collection of fixed visual presets. It does not offer drop-in complete compatibility with every Strudel or Tidal API and backend behavior.
Mora is not an acronym. The name was chosen for its temporal meaning.
| Reader | Start with | Then read |
|---|---|---|
| Someone discovering Mora | This introduction | Patterns and time and Sound, image, and shared time. |
| A musician or creative coder | Installation and setup and First patterns | Mini notation, Pipelines and composition, Transformations and groove, and Framework examples. |
| A technical evaluator | Patterns and time and Common Lisp and CLOS | System architecture and the Source map. |
The subject sections cover Studio, visuals, sound and samples, and machine listening and ML. The Source map connects the prose to implementation and examples.
Code blocks are Common Lisp unless marked otherwise. Keyword arguments belong on separate lines and align with the first keyword in that call:
(loops :bpm 140
:key "Fm"
:bars 8)This particular form filters a stem collection by key and tempo. A broad selection can omit the exact key and BPM filters; matching playback to global targets is a separate operation. See Tempo and key matching.
d1! through d8! are channel assignments.
Examples using bd, sn, or hh assume those banks are installed in SuperDirt. Examples using part, stem, or paired additionally need an eligible collection of your own; see Stems and sample libraries. Mora does not distribute commercial sample collections.