# Chip-synth sound: music and effects without audio files

> We build browser sound from oscillators, notes and envelopes, then connect it to game events and measure the mix. No audio files to download.

Published 2026-10-04 by REDAGE (REDAGE is an independent studio making slot games for Stake, built on Engine: pixel-art games, and now HD ones too). Page: https://redage.dev/devlog/chip-synth-sound/

> Written before Stompkin went live. It covers the chip synth of our pixel games, including the original pixel-art Stompkin and the first builds of Rust Rook. [Stompkin HD](https://redage.dev/games/stompkin/), the version live on Stake, keeps live music but plays produced sound effects from audio files, and [Rust Rook](https://redage.dev/games/rust-rook/), live on Stake since October 2026, plays produced music and sound effects.

Jack's stomp begins with a low sine wave that drops in pitch as he hits the board. We add a hollow knock and a crack of filtered noise to give the pumpkin some weight. Nobody had to drop a pumpkin near a microphone.

We synthesise the music and effects live in the browser with Web Audio. [Kaiju Snack](https://redage.dev/games/kaiju-snack/) and [Neon Eclipse](https://redage.dev/games/neon-eclipse/), both live on Stake, ship without a single audio file, and so did the first builds of Stompkin and Rust Rook. We started with Kaiju Snack's synth and built the shared kit from it, letting each game supply its own songs, effects and mix settings.

## Pitch with a beginning and an end

An oscillator repeats a waveform at a chosen frequency. We use pulse, triangle and sine voices. The pulse waves give us the chip character; changing their duty cycle changes their texture. Triangle and sine waves give us rounder tones for bass, glides and bells.

We write pitches as note names or numbers. A name such as `C#5` becomes a MIDI note number, then a frequency. We can hold that pitch, glide through a path of notes or cycle through an arpeggio without recording each variation.

The envelope shapes the volume through attack, decay, sustain and release. We start the gain at zero, ramp it up, let it decay towards a sustained level, then release it towards silence. A sharp attack makes a note strike; a longer one lets it swell.

For cracks, swishes and percussion, we generate noise into a buffer and filter it. A bell combines sine partials with separate decays and a strike click. We layer these ingredients to build an effect, giving the pitched body and the noisy edge different lengths.

## Writing a song as rows

Our songs contain sections and bars, with channels for melody, bass, chords, arpeggios and drums. The tracker grid has 16 rows per bar. Notes specify pitches, holds extend them and rests leave space; tempo and instrument settings travel with the song.

We schedule the notes against the audio clock with a short lookahead. Raising the intensity brings in extra layers and changes the music's filter and level. The same tune can leave room for a quiet board or build underneath a feature.

Rust Rook's base music uses a D Dorian wire motif and a rail pulse. Night Shift keeps that identity but adds layers across five intensities. We change the track when the game moves between modes, and set the intensity with it. A peck or a magnet collection plays over the song without choosing another track.

## One landing, one sound

In Stompkin we start the stomp on Jack's contact frame and pass in how many groups he clears. For a landing that clears three groups, we play the descending sine body, triangle voice, hollow knock and filtered noise together, then add a second crack. We still play one composite stomp, so three groups do not produce three competing impacts.

The music dips briefly under that hit. We combine overlapping requests for a dip so a lighter effect cannot turn the music back up while a heavier impact needs the space. We also limit rapid repeats and simultaneous effects by category and priority. A busy board should not bury Jack under a pile of his own stomps.

We can delay an effect to follow another, keeping the contact separate from the next clear or flame rise. Music changes have their own timing: we can crossfade, or wait for the next bar and play a song's ending section during the handover. Asking for the song already playing leaves it running.

## Measuring what reaches the mix

We render sound into a sample buffer with an OfflineAudioContext, using the same synthesis and scheduling as live playback. The sequences include overlapping effects, repeat limits and track transitions.

We inspect peak amplitude and RMS, the square root of average squared sample values. We measure K-weighted loudness too: integrated loudness with quiet passages gated out, momentary loudness over 400 milliseconds and short-term loudness over three seconds. Comparing an impact with the music underneath helps us catch effects that disappear into the tune.

We repeat the analysis through a phone-speaker model, a high-pass filter at 400 Hz, to find sounds that depend heavily on bass. We check audible onset, tails, gaps and isolated clicks as well. Listening on speakers and headphones still needs a separate pass; a filter cannot judge whether a tune wears out its welcome.

## Letting the flame change the sound

Stompkin's flame-rise effect takes Jack's new rung and uses it to change the noise sweep, pitched glide and bell note. His flame stage also selects the music intensity. The same values that move the flame can move the sound, with no extra recording to load.

The payouts follow the rules explained in [how we test a slot's math](https://redage.dev/devlog/how-we-test-slot-math/). The download carries synthesis code and note data, with no recorded soundtrack or effect files to fetch. Jack's hollow knock comes from a few waveforms; the pumpkin survives another landing.

Source: https://redage.dev/devlog/chip-synth-sound/
18+. Stake.com is not available in every country, including the US, UK and Australia. Play responsibly.
