OPM.js documentationOnline demos

Generated from Markdown source. Edit the source, not this HTML.

Changelog #

For installation and executable examples, see the README and the English / 繁體中文 usage guides.

v1.11.1 #

Package version 1.11.1, a GitHub release (not on npm). Performance patch over v1.11; no API, voice-format (still v7) or protocol changes. Output differs from v1.11 by about 1e-10 for sine operators. Security: scoped static review of the src/core change found no evidence-backed issue.

Faster sine operators #

Sine operators now use a deterministic polynomial fastSin (odd degree-13 after reduction to ±π/2) instead of Math.sin, and all-sine voices with static operator levels and shared AM take a branch-light render path. Measured on Node 26 with npm run benchmark: standard 8 held voices 0.265 → 0.215 ms/block (−19%), 32 voices 1.132 → 0.900 ms (−20%), high 32 voices 1.977 → 1.515 ms (−23%). fastSin is bounded by 1 with |error| ≤ 2.0e-10 against the exact sine (about −194 dB, below Float32 resolution) plus about 1e-16·|phase| from range reduction, and is pure arithmetic, so results no longer depend on each JavaScript engine's Math.sin rounding. Rendered samples differ from v1.11 at the ~1e-10 level; non-sine operator shapes, LFOs and effects still use Math.sin. These timings are one Node process on one machine, not a browser AudioWorklet or device measurement.

v1.11 #

Package version 1.11.0, published as a GitHub release (not on npm). Voice format v7 (per-operator waveforms and held noise; v1–v6 inputs still accepted), optional stereo effects, MIDI program maps with RPN bend sensitivity and approximate .opm import. Remote CI for the release content (commit 64ed642) passed on Node 22/24/26 and Chromium/Firefox/WebKit: https://github.com/JS-PACKAGE/OPM.js/actions/runs/37117509642. An isolated git archive build passed npm run security -- --package-smoke. Physical-device, MIDI-hardware and human-listening acceptance remain unverified, and GitHub distribution is separate from npm publication. The repository now lives at JS-PACKAGE/OPM.js; links to historical CI runs and review issues keep their originally recorded addresses.

Approximate OPM text import #

MIDI voice selection and bend sensitivity #

Voice v7 waveforms and held noise #

Optional stereo effects #

Release hygiene and verification #

v1.10 #

Package version 1.10.0. Portable arrangements, expressive MIDI exchange and scoped acceptance tooling; voice format remains v6. Historical tags and archives remain immutable. GitHub distribution is separate from npm publication and site deployment.

Portable music and expressive file exchange #

Acceptance boundaries #

Pre-release checkout verification #

Release-candidate verification #

v1.9 #

Package version 1.9.0. Integration and musical workflows release; voice format remains v6. Historical releases remain immutable. GitHub distribution is separate from npm publication; no npm publication is performed.

Integration and musical workflows #

Documentation and acceptance #

Observed verification and review boundaries #

v1.8.1 #

Package version 1.8.1. Documentation and packaging patch; no runtime API, voice-format, DSP or scheduling behavior changes. The original v1.8 tag and archive remain immutable. GitHub release distribution is not npm registry publication.

Documentation and packaging #

Security and observed release-candidate verification #

v1.8 #

Package version 1.8.0. GitHub release distribution and npm registry publication are separate operations; neither implies physical-device acceptance.

Engine and integration #

Security and observed verification #

GitHub release package and post-release documentation #

v1.7 #

Package version 1.7.0. GitHub release distribution and npm registry publication are separate operations; the historical v1.6 tag and artifact remain immutable.

Musical scheduling, rendering and expressive control #

Pre-release feature verification #

v1.7 release-candidate verification #

v1.6 #

Package version 1.6.0. GitHub release distribution and npm registry publication are separate operations; the v1.5 artifact remains immutable.

Acoustic quality, expression and adoption #

v1.6 verification record #

