GAMELANModal bronze · slendro

Ensemble

Resonator

Instrument
Decay
1.00x
Damping
1.00
Width
50%
Ombak
1.00
Beat
3.0 Hz

Mallet

Hardness
50%
Strike
10%
Decay
400 ms
Release
2.50 s
Level
80%

Tuning

Scale
Keyboard mapStruck-through keys have no bar behind them — they are silent on purpose.
Cdeg 1
C#
Ddeg 2
D#
Edeg 3
F
F#
Gdeg 4
G#
Adeg 5
A#
B
Cents per notecustom mode only

Preview DSP: a mallet strike convolved with a synthesised modal impulse response. Approximates the instrument, is not a compiled kernel, and carries no parity claim. Long tails (Gong Ageng) are capped at seven seconds; polyphony is eight voices, oldest stolen first.

Keyboard

Gamelan

← All modules
AvailableInstrument

Gamelan

Bronze, modelled — and tuned like it should be.

Presets

Preset names do work: they teach the parameter space faster than the table below does.

InitGender BarungBonang PanerusGong AgengSaron BarungKenongPekingKempul SuwukBell TowerVibraphone Dream

About

A gamelan is not a piano with a different sample set. Its bars and gongs are inharmonic — the partials sit at ratios like 2.3 and 3.6 rather than 2 and 3 — and its scales have five or seven notes to the octave, tuned by the smith rather than by a table. Both facts are structural, and an instrument that ignores either one ends up sounding like a bell patch. This module takes them as the starting point.

The sound is modal synthesis: each note is a short mallet strike convolved with a synthesised impulse response built from that instrument family's measured partial ratios, pitch-scaled to the note being played. Nothing is sampled. Changing the instrument rebuilds the partial set, which is why Gong Ageng and Peking are not the same sound transposed — they have different numbers of partials at different ratios with different decay profiles.

Tuning is part of the instrument, not a global setting somewhere else. In slendro and pelog most black keys and some white ones are silent, exactly as they are on a real gamelan, and the panel shows you which. That is a feature you have to mean: a key that makes no sound looks like a bug until you understand there is no bar there to hit.

This is a preview instrument. The DSP is hand-written Web Audio in the website's stand-in engine — good enough to play and to hear the microtuning clearly, but not a compiled kernel and not covered by any parity claim.

Take it into your DAW.

This one is web only — there is nothing to install, and nothing that stops working when you close the tab.

Same DSP as this page. The plugin isn't a rebuild — it's the identical kernel from the identical TypeScript source, compiled native instead of to WASM.

Free forever, no account, and playing it in the browser will never ask you for one. VST3 and standalone today; AU and CLAP are on the roadmap.

How it works.

Each note is an exciter driving a resonator: a two-to-twelve millisecond filtered noise burst with a leading click, convolved with an impulse response synthesised for that exact note. The IR is a bank of exponentially-decaying sinusoids placed at the instrument's measured partial ratios — 1, 2.3, 3.6, 5.25, 7.1, 9.35 for a bar metallophone, 1, 1.52, 2.33, 2.9, 3.98 for a hanging gong — pitch-scaled from the fundamental the ratios were measured at. Convolving the strike with those modes is what excites them, which is why Hardness changes the balance of partials and not just the brightness: a wider excitation spectrum reaches further up the inharmonic series.

Ombak is modelled where it actually happens. Paired gamelan instruments are tuned a few Hz apart so their combination beats, so the renderer places each mode at f minus half the ombak rate in the left channel and f plus half in the right. The beating you hear is genuine interference between two detuned partials, not an amplitude modulation applied afterwards — which is also why it survives being played polyphonically instead of all the voices pulsing in lockstep.

Rendering an IR is a few hundred thousand sine evaluations, so they are cached by instrument, note frequency and every timbre parameter that feeds the renderer. Play a scale and the cache fills note by note; move Damping or Ombak and the whole cache is dropped, because those parameters change the samples themselves rather than how they are played back. Voices are capped at eight with oldest-first stealing, and every voice's nodes are freed on a hard seven-second tail cap with a short fade — Gong Ageng's impulse response is six seconds long and convolution adds that to the note, so without the cap a few gongs would pile up convolvers indefinitely.

Tuning runs before any of that. A MIDI note goes through the shared tuning library, which returns either a frequency or null; null means the key is unmapped in the current scale and the voice is never created. Slendro maps five degrees onto C, D, E, G and A, pelog seven onto C, C#, D, E, F, G and A, and everything else is silent. Custom mode is equal temperament with a cents offset per pitch class, which is the practical way to dial in a specific gamelan's tuning by ear.

It's yours to read and to fork.

Research preview

npx codex clone gamelan
npm run dev

The codex CLI name is proposed, not shipped. That command gives you this module's DSP, schema, presets and UI as a local project — change a number, hear it immediately.

preview only · Web Audio modal-IR convolution · no compiled kernel

Goes well with.

Coming soon
A string, modelled rather than sampled.

Instruments

VST3
KeyboardMIDIDemo phrase
Available
A small subtractive synth with nothing to hide.

Instruments

Runs onlineVST3
KeyboardMIDIDemo phrase
Available
Convolution reverb: eight synthesized spaces, twenty-five real cabinets.

Effects

Runs onlineVST3
Guitar takeMicDemo phrase