Sound engineering with LLMs
Building field test, a browser DJ console powered by the Web Audio API and Google's Lyria 3.5 and Lyria 3 Clip music models.
Watching electronic festival sets from Coachella made me wonder how much of those surreal stage backdrops came from generative AI. Seeing clips of Rezz's PORTAL production, with its massive circular LED wall and hypnotic animations, I assumed the visuals were AI-generated. While checking sources for this post, I found out I was completely wrong. In March 2025, Exron Music quoted Rezz's response on X: "every single piece of content was made by human individual artists on that screen ... not 1 part of the performance was AI." Bending Lite designed the lighting and stage production. VJ Cam MacNeil and his collective X CVLT created custom animations for what MacNeil calls an 8K circular display in a Stage Hoppers interview. Knowing human artists built every frame on that screen by hand makes PORTAL far more impressive.
Other Coachella productions did bring AI into their visual workflows. For Coachella 2026, Anyma used Google Gemini in pre-production to test thousands of early concepts for ÆDEN before handing a concrete plan to human choreographers, dancers, and 3D studios. At Coachella 2024, Grimes and Xite Labs paired MOVE AI motion capture with Unreal Engine to drive a real-time digital twin on booth screens and in broadcast AR. In 2026, Coachella's innovation team also partnered with Google DeepMind on three Project Genie prototypes, including a 3D stage pre-visualization app for smaller acts and a navigable Unreal Engine archive of a Quasar set.
Almost all of that festival AI conversation focuses on stage visuals. I wanted to test the sound side instead, pairing a language model with Google's latest music models to build loops and beds you can actually mix. To find out, I built field test, a browser-based DJ console and standalone sample studio running on the Web Audio API and Google's Lyria stack.
Inside the browser console
Opening field test at the DJ console loads a dual-deck controller straight into a browser tab, with no desktop DAW or plugins to install. I modeled the white four-channel layout after a Pioneer DDJ-FLX10: drag-to-spin jog wheels with 26 outer notches, tempo sliders, three-band EQ, Color FX, performance pads, and a center crossfader. Underneath the interface, every audio path runs on the standard Web Audio API. An AudioContext routes AudioBufferSourceNode clip playback through per-channel GainNode faders and BiquadFilterNode filters, while left and right AnalyserNode instances drive the live master level meters in the center strip.

Below the decks, the workspace turns into a four-channel bar-grid timeline split into CH 1 DRUMS, CH 2 BASS, CH 3 LEAD, and CH 4 VOICE / FX. Separating a session into four musical roles lets you audition a groove bar by bar before mixing it live on the jog wheels. The slide-over sample library ships with eight seeded electronic loops and accepts your own audio uploads. Right above the grid, an inline prompt bar lets you pick an engine (Lyria 3 Clip, Lyria 3.5, or MiniMax) and generate a fresh clip directly into the session.

Moving to the Lyria stack
Earlier versions of field test defaulted to MiniMax and called a legacy generateContent endpoint for Google audio clips. Upgrading to @google/genai version 3.6.1 moved the entire media path onto Google's Interactions API and Lyria music generation models. Clips of 30 seconds or less route to lyria-3-clip-preview ($0.04 per clip), longer arrangements route to lyria-3.5 ($0.08 per song), gemini-4-hydrogen rewrites rough user prompts, and gemini-nano-banana-2.1 draws square cover art for the library. In the standalone sample studio, choosing 60S switches automatically from Lyria 3 Clip to Lyria 3.5. Each finished WAV and cover image saves locally to browser IndexedDB, with one-click WAV download and direct access back in the DJ console.

Wiring these models up surfaced three sharp edges that are easy to hit on a first run. First, Google's JavaScript examples initialize new GoogleGenAI({}) without an apiVersion option, yet @google/genai version 3.6.1 defaults to v1. Against v1, both lyria-3-clip-preview and lyria-3.5 returned HTTP 404 Model not found in 117 to 181 milliseconds; passing apiVersion: "v1beta" fixed both models immediately. Second, both Lyria models and gemini-nano-banana-2.1 require a Paid-tier API key. In my tests, a Free-tier key returned HTTP 429 with a daily limit of zero on lyria-3-clip-preview and gemini-nano-banana-2.1. Third, Lyria 3 Clip and Lyria 3.5 generate vocals and lyrics by default, so instrumental DJ loops need an explicit "Instrumental only. No vocals, no lyrics." directive in the prompt.
Google exposes three Lyria models, each suited to a different audio workflow. I wired field test to the two batch Interactions API models (lyria-3-clip-preview for short loops and lyria-3.5 for full tracks) because deck playback and bar grids need complete audio buffers. For live interactive steering, lyria-realtime-exp takes a different path over WebSockets, blending weighted text prompts into a continuous raw PCM stream without vocals.
Google Lyria music generation models
| Model | Best for | Output and price | Key constraint |
|---|---|---|---|
| Lyria 3 Clip | 30-second loops, hits, and quick previews | 30s stereo MP3, $0.04 per clip | Preview; Paid tier only; adds vocals unless prompted instrumental |
| Lyria 3.5 | Full multi-section tracks with builds and drops | 44.1 kHz stereo MP3, $0.08 per song | Stable; Paid tier only; mixed stereo output with SynthID watermark |
| Lyria RealTime | Live WebSocket steering with weighted prompts | 48 kHz raw 16-bit stereo PCM stream | Experimental; instrumental only; up to 2s control latency |
Generating clean DJ samples
Sending a loose one-line idea straight to a music model leaves tempo, instrumentation, and song structure up to luck. Following Google's Lyria prompt guide, field test splits sample creation into a two-stage pipeline so an LLM handles musical specification before Lyria renders audio.
- Expand the idea with a fast LLM. In
field test,gemini-4-hydrogen(withthinking_levelset to"low"andstore: false) rewrites a short phrase into a rights-safe Lyria prompt. It leads with the subgenre, names concrete hardware textures (TR-909 drum machine,303 acid bass,analog synth pads), and describes how those parts interact. It also locks the requested BPM and strips artist or song names. Requests of 30 seconds or less ask for an immediate groove, while longer prompts ask for timestamped sections. When instrumental mode is active, the route appends"Instrumental only. No vocals, no lyrics."and falls back to the raw finalized prompt if the rewriter times out. - Route requests by clip length. Grooves of 30 seconds or less go to
lyria-3-clip-preview, and longer structural builds go tolyria-3.5, both overv1betawith up to three retries on transient failures. In my live test runs, callinglyria-3-clip-previewdirectly from the CLI finished in 10.78 seconds without a rewrite step. Through the full/api/ai-generateroute, a 16-second 128 BPM acid loop took 15.15 seconds end to end, and the live browser render above clocked 18 seconds. A 60-second 124 BPM buildup throughlyria-3.5finished in 37.77 seconds, trimmed from a 146-second full arrangement. - Trim, micro-fade, and transcode to WAV. In my
ffprobechecks,lyria-3-clip-previewreturned a 30.77-second stereo MP3 at 44.1 kHz and 194 kbps, whilelyria-3.5returned a 146-second stereo MP3 at 44.1 kHz and 192 kbps. Raw cuts on compressed MP3 frames click when a loop wraps around. The route probes the audio, clamps it to the requested span (8s,16s,30s, or60s), and applies a 20-millisecond fade-in with a 60-millisecond fade-out inffmpeg. It then writes an uncompressed 44.1 kHz stereo 16-bit PCM WAV (pcm_s16le) for sample-accurateAudioBufferdecoding. - Pair each clip with square cover art. Calling
gemini-nano-banana-2.1through the same Interactions API gives every clip a 1:1 abstract cover image with a purple accent and no overlaid text or logos. In my test run, the cover route returned a 963,937-byte JPEG in 10.31 seconds, whichfield teststores right beside the WAV in browser IndexedDB.
Where generative audio falls short
Mixing generated audio on a deck exposes clear limits quickly. Lyria outputs one mixed stereo track instead of isolated multi-track stems. The field test console includes DRUMS, VOCAL, and INST stem toggles, yet pulling one instrument out of a Lyria clip still requires a separate stem splitter. Inside the arrangement grid, the cleaner workaround is generating dedicated single-role clips for CH 1 DRUMS, CH 2 BASS, CH 3 LEAD, and CH 4 VOICE / FX. Fixed-second trims with micro-fades prevent pops at the boundary, though tight bar-locked looping still depends on steady tempo from the model and checking the downbeat by ear.
Licensing and provenance sit beside those technical limits. Google embeds SynthID watermarks into Lyria audio, so field test treats generated clips as working sketches and practice beds instead of cleared commercial masters.
What I learned about music models
Prompt translation does half the musical work. A loose description leaves tempo, texture, and structure to chance. Letting a fast language model expand that idea into a subgenre, concrete hardware instruments, a target BPM, and explicit instrumental constraints turns one-liners into predictable building blocks.
At $0.04 for a 30-second clip rendered in about 11 to 18 seconds, or $0.08 for a full multi-section track in about 38 seconds, generation speed changes how you explore sound. Sound design feels immediate inside a browser studio, even though mixed stereo output (with no native isolated stems) and beat-locked looping remain real constraints.
Between a raw API call and usable audio, most of the practical gap is plumbing. Switching @google/genai from v1 to v1beta, accounting for Paid-tier gating, overriding vocals-by-default behavior, and running MP3-to-WAV micro-fade post-processing are what make generated clips play cleanly on a deck.
Factor in SynthID watermarking and rights limits, and today's music models have a clear role in creative work. Like Gemini in Anyma's stage pre-production, they work best as a fast sketchpad and texture engine for testing musical ideas, while human artists and performers still own the finished craft. To hear that boundary yourself, render a 16-second instrumental groove in the sample studio, load it onto a deck in the DJ console, and listen closely at the loop seam.