YM2149 / AY sound designer
Design sounds for the Yamaha YM2149 and AY-3-8910 (Atari ST, ZX Spectrum 128, Amstrad CPC, MSX) — three tones, noise, all 16 envelope shapes, the mixer, live registers and code export — and play or inspect .YM music files (LHA-packed YM3/YM5/YM6) and SNDH headers.
Added
How to use it
Three tabs:
-
Sound designer — set each channel’s note or period, tone/noise mix, volume or envelope, the noise period, the envelope period, and pick one of the 16 envelope shapes (drawn from the chip’s own state machine). Sound on plays the registers live; the on-screen piano or your keyboard (
A W S E D F T G…,Z/Xfor octave) plays the chosen channel. The register panel shows R0–R13, and Export writes them as Atari ST 68000 code, Spectrum 128 Z80 or BASICOUT`s, MSX BASIC `SOUNDstatements, or plain values. Choose YM2149 or AY-3-8910 for the volume curve, and the clock of your machine. -
YM / SNDH files — drop a
.YMfile. Most are LHA archives (-lh5-); the tool unpacks them itself and checks the CRC. It reads YM2, YM3, YM3b, YM5 and YM6, shows the title, author, frame rate, clock and loop point, draws each channel’s pitch over the whole song, and plays it (with per-channel mute, seeking, and WAV rendering). A demo tune is built in. -
Note table — the tone period for every note at each machine’s clock, with the tuning error in cents, and as
dc.wdata.
Chip notes
-
Tone:
frequency = clock ÷ (16 × period), a 12-bit period in R0/R1, R2/R3, R4/R5. -
Noise: a 17-bit LFSR clocked at
clock ÷ (16 × R6), R6 being 1–31. -
Mixer (R7): bits 0–2 turn off tone A–C, bits 3–5 turn off noise A–C. A channel’s output is the AND of its (tone or disabled) and (noise or disabled).
-
Volume (R8–R10): 0–15, or bit 4 to follow the envelope.
-
Envelope: period R11/R12, each ramp takes
256 × period ÷ clockseconds. Shape R13 bits: CONTinue, ATTack, ALTernate, HOLD; writing R13 restarts the envelope. A fast sawtooth or triangle envelope on a channel with tone off is the "sync-buzzer" bass sound. -
The YM2149’s envelope has 32 steps (the AY’s has 16), so YM envelopes are smoother.
Limits
-
YM5/YM6 special effects (SID-voice, digidrums, Sinus-SID, sync-buzzer timers) are flagged but not reproduced — the player plays the plain register stream.
-
SNDH files hold 68000 replay code, so only their header (title, composer, year, subtunes, timer) is shown. ICE-packed SNDH files are detected but not unpacked.
-
The level curves are approximations of measured chips.
Files never leave your browser.
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser; nothing you type leaves this page.