Know which pieces you need
Each goal below adds its own prerequisites. The first row is enough to start; add the rest as your work needs them.
| Goal | Required pieces |
|---|---|
| Construct and query patterns | SBCL, Qlot dependencies, mora / mora/mini. |
| Hear ordinary sample patterns | Above, plus a configured SuperCollider/SuperDirt server and the sample banks used. |
| Use Mora Studio | Native GLFW, libffi, font libraries, and a driver supporting OpenGL 4.1 core / GLSL 410. |
| Use managed audio features | A compatible, active SuperDirtMora package; some features have additional native plug-in requirements. |
| Use stem selection | An imported sample collection with metadata, and the corresponding sound banks loaded in SuperDirt. |
| Use measured visual reactivity | cl-mltk and an audio input to analyze. |
| Use ML discovery or generation | Explicitly provisioned optional environments, models, and caches with suitable licenses. |
Set up a checkout
Install SBCL and Qlot. Mora Studio also needs GLFW, libffi, and FreeType. On macOS, Homebrew provides all of them:
brew install sbcl glfw libffi freetype
Then, from the Mora checkout:
make deps
make repl
make deps installs the declared Lisp dependencies. SuperCollider, sample libraries, native audio
plugins, and optional models are installed separately.
Query a pattern, without audio
The make repl launcher loads the lower-level SuperDirt system, so load the language explicitly before
using its DSL. The result is a pattern object and its events, not an audio file.
(asdf:load-system "mora")
(in-package :mora)
(defparameter *first-pattern*
(s "bd [hh hh] sn hh"))
(query-cycle *first-pattern* 0)
(mora.core:pattern-summary *first-pattern*)
(mora.core:pattern-children *first-pattern*)
The string notation is embedded in Lisp rather than replacing it, and the object stays available for later queries and inspection:
(defparameter *changed-pattern*
(>> *first-pattern*
(fast 2)
(every 4 #'rev)))
(query-cycle *changed-pattern* 0)
Hear it in Mora Studio
Follow the SuperDirt project's setup instructions for
SuperCollider and its sample library, and confirm that the bd, sn, and hh
banks are loaded. Then open the normal Studio launcher, which attempts the configured services and opens the
native editor:
make studio
Evaluate one form at a time with Cmd+Return (Ctrl+Return).
(d1!) is not a stop command: assign (silence) to stop a channel, and use hush
when you mean to silence the whole session.
(bpm 140)
(d1! (s "bd hh sn hh"))
(d1! (>> (s "bd [hh hh] sn hh")
(gain 0.9)))
(d1! (silence))
A reading path
From here, the documentation moves from practice to the ideas behind it, then back to the instrument. Read in order, or jump to what you need.
- First patterns Query a pattern, open Studio, play and stop a channel.
- Patterns and time Span queries, exact ratios, whole and visible parts.
- Mini notation Subdivision, alternation, rests, repetition, weighting.
- Pipelines and composition The >> pipeline, stack, merge-left, channels and orbits.
- Transformations and groove Rate, placement, repetition, groove, and chance.
- What remains after evaluation Retained objects, introspection, and intercession.
- Common Lisp and CLOS Generic functions, classes, macros, and the image.
- Extending Mora defpattern, deftransform, and methods on events-in.
- Studio overview Editing, feedback, the listener, and errors.
- Multimodal channel forms Audio, shaders, and ordered post in one form.
The framework examples file
The framework example file demonstrates ordinary patterns, layering, inspection, generic shaders, and ordered image effects. Open it in Studio and evaluate forms individually; its header lists the sound and renderer prerequisites.
;;; MORA: SMALL FRAMEWORK EXAMPLES
;;; Evaluate one form at a time in normal Mora Studio.
;;; Sound requires SuperDirt and its bd/sn/hh banks. Shader examples require
;;; Studio's native renderer.
(in-package :mora)
;;; Tempo, mini notation, transformation, and explicit stopping.
(bpm 140)
(d1! (s "bd [hh hh] sn hh"))
(d1! (>> (s "bd [hh hh] sn hh")
(every 4 #'rev)
(gain 0.9)))
(d1! (silence))
;;; Independent voices, using ordinary sample patterns.
(d1! (stack
(s "bd ~ bd ~")
(s "~ sn ~ sn")
(>> (s "hh*8")
(gain 0.45))))
;;; Generic shader construction and ordered image processing.
(d1! :viz (>> (osc :freq 36)
(kaleid 6))
:post (>> (mora.visual:pixelate :px 128
:py 72)
(mora.visual:ascii :characters " .:-=+*#%@")
(mora.visual:edge-glow :amount .6
:radius 1.5)))
;;; Bypass post-processing without replacing the visual source.
(d1! :post (mora.visual:post-chain))
;;; Inspect an ordinary temporal pattern without dispatching sound.
(defparameter *example-pattern*
(>> (s "bd sn")
(fast 2)))
(query-cycle *example-pattern* 0)
(mora.core:pattern-summary *example-pattern*)
(mora.core:pattern-children *example-pattern*)