Guide

Multimodal channel forms

One channel form can carry audio, visual material, and ordered image processing, with each facet owned and replaced separately.

A single channel form can compose audio, visual material, and image processing while keeping their responsibilities separate. This page explains the three facets, what happens when one is omitted, and how a channel relates to audio orbits and to linkage beyond the form.

Three facets in one form

The multimodal form separates three responsibilities:

Common Lisp
(d1! :audio (s "bd ~ sn [hh hh]")
     :viz (>> (osc :freq 36)
              (kaleid 6)
              (rotate :speed .03))
     :post (>> (mora.visual:pixelate :px 128
                                     :py 72)
               (mora.visual:ascii :characters " .:-=+*#%@")
               (mora.visual:edge-glow :amount .6
                                      :radius 1.5)))
FacetRole
:audioThe channel’s sound pattern.
:vizSelects visual material for the channel form; here, a shader chain.
:postAn ordered image-processing chain applied after visual composition.

Studio supplies the canvas and native GL context. Visual operators and shaders can be described without starting an audio receiver, but measured waveform and spectrum views need an audio input.

Omitted facets are left alone

An omitted facet is left alone; it is not an instruction to remove that facet. A visual-only or post-only edit therefore need not replace the running audio pattern.

Selective retention

When you re-evaluate a channel form, Mora can retain an unchanged closed audio form. Re-evaluation and source memoization distinguish closed literal construction from dynamic Lisp expressions, and dynamic Lisp expressions are still evaluated according to their assignment rules.

Post treatment in a channel form

The :post facet has four distinct cases:

  • An explicit :post supplies an ordered chain and replaces the renderer’s legacy post treatment.
  • Omitting :post preserves the existing treatment.
  • nil restores the legacy treatment.
  • An empty chain deliberately bypasses it.

Ordered post-processing shows each case.

Channels and orbits

A Mora channel is an ownership and composition unit. The sounds inside one channel need not share a single SuperDirt output orbit: explicit per-pattern orbit annotations can separate stems for downstream mixing. See From pattern to audio.

Transitions are covered in Arrangement and transitions.

Linkage beyond the enclosing form

Audio/visual relationships can extend beyond the enclosing form. Mora provides event metadata and query-based linkage as well as measured signal inputs. Event-linked visuals follow the scheduled events of the score; measured-audio visuals follow analysis of the sound itself. The two are distinct; Shader composition describes both.

Measured-audio visuals need an audio input to analyze. Without one, patterns and unmeasured visuals can still be explored, but analysis is not live. See Machine listening and the signal views in Studio.

Start from complete examples

Start with complete visual examples like the ones in these pages. The example file examples/mora-framework-intro.mora demonstrates shaders and ordered image effects; evaluate its forms individually. See Framework examples.

Source references

Repository-relative paths in the Mora source where these mechanisms are implemented.

  • src/mini/d-bang-bangs.lisp
  • examples/mora-framework-intro.mora

Documentation

Search the documentation

Results update as you type. Use the up and down arrow keys to choose a result and Enter to open it.