Skip to content

Developer Documentation

Welcome to the RMT Compose developer documentation. This section covers the internal architecture, APIs, and contribution guidelines.

Overview

RMT Compose is built with:

TechnologyPurpose
ES ModulesNative JavaScript modules
ViteBuild tool and dev server
WebGL2Hardware-accelerated rendering
Web Audio APIAudio synthesis and playback
Fraction.jsArbitrary-precision rational arithmetic
Rust/WASMOptional high-performance evaluation

Architecture

The system consists of several key layers:

┌─────────────────────────────────────────────────┐
│                    UI Layer                      │
│  (player.js, menu-bar.js, variable-controls.js) │
├─────────────────────────────────────────────────┤
│                  Core Engine                     │
│  ┌───────────┐ ┌────────────┐ ┌──────────────┐ │
│  │  Module   │ │ Expression │ │  Dependency  │ │
│  │ + Notes   │ │  Compiler  │ │    Graph     │ │
│  └───────────┘ └────────────┘ └──────────────┘ │
│  ┌───────────────────────────────────────────┐ │
│  │         Binary Evaluator (Stack VM)       │ │
│  └───────────────────────────────────────────┘ │
├─────────────────────────────────────────────────┤
│               Output Layers                      │
│  ┌───────────────────┐ ┌─────────────────────┐ │
│  │  WebGL2 Renderer  │ │    Audio Engine     │ │
│  └───────────────────┘ └─────────────────────┘ │
├─────────────────────────────────────────────────┤
│            Optional WASM Acceleration            │
│  (evaluator, compiler, fractions, graphs)       │
└─────────────────────────────────────────────────┘

Documentation Sections

Architecture

Core Systems

Rendering

Audio

WASM

API Reference

Contributing

Key Files

FilePurpose
src/main.jsEntry point
src/player.jsMain orchestrator
src/module.jsModule data model
src/note.jsNote data model
src/expression-compiler.jsText → bytecode
src/binary-evaluator.jsBytecode interpreter
src/dependency-graph.jsDependency tracking
src/renderer/webgl2/Rendering layer
src/player/audio-engine.jsAudio playback

Getting Started

  1. Set up your development environment
  2. Read the System Architecture
  3. Explore the Expression Compiler to understand the core
  4. Check the API Reference for implementation details

Released under the RMT Personal Non-Commercial License