Relocate the ~6k-file docs tree from the repo root into plugins/document-navigator/docs/ so the plugin is self-contained and portable. docs/superpowers/ (specs and plans) stays at the repo root. Moved via cp+rm rather than git mv because directory rename() fails with EPERM on this WSL /mnt DrvFs mount; git rename-detection pairs the identical-content files at commit time. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3.8 KiB
3.8 KiB
@suaveplan/audio-transport - Universal musical clock and transport: sample-accurate scheduling with PPQ, BPM automation, swing, time signatures, and loop regions. Zero browser or Node dependencies.
Universal musical clock and transport: sample-accurate scheduling with PPQ, BPM automation, swing, time signatures, and loop regions. Zero browser or Node dependencies.
Documentation tree
- error-codes — This module defines the canonical error codes, metadata, and error class for the
@suaveplan/audio-transportpackage.…- error-codes — This module defines the canonical error codes, metadata, and error class for the
@suaveplan/audio-transportpackage.…
- error-codes — This module defines the canonical error codes, metadata, and error class for the
- scheduler — The
TransportSchedulerclass drives the lookahead loop that polls the transport and fires scheduled callbacks. It bri…- scheduler — The
TransportSchedulerclass drives the lookahead loop that polls the transport and fires scheduled callbacks. It bri… - scheduler.schemas — Zod boundary schema for
TransportSchedulerconstruction options.
- scheduler — The
- signal — The
Signalclass implements a piecewise automation curve for scalar parameters such as BPM. It stores automation poin…- signal — The
Signalclass implements a piecewise automation curve for scalar parameters such as BPM. It stores automation poin… - signal.schemas — Zod boundary schema for
Signalconstruction options.
- signal — The
- tick-source — The
TickSourceclass converts between audio time (seconds) and musical ticks, integrating tempo curves for sample-acc…- tick-source — The
TickSourceclass converts between audio time (seconds) and musical ticks, integrating tempo curves for sample-acc… - tick-source.schemas — Zod boundary schema for
TickSourceconstruction options.
- tick-source — The
- time — This module parses musical time tokens and converts between ticks, seconds, and bars:beats:sixteenths notation.
- time — This module parses musical time tokens and converts between ticks, seconds, and bars:beats:sixteenths notation.
- time.schemas — Zod boundary schemas for time-related types.
- transport — The
Transportclass is the core musical clock and scheduler. It manages playback state, event scheduling, loop region…- transport — The
Transportclass is the core musical clock and scheduler. It manages playback state, event scheduling, loop region… - transport.schemas — Zod boundary schema for
Transportconstruction options.
- transport — The
Install
bun add @suaveplan/audio-transport
Quick start
import { Transport, TransportScheduler } from "@suaveplan/audio-transport";
const clock = () => Date.now() / 1000;
const tr = new Transport({ clock, bpm: 120, ppq: 192 });
const scheduler = new TransportScheduler(tr, clock);
tr.scheduleRepeat((time) => {
console.log("beat at", time);
}, "4n");
tr.start();
scheduler.start();
Modules
- Transport — musical clock and event scheduler
- TransportScheduler — lookahead poll loop
- TickSource — audio time to musical ticks
- Signal — tempo automation curves
- Time — musical time parsing and conversion
- Error Codes — structured error registry