← All modules
AvailableInstrument

Sampler Reference

Play a sample library the way its author mapped it.

Engine preview

Not built for macOS, Windows or Linux

About

A sample library is not just audio: it is a map. Which recording answers which key, which layer answers a hard strike, which takes rotate so a repeated note does not sound mechanical. Sampler reads that map from the instrument's own file rather than asking you to rebuild it.

The import target is Decent Sampler's .dspreset format, and the reason is straightforward: it is a declarative XML manifest, it is free to publish in, and pack authors adopted it in numbers. Importing it faithfully means feature parity for the instruments people actually publish, without inventing a format first.

Faithful means counted, not assumed. The importer reports what it could not bring across instead of dropping it quietly, so an instrument that loses something says so. What it does bring across — key ranges, velocity layers with crossfades, tuning, gain, loops, round robin order, choke groups, the authored keyboard colouring — travels as data, not as a claim that every engine implements all of it.

Groups are the unit of playback, which is the one place the format and the program model genuinely differ. Decent Sampler sounds every matching sample at once; a program picks one region per velocity cell. Merging groups would round-robin where the format layers, so each authored group becomes its own program and they stack — the mapping the format actually means.

Aurora Keys, the bundled instrument, is original: every sample is synthesized from equations with a fixed seed, so the whole bundle is redistributable and the module is playable the moment it loads.

Both browser engines play the package-owned multisample catalog. The instant preview runs the clean-room JUCE-compatible PreparedSamplerInstrument in TypeScript; the optimized engine prepares the selected immutable bank from the same verified audio assets before notes can run.

This module is a reference oracle, not the shipping sampler. Its playback runs in Web Audio, which this repository does not allow as a production DSP lane, so the product sampler is Codex Sampler: the same selection semantics ported into a ScriptC kernel that compiles to the browser WASM lane and to VST3, CLAP, AU and standalone from one source. What stays valuable here is precisely what an oracle is for — an independent implementation to hold the compiled one to, which is how the compiled kernel’s round robin, loops, release triggers, keyswitches and velocity crossfades were measured rather than asserted.

Build evidence

Every row below is a recorded build row or the recorded absence of one. Nothing here is inferred from what this module is meant to support.

Module
music.codex.sampler-reference v0.2.0
Built at
no recorded row carries a build time; the browser lanes record none
Closure hash
not a Processor — no lowering closure
Toolchain
  • scriptc 64acce1ae3b8…
  • moduleToolchainDist c621ffab721d…
  • pluginShellKitRuntime bca003784692…
  • faceShellGeneration 8533207ab81f…
  • uiPreservation cd28dbd7e3d6…
  • packagerVersion 3
Build result and download for each format
FormatResultDownload
Browser package (JS)Not built by this module's lane

this module has no release.json; its packager lane records no browser program rows

Not built for the browser
Browser package (WASM)Not built by this module's lane

this module has no release.json; its packager lane records no browser program rows

Not built for the browser
VST3Not built

no recorded artifact row for vst3; native-lane-report.json is absent or records no vst3 row for this module

Not built for macOS, Windows or Linux
Audio UnitNot built

no recorded artifact row for au; native-lane-report.json is absent or records no au row for this module

Not built for macOS
CLAPNot built

no recorded artifact row for clap; native-lane-report.json is absent or records no clap row for this module

Not built for macOS, Windows or Linux
Standalone appNot built

no recorded artifact row for standalone; native-lane-report.json is absent or records no standalone row for this module

Not built for macOS, Windows or Linux

Parity

No lane recorded an artifact; there is no parity evidence.

Presets

Start from a named sound, then adjust the instrument to make it yours.

InitAurora Keys · DefaultAurora Keys · Soft PadAurora Keys · PluckedPocket Kit · DefaultPocket Kit · TightPocket Kit · Roomy

Signal graph.

Experimental

Migration fallback: approximated from parameter groups, not a runtime wiring diagram.

How it works.

The .dspreset is parsed by a self-contained XML reader rather than DOMParser, so the same import runs in the browser and under `node --test` with no DOM. The parse is pure: text in, regions out. It never throws on instrument text, and anything it does not speak is counted in `ignored` with malformed values collected in `warnings`, so a lossy import is visible rather than silent.

Each authored `<group>` becomes its own sampler program, and the programs stack. This is the one deliberate divergence from a naive merge: Decent Sampler plays every matching sample simultaneously, while a program resolves one region per velocity cell, so merging the bundled instrument's soft and bright groups would rotate between them instead of letting velocity choose. The importer flags the ambiguous case, and building per group avoids it entirely.

Region payloads are generic, which is what makes the loader boring. The importer produces regions whose payload is a path reference; the playback layer maps that payload to a decoded AudioBuffer and keeps every other field — key range, velocity layer, tuning, gain, loop points — exactly as imported. Nothing re-derives the map from the audio.

Selection runs on key first, then velocity, then round robin. A region whose explicit key range contains the note wins outright; regions without one compete by nearest root and are repitched, bounded by a maximum stretch. If every region is velocity-ranged and none contains the strike, the note is silent by policy — legible silence beats the wrong sound, the same rule the zone map uses for out-of-reach keys.

The keybed is drawn from the same parse the audio comes from. Colour washes are the instrument's `<keyboard>` ranges converted from hex ARGB, and the muted keys are the program's own playable range, so a key that looks unmapped is unmapped. Feeding the UI from the program rather than from a second hand-written table is what keeps the two from disagreeing.

The published package carries both Aurora Keys and Pocket Kit as content-addressed instrument documents plus all 17 immutable audio assets. A generic host selects the document from the instrument parameter, verifies and decodes only its declared assets, then prepares either the instant TypeScript preview or the optimized sampler bank; switching instruments tears down the old bank before installing the new one.

Goes well with.

Preview

Granular

A recording split into a playable grain cloud.

PreviewNot built for macOS, Windows or Linux
Preview

Tetra Box

A sixteen-pad drum machine whose whole kit morphs across three faces at once.

Preview
Preview

Wavetable

Single-cycle waves with continuous position morphing.

PreviewNot built for macOS, Windows or Linux
Preview

Pluck

A physical string model, rendered per note.

Preview

Syntho Sampler

A free instrument for playing layered sample libraries.

Free