Oscilla — Architecture Overview

This document provides a concise, system-level overview of Oscilla’s architecture: major modules, entry points, and runtime data flows. It is intended as a developer-facing map to support onboarding, maintenance, and refactoring.


Purpose

Oscilla is a browser-based, cue-driven graphic notation platform built around SVG, WebSockets, and OSC.

The system is designed to support composed notation, live execution, and networked contribution within a single runtime.


High-Level Entry Points

Server

server.js (repo root)


Client

public/index.html

public/scores/<project>/score.svg


Frontend Architecture (public/js/)

app.js — Client Bootstrap / Orchestration

Role: High-level runtime composition and startup sequence.

Responsibilities:

Key integrations:

app.js intentionally contains minimal feature logic; it composes modules rather than implementing behaviour.


Animation & Cue Execution

oscillaAnimation.js

Role: Cue parsing, animation assignment, and lifecycle management.

Responsibilities:

Key exports:

Touchpoints:


oscillaCueDispatcher.js

Role: Scheduling and dispatch of cue events.

Responsibilities:

Key functions:


Contribution Surface

oscillaAnnotations.js

Role: Browser-native contribution layer (HTML overlays over SVG).

Responsibilities:

Key concepts:

Exposed API:


Audio System

oscillaAudio.js

Role: Audio playback primitives.

Responsibilities:

Primary functions:

Used by:


OSC Integration

oscillaOSC.js

Role: OSC message construction and transport.

Responsibilities:


Timing & Utilities

oscillaTimers.js

oscillaHitLabels.js


Reuse / Template System

reuse.js

Role: SVG reusable block system.

Responsibilities:

Key exports:

utils.js


Runtime Data Flows

Application Startup

  1. index.html loads client bundle
  2. app.js initializes runtime
  3. Project assets loaded (SVG, pages, audio)
  4. Reuse blocks registered and injected
  5. Contribution Surface initialized
  6. SVG scanned and animations assigned

Cue Execution Flow

  1. Playhead or UI event triggers cue
  2. oscillaCueDispatcher schedules execution
  3. oscillaAnimation runs visual behaviour
  4. Contribution Surface may execute audio triggers
  5. OSC messages emitted if configured

Network & OSC


Server & Build System


Documentation


Immediate Technical Notes

Low-risk cleanup candidates:


Summary

Oscilla’s architecture separates authored structure (SVG Score Layer) from live execution and contribution (Contribution Surface), coordinated through a cue dispatcher and unified runtime.

This modular design supports composed scores, live interfaces, and distributed performance within a single browser-based system.

Tip: use ← → or ↑ ↓ to navigate the docs