Skip to content

ColonelKernel/session-state-explorer-cubase

Repository files navigation

Cubase Session State Explorer

The Cubase adapter in a cross-DAW research platform for representing digital audio workstation state — interpretably, with honest provenance and uncertainty — and relating changes in that state to changes in the rendered acoustic outcome.

Live workbench

Live demo — this adapter's canonical bundles rendered in the Session State Analyzer workbench (no install).

This is the fourth adapter in the family, joining prototypes for REAPER, Ableton Live, and Logic Pro (siblings on disk; audited in docs/PRIOR_PROTOTYPES_AUDIT.md). It is built to support a PhD application to the Music Technology Group, Universitat Pompeu Fabra, in partnership with Steinberg, on the problem:

How can the state of a DAW — its audio effects, mixing and routing details — be represented in an interpretable, structured, machine-readable way, and how can changes in that state be related to changes in the resulting sound?

It is not a project-file viewer, a Cubase utility, or a graph toy. It is a research prototype for the chain DAW STATE → PRODUCTION TRANSFORMATION → ACOUSTIC OUTCOME.


Why Cubase is the hardest and most interesting case

REAPER exposes state as plain-text .rpp. Ableton exposes it through a public Live extension SDK. Logic exposes almost nothing natively (its prototype works from exports). Cubase is distinctive: meaningful state is distributed across many partially-observable surfaces, and Cubase 14/15 newly supports the open DAWproject interchange format. So the Cubase question is not "parse one file format" — it is "how do we build a trustworthy, interpretable representation when state is spread across a binary project, an open export, control-surface runtime APIs, presets, and rendered audio, each revealing a different slice?"

The adapter answers this with a layered, evidence-fusing architecture where every value carries provenance (where it came from, how sure we are) and where what we cannot observe is itself a first-class, queryable object.


What actually works (v0)

  • Real DAWproject importer (.dawproject, the open format Cubase 15 imports/exports) → tracks, folders, groups, FX channels, master, inserts, instruments, sends, output routing, automation lanes, MIDI notes, tempo. This is a genuine importer, not a hand-authored demo — a first for this family.
  • cpr-lab — a conservative, read-only RIFF-aware evidence scanner for the binary .cpr (strings, plug-in-name candidates, version, container tokens), honest about being evidence, not structure.
  • Track Archive .xml, Standard MIDI File (dependency-free), and MIDI Remote runtime snapshot extractors.
  • Evidence fusion into one canonical SessionState, with a declarative observation model deriving coverage and unknown-state records.
  • Typed session graph (networkx) preserving Cubase-native distinctions a generic model would flatten (SENDS_TOSUMSCONTAINS; folder vs. group-channel-enabled folder).
  • Snapshot save/load and a classified diff engine (STRUCTURAL / PARAMETER / TEMPORAL / ROUTING / MIXER / MUSICAL / UNKNOWN).
  • State→audio experiments: pair two snapshots with a known StateIntervention and two renders, and measure the acoustic delta with baseline descriptors. One end-to-end controlled experiment runs out of the box (see below).
  • Streamlit explorer UI with a provenance inspector and an unknown-state map.
  • 19 passing fixture-driven tests; fixtures are real .dawproject files + synthesized renders, generated by tools/make_fixtures.py.

What is deliberately not claimed

  • The .cpr binary is not structurally decoded. We extract evidence only.
  • Third-party VST3 parameter values are not fabricated — DAWproject stores plug-in state as an opaque blob, so those are recorded as unavailable with the surfaces that could lift them.
  • The MIDI Remote API is not treated as a full project API — it is a control-surface API observing the selected channel + transport.

See docs/LIMITATIONS.md. Uncertainty here is a research feature, not a bug.


Quick start

python -m venv .venv && source .venv/bin/activate
pip install -e ".[full]"          # or ".[ui,audio]" ; core works with just pydantic

python tools/make_fixtures.py     # generate real .dawproject fixtures + renders

# End-to-end demo: two controlled experiments, state delta + audio delta
python -m cubase_session_explorer demo

# Inspect one project
python -m cubase_session_explorer ingest fixtures/cubase/demo_session.dawproject

# Diff two snapshots
python -m cubase_session_explorer snapshot fixtures/cubase/routing_a.dawproject --out a.json
python -m cubase_session_explorer snapshot fixtures/cubase/routing_b.dawproject --out b.json
python -m cubase_session_explorer compare a.json b.json

# The interactive explorer
streamlit run src/cubase_session_explorer/app.py

# The CPR evidence lab (read-only)
python -m cubase_session_explorer.extractors.cpr_lab scan your_project.cpr

The headline experiment

python -m cubase_session_explorer demo runs two controlled A/B experiments:

  1. DualFilter Position −0.5 → +0.5 — the state diff detects a single PARAMETER change ([0.25] → [0.75]); the matching renders show a measured spectral-bandwidth / loudness delta.
  2. Add a reverb send — the diff detects a new FX-channel node, a new SENDS_TO edge and a new ROUTES_TO edge (STRUCTURAL + ROUTING); the renders show a crest-factor / loudness delta from the reverb tail.

Each writes a research Observation / InterventionExperiment record — the seed of a state↔audio dataset compatible across all four DAWs.


Architecture at a glance

CubaseSessionBundle (.dawproject / .cpr / .xml / .mid / renders / runtime.json)
        |  bundle.discover -> classify artifacts
        v
   extractors/  dawproject . track_archive . cpr_lab . midi . runtime
        |  each -> partial, provenance-tagged evidence
        v
   fusion.fuse  -> structural base + runtime overlay + CPR/MIDI corroboration
        |         + observation_model -> coverage + unknown_state
        v
   models.SessionState   (canonical + native.cubase, lossless)
        |-- graph_builder -> typed networkx graph
        |-- snapshot <-> diff (classified changes)
        \-- audio_descriptors + intervention -> state<->audio observations
                                        |
                                   app.py (Streamlit)  .  cli.py

Full detail in docs/ARCHITECTURE.md.

Documentation

Doc Contents
PRIOR_PROTOTYPES_AUDIT REAPER / Ableton / Logic audit and what we reuse
CUBASE_ADAPTER_MAPPING Canonical concept ↔ each DAW ↔ Cubase
CUBASE_CAPABILITY_MATRIX State field × extraction surface access grid
EXTERNAL_RESEARCH_LEDGER Every external source, with licence + provenance
CUBASE_STATE_ONTOLOGY Cubase state as an ontology (from the docs)
STATE_SCHEMA The canonical schema, field by field
CUBASE_FIXTURE_PROTOCOL Controlled fixtures 00–16
CPR_REVERSE_ENGINEERING_NOTEBOOK CPR hypotheses, honestly scored
MIDI_REMOTE_CAPABILITY_REPORT What the runtime API can/can't observe
VALIDATION Expected-vs-observed validation strategy
RESEARCH_ALIGNMENT Fit to the UPF MTG / Steinberg problem
LIMITATIONS · ROADMAP Honest scope + where this goes

Legal & ethical posture

User-owned projects, public documentation, public APIs, controlled exports and controlled binary comparisons only. No DRM/encryption bypass, no redistribution of Steinberg proprietary code, no promotion of reverse-engineered guesses to "specification". See the EXTERNAL_RESEARCH_LEDGER.

About

Cubase session-state explorer: a hybrid-evidence observation instrument (adapter) for the cross-DAW Session State Analyzer

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages