Procession timeline engine illustration

Procession

The timeline engine: what plays in each interval, and a conductor for clip and scene launching.

Procession is the component that decides which regions, notes, automation and launches fall inside each block of audio. It is part of Signals & Sorcery, a coherent set of Rust audio building blocks for audio apps, plugins, players and DAWs.

Repositorygithub.com/shiehn/procession-timeline-engine
LicenseMIT, free for commercial and closed-source use
StatusPlanned
LayerMusical structure (how the layers stack)
Crates (planned names)procession

What it is

Between "the project says this clip starts at bar 9" and "the sampler starts this voice at frame 37 of this block" there is a layer of careful timing work. Procession is that layer.

  • Regions. Which audio regions overlap a block, at which sample offset each starts and stops, and where its fades fall.
  • Notes. Which MIDI notes start and end in a block, at exact offsets, including notes already sounding when playback starts or jumps.
  • Automation. Curve values at block and sub-block resolution, delivered as timed parameter changes.
  • Loops, seeks and tempo changes. A block that crosses one is split at the right sample, so nothing drifts.
  • The conductor. Quantised launching of clips and scenes: a launch requested now lands on the next bar, beat or grid line, with follow rules for what plays after.

Its input is a compact playback description (regions, notes, curves and launch rules), much smaller than a full project. A simple stem player, a game's music system or a sequencer can use Procession without any session model at all.

Usage example

Illustrative sketch

Planned, not final. Taken from the READMEopen in new window.

use procession::{Playback, Region, Conductor, LaunchQuantum, BlockEvents};

let mut play = Playback::new(tempo_map, 48_000.0);
play.add_region(Region::audio(source_id, Bars(1)..Bars(9)).fade_in_ms(5.0));
play.add_notes(track_id, notes);
play.add_curve(param_id, volume_curve);

let mut conductor = Conductor::new(LaunchQuantum::Bar);
conductor.launch_scene(scene_b);                   // lands on the next bar

// Per block (allocation-free once prepared):
let events: BlockEvents = play.block(position, 256, &mut conductor);
for e in events.iter() {
    // start a voice at e.offset, set a parameter at e.offset, stop a note at e.offset ...
}

How it fits in the ecosystem

Procession is in the musical structure row, beside Tapestry. Dependencies point down, never up.

Below it: Orrery (repoopen in new window) for tempo maps and transports, and Runecraft (repoopen in new window) for the handoffs that bring a new description to the audio thread. Its events drive the players in Leyline (repoopen in new window)'s graph and the sources in Scriptorium (repoopen in new window).

Beside it: Tapestry (repoopen in new window). The two don't depend on each other.

Above it: Grimoire (repoopen in new window) builds the playback description from a Tapestry project and runs one playback per transport.

What it deliberately doesn't do: no editing (that is Tapestry's job), no audio processing (Leyline and Cantrips make the sound), no file reading (it asks Scriptorium for ranges), and no time-stretch algorithm.

Extend and display
The engine
Musical structure
Signal flow
ComponentRepositoryRoleStatus
Runecraftrunecraft-audio-coreShared contracts, realtime safety, process isolation and realtime-safe logging: the floor every other component stands onIn preparation
Orreryorrery-musical-timeTempo and meter, transports, bar, beat and sample maths, timed MIDIIn preparation
Summonersummoner-plugin-hostOut-of-process VST3 and Audio Unit plugin hosting with crash isolationIn preparation
Aethergateaethergate-audio-platformAudio devices (cpal, CoreAudio, a fake device for tests) and shared-memory metersPlanned
Leylineleyline-audio-graphA realtime audio graph with delay compensation, and a compiler from an edit model to a graphPlanned
Cantripscantrips-audio-dspBuilt-in mixer DSP: sampler, fader, pan, meters, compressorPlanned
Scriptoriumscriptorium-audio-mediaDecode and encode, a sample store, streaming voices, crash-safe recordingPlanned
Tapestrytapestry-session-modelTracks, clips, lanes and scenes; edits with undo; a crash-safe project storePlanned
Processionprocession-timeline-engineWhat plays in each block: regions, notes, automation, launchesPlanned
Grimoiregrimoire-daw-engineThe assembled engine and its headless JSON-RPC protocolPlanned
Familiarfamiliar-plugin-sdkAn SDK for plugins and panels that extend a Signals & Sorcery enginePlanned
Glyphworkglyphwork-audio-uiAudio UI widgets: meters, knobs, faders, waveformsPlanned

Status

Planned. No code yet. The repositoryopen in new window holds the design.

Pure Rust: macOS, Windows and Linux. WebAssembly is a natural fit for web and mobile players and is a planned exploration.

Last Updated:
Contributors: shiehn