Skip to content

Creative Timeline Engine Phase 1 examples

These three examples prove the smallest useful Creative Timeline Engine through the same runtime path a desktop product uses. All three create a real immutable Project, compile a PlaybackProgram, advance MasterTransport, and render through TimelineGraphPlaybackBinding into SignalGraph. The headless tests and standalone executables share the same processor classes; neither substitutes a mock renderer.

Audio-file player

pulp-timeline-audio-player reads a complete WAV on the control thread. The bounded, no-exceptions DecodedAudioAssetPool::decode_wav path validates and decodes it before the processor is started. The project contains one asset, one sequence, one track, and one absolute MediaRef clip. Play, stop, seek, and loop are changes to MasterTransport; audio remains a compiled arrangement track.

cmake --build build --target pulp-timeline-audio-player
./build/examples/timeline-phase1/pulp-timeline-audio-player ./loop.wav

Its deterministic device-free validation path is:

./build/examples/timeline-phase1/pulp-timeline-audio-player --headless

Step-pattern player

pulp-timeline-step-sequencer owns the existing frozen SequencerStateChannel for its fixed-capacity grid and UI-facing playhead. It does not widen or redesign that channel. The channel-owned snapshot is persisted as the registered pulp.examples.timeline.step_pattern typed document content. Its control-thread pump drains and reduces queued edits, updates that component, lowers the resulting grid into a timeline MidiContent clip, and publishes the recompiled program. ArrangementNoteRenderer then injects notes through the binding's stable MidiInput to a small audible sine destination inside the same SignalGraph. Its one-bar transport loop repeats the arrangement and flushes active notes at discontinuities and stop. The minimal standalone has no editor, but its processor exposes the real channel and edit/recompile pump a view would drive; edits are not mirrored into a second grid model or ignored.

cmake --build build --target pulp-timeline-step-sequencer
./build/examples/timeline-phase1/pulp-timeline-step-sequencer

The device-free validation path is:

./build/examples/timeline-phase1/pulp-timeline-step-sequencer --headless

Multitrack arrangement

pulp-timeline-multitrack-arrangement is the integration-shaped example. It builds two parallel audio tracks plus an instrument track, publishes tempo and meter changes, compiles device-parameter automation, routes authored device placements into a SignalGraph, and applies its delay compensation. The executable uses HeadlessHost, checks the compensated output sample, and requires no audio hardware:

cmake --build build --target pulp-timeline-multitrack-arrangement
./build/examples/timeline-phase1/pulp-timeline-multitrack-arrangement

Use this example when the question is how an immutable project and playback program reach real graph devices. It intentionally does not make the Timeline document own runtime plugin instances or graph nodes.

Focused tests

The pulp-test-timeline-phase1-examples suite covers bounded decode rejection, variable block sizes, one-wrap split blocks, registered-pattern persistence, command-to-recompile output changes, audible note delivery, stop-time note flushing, allocation-free processing after prepare, multitrack routing, automation delivery, tempo/meter changes, and active graph PDC. It also drives the two standalone processors through StandaloneApp's device-independent callback seam and require nonzero output; unavailable hardware cannot turn the test green. Those two standalone binaries register their --headless paths as CTest cases, while the multitrack executable has its own device-free timeline-multitrack-arrangement-headless-run case, so all three entry points remain live.