v1.5 #

Package version 1.5.0. GitHub release distribution and npm registry publication are separate operations; the historical v1.4 artifact remains immutable.

Complete expressive playback and lifecycle #

Independent numerical and security acceptance #

v1.5 release verification #

WebKit interruption repair #

v1.4 #

Package version 1.4.0. Distributed through the GitHub release tarball; npm registry publication is a separate operation.

Sound quality and realtime acceptance #

Prepared patches and expressive notes #

Audio-clock scheduling and deployment #

Preset and DX7 audition #

Feature verification before release #

v1.4 release verification #

v1.3.0 #

Release verification and security review #

Detailed English website security policy #

Website favicon #

English example catalog #

Node.js 22 minimum #

Complete JavaScript/map/declaration triplets #

Minification and TypeScript source maps #

JavaScript-only distribution assets #

TypeScript source cutover #

v1.2.0 #

CI failure repairs #

Final deadline repair #

Readiness and additive features #

Verification and release gate #

Security review #

語喵 coordinated integration verification. Independent source reviewer FinalSecurity approved A/B/C/D after remediation, with no remaining blockers; FinalConsumerReview approved the consumer/lifecycle/DSP review after the reentrant voice-admission fix. Reviewers did not independently execute the runtime gates above; no release tag, publication, or external CI run is claimed.

v1.1.0 #

Release gate: 語喵 coordinated independent security reviewers ReleaseBoundary (A/B) and ReleaseDsp (C/D), both approving their assigned source/security slices with no blockers. Fresh verification passed all 37 tests, full and runtime-only npm audits (zero vulnerabilities), an empty runtime dependency tree, the distribution build, and an isolated v1.1.0 tarball installation exercising public exports, finite stereo PCM, note release, mono rendering, and bank parsing. The browser and differential-audio evidence below was obtained during the preceding optimization/documentation work; runtime code is unchanged since those checks.

Usage documentation #

Documentation verification: built and packed an isolated checkout, installed its tarball in a clean application, and executed five Node.js snippets and all three JSON voice examples. Chromium exercised seven extracted HTML examples with real AudioWorklet signal, including custom-voice early release and bundled-bank loading, with no observed browser/worklet errors. Runtime implementation is unchanged.

Optimization and compact distribution #

Measurements and verification #

Local Node.js v26.7.0 measurements using the scripts/benchmark.js workload, three warmups and nine timed runs. Real-time cases render 0.5 seconds at 48 kHz in 128-frame blocks; the offline case includes release and filter tail. Times are machine-dependent.

ScenarioOriginal medianOptimized minified median
Eight voices with LFO84.869 ms70.874 ms
Offline note with release27.857 ms16.774 ms

Original runtime JS/JSON totaled 33,741 bytes. Minified assets total 20,319 bytes; the sums of separately compressed gzip/Brotli variants are 9,014/7,987 bytes. These are asset totals, not npm tarball sizes.

Verification: 37 tests passed against source and the same 37 against minified modules; differential smoke covered 288 scenarios and 1,505,688 samples for each implementation against the original, with byte-identical audio and chunk-independent output. All compressed assets decoded byte-for-byte. Chromium exercised both demo controls and actual AudioWorklet output, including audible signal, finite samples, release to silence, and clean shutdown. An isolated npm-tarball consumer exercised public browser/offline/voice-bank imports without development dependencies.

Security review #

Reviewed by 語喵 (AI assistant), with independent security and numerical reviewers, using SECURITY.md A–D. No changed-code blockers were found.

v1.0.0 #

First stable release of the documented browser and offline-rendering APIs.

Security review #

Reviewed by 語喵 (AI assistant) for this release, using the A–D checklist in SECURITY.md:

Verification: node --test (36 passing), npm ls --omit=dev --depth=0 (empty), npm audit --omit=dev (zero vulnerabilities), and npm pack --dry-run --json (18 intended entries).