ASG01(Ambient Sound Generator 01) - link

ASG01: A Deep Dive into My Browser-Based Ambient Sound Laboratory

In the world of digital music production, we are often tethered to complex DAWs, gigabyte-heavy plugins, and intricate installation processes. ASG01 (Ambient Sound Generator 01) was born from a different philosophy: what if a complete ambient performance environment could live entirely within a single, dependency-free HTML file?

ASG01 is a self-contained browser instrument designed for the creation of evolving soundscapes, generative rhythms, and gestural textures. It requires no build step and no server—just a browser and an imagination.


The Aesthetic: A Terminal into the Ether

Before a single note is played, ASG01 establishes its identity through a meticulously crafted CRT-terminal aesthetic. Utilizing the monospaced font and a series of CSS and Canvas-based overlays—including scanlines, vignettes, and a layer of shifting film grain—the app feels like a recovered piece of retro-futuristic hardware.

The UI is intentionally minimalist, favoring dim whites and blacks, punctuated by a user-selectable accent color that synchronizes across all instruments. A row of glitching characters in the nav bar animates in sync with the music—faster and more chaotic as the audio level rises, drifting slowly when silence falls. It's an environment designed to fade into the background, allowing the sound to take center stage.

The Triptych of Sound

ASG01 is divided into three distinct modules, each exploring a different facet of sound synthesis and performance.


1. Granular (GS01): The Texture Engine

The Granular module is the heart of ASG01's textural capabilities. It functions as a live audio "freezer" and redistributor. By capturing audio from your system, microphone, or the internal Grid/Bloom engines, it populates a 4-second circular buffer.

From this buffer, thousands of "grains"—tiny snippets of sound—are spawned, each with randomized pitch, position, and stereo placement. Two independent granular engines (Synthesis A and B) run simultaneously on a shared AudioContext, occupying opposite frequency registers to build a stereo cloud of layered texture.


Key Features:

  • shpe (Grain Envelope Shape): Shifts the amplitude peak inside each grain from a sharp attack to a slow swell—controlling whether textures feel percussive or breathe gently into existence.

  • s.sct (Size Scatter): Randomizes individual grain durations for an organic, de-quantized feel.

  • rev (Reverse Probability): Each grain has a chance to play backward—great for surreal, waterfall-like textures.

  • Multi-Tap Diffusion Delay: A 5-tap golden-ratio delay (inspired by tapographic reverb) with per-tap stereo panning, slow LFO flutter, and a probability gate that lets echoes appear intermittently rather than constantly—used sparingly during generation to avoid fatigue.

  • prsv (Buffer Preservation): A feedback dial that allows old audio to persist, creating layers similar to tape echo.

  • Pitch Drift & Head Jumps: Stochastic controls that introduce glitchy textures and sudden discontinuities.

  • BH-Viz: A mesmerizing "Black Hole" particle disk that reacts to the audio's frequency spectrum.

Granular Panel showing the waveform, splice markers, and the BH-disk particle visualization

Expanded State of Granular with full controls and delay options


2. Grid (IG01): The Generative Composer

The Grid is a 16×16 step sequencer designed for minimal, ambient pulses. Rather than forcing the user to program every note, it features a context-aware Generate engine. Select a Mood and hit generate — the engine composes a full 8-page song arc, from gentle intro to peak intensity and back to a quiet breakdown.

Mood System (12 moods): Each mood is a complete sonic personality — a curated combination of scale family, BPM range, voice character, filter brightness, and reverb depth. All scales within a mood are pre-vetted to avoid harsh intervals.

random ✦ (default): Rather than staying in one mood, each auto-progress generation steps to a perceptually adjacent mood on an internal mood ring—ordered by register and brightness. Key changes follow the circle of fifths; scale transitions maximize common tones for smooth voice leading. Songs feel connected rather than jarring.

Voice System (7 timbres): Notes can be rendered as sine, triangle, square, saw, chime, string, or air. The string voice uses a richly inharmonic periodic wave for a plucked koto character; air uses a warm odd-harmonic wave with a slow reed-like swell. Each mood assigns a lead voice that determines its primary character.

Harmonic safety:

  • A consonance guard rejects same-column semitone or tritone clashes

  • Heavy-drone moods (modal, ritual) also check adjacent columns — preventing beating from long sustain tails overlapping into the next step

  • Plucked voices (string, chime, glass) limit vertical note stacking to one note per column and thin euclidean patterns — keeping articulate textures spacious

  • The Spiral View: Beyond the traditional grid, users can toggle a polar "Spiral" sequencer, offering a unique geometric perspective on rhythmic loops.

  • Generation Details: Every generation produces a "generation details" accordion below the grid — a prose description of the song's character, scale, key, and arc structure. Closed by default; expanding it triggers a canvas redraw so the topographic visualization adapts to the new page height.

grid tab in spiral mode with an active 16-step sequences

grid tab in grid mode with an active 16-step sequences

grid panel in with per note fx controls exposed

grid panel in with global fx controls exposed

The Generation Engine: Controlled Randomness

At the heart of the Grid module is a context-aware generation system that goes well beyond simple randomization. Rather than placing notes at random, it operates through a layered set of musical constraints — mood profiles, rhythmic strategies, and harmonic gravity centers — that guide the algorithm toward patterns that feel composed rather than computed.

Single-Page Generation

A standard generate populates the active page using one of two rhythmic strategies. Euclidean distribution spreads a chosen number of pulses as evenly as possible across the 16 steps using the Bjorklund algorithm — the same mathematical method found in West African and Cuban rhythmic traditions. Anchor-scatter fixes a set of structural column positions (the "anchors"), then probabilistically distributes additional voices around them. The result in both cases is a 16-step pattern that feels neither mechanical nor random.

Song Arc: Shift+Generate

Holding Shift before clicking Generate activates Song Mode, which composes all 8 pages at once as a single structured arc. This is where the system moves from texture generator into something closer to algorithmic composition.

The arc follows an 8-section narrative: intro → build → build → peak → peak → develop → breakdown → outro. Each section carries its own density value — a multiplier that governs how many notes appear, how much reverb the sound carries, and how open the filter is. Density ranges from 0.14 at the intro to 0.46 at the peak — sparse by any conventional standard, but calibrated for ambient space rather than rhythmic drive.

A 4-chord harmonic progression (tonic → subdominant → dominant → tonic return) runs beneath the arc, expressed not as traditional chord voicings but as harmonic gravity centers: clusters of rows (pitch registers) that notes are pulled toward with varying probability. Notes near a section's gravity center play more reliably; notes further away are quieter and more likely to drop out.

Two elements provide continuity across all 8 pages. A seed Euclidean rhythm is generated once and shared as rhythmic DNA — each page rotates it by a prime number offset [0, 2, 5, 7, 11, 13, 3, 6], so the pulse feels familiar without repeating. A melodic motif of 3–4 cells is similarly generated once and placed on every page, with variations: a retrograde (time-mirror) at the peak, and a column offset in the outro. The result is a composition with internal coherence across its full duration.

Sparse ghost notes — very quiet, high-register sine tones — appear throughout, weighted toward the edges of the arc where density is lowest. At the intro and outro, they form much of the texture; by the peak, they have largely receded.

Generation details

Every generation concludes with a prose footnote: a short algorithmic poem describing the session's character. It names the mood, the scale, the rhythmic strategy, the motif length, the bass register, and the structural shape of what was just generated. It's equal parts musical description and proof of work — a record of the exact decisions the algorithm made, rendered in the same quiet register as the music itself.


3. Bloom (BM01): The Gestural Expressionist

Bloom is an instrument of pure gesture. The right panel is a touch-responsive field where each interaction spawns a sustained tone. Dragging your finger controls stereo pan and filter cutoff in real-time.

The left panel visualizes these voices through Chladni patterns—mathematically accurate representations of standing waves in a vibrating plate. As you add voices, their patterns superimpose, creating a living, shifting tapestry of geometry and sound.

Bloom Panel showing multiple active touches on the right and superimposed Chladni patterns on the left


Technical Underpinnings: The Magic of Web Audio


ASG01 is a testament to the power of the modern Web Audio API.

  • AudioWorklet: The granular engine runs on a custom AudioWorklet, ensuring high-performance audio processing that remains glitch-free even during heavy modulation.

  • Custom Waveforms: The "Chime" waveform uses a custom `PeriodicWave` with inharmonic partials to simulate the metallic strike of a cylindrical rod.

  • Zero Dependencies: The entire application—from the audio processing to the marching-squares algorithm used for Chladni visuals—is written in vanilla JavaScript.


Synergy: A Unified Performance Space

While each instrument is powerful on its own, the true magic of ASG01 lies in their synergy:

  • Audio Routing: The output of the Grid and Bloom can be routed directly into the Granular engine, allowing you to sequence a melody and then instantly shatter it into a cloud of shimmering textures.

  • BPM & Color Sync: A shared clock ensures that granular density and Bloom LFOs stay in time with the Grid's pulse. A single click on the color legend updates the entire app's visual identity — accent color, visualization lines, and particle hue all change together.

  • Audio-Reactive Visuals: When the Grid is playing, the character animations in the nav bar (and the zko.io link) flicker in sync with the granular audio level — a small but visceral signal that the system is alive and listening.

Saving, Sharing, and Exporting

ASG01 has three ways to capture what you make, depending on which instrument you're working with.

Grid: save, load, and share

The grid sequencer has a full session system. Hit save to download a .json file containing your entire 8-page composition — every note, every FX setting, every LFO, the BPM, the scale, even the accent color. Load restores it exactly as you left it. This means you can build something over multiple sessions, or hand a file to someone else to open.

Share goes further: it compresses your entire session into a URL hash and copies it to your clipboard. Anyone who opens that link gets your exact composition loaded automatically, no file needed. The state is encoded directly in the URL itself — there's no server involved.

Granular: audio export

The granular tab has an export button that records the processed output — the grain cloud after reverb — directly to a file. You can choose WAV (uncompressed, full quality) or WebM (smaller, Opus-compressed), and pick a duration of 10, 30, or 60 seconds. It captures whatever is playing at that moment, so freeze a buffer texture you like, dial in the grain settings, hit export, and you get a clean audio file you can drop into a DAW or upload anywhere.


Closing Thoughts


ASG01 is more than just a synthesizer; it's a sandbox for discovery. It's about finding the beauty in a single frozen grain of sound, the accidental harmony generated by a rhythmic algorithm, or the way a mood can slowly drift from crystalline brightness to liminal darkness across a session without you ever touching a dial.

Whether you're looking for a tool for live ambient performance or a meditative background soundscape for focus, ASG01 invites you to open a browser and start listening.

Try it out at here. and if you like it feel free to donate via Venmo to @zarniko