◉ANTIGRAVITY LABJP
Articles/App Development
▣ App Development/2026-07-01Intermediate

Systematize Pre-Release Checks for Sound-Playing Apps with Waveform Rendering and Agents

The 6/26 update let Antigravity render audio files. Drawing on years of shipping sound in healing apps, here is a design that folds loudness, clipping, length, and silence checks into an agent verification loop, with the actual scripts.

Antigravity419audio assetspre-release checksindie development32quality gate3

✦ Premium Article

Run a healing app long enough and "sound" climbs into the surprising top ranks of reasons a star gets docked. "I used it before bed and it was suddenly loud," "I thought it was silent, then it played a few seconds in" — these quietly erode ratings more than functional bugs do.

Audio assets don't announce themselves with a compile error the way code does. Verifying every one by ear becomes unrealistic as the track count grows. With the 6/26 update, Antigravity can render audio files as waveforms inside the IDE, opening a path to offload part of this "ear work" to eyes and scripts. As someone who has shipped sound in indie apps, here is a design that systematizes pre-release audio checks as a verification loop.

Where audio assets actually cause accidents

First, let's make concrete which defects break the reader's experience. A vague "quality check" hands an agent a vague result.

Across my operations, the ones most likely to draw complaints and low ratings were four: loudness varying between tracks, peaks clipping into distortion, unnatural silence or an abrupt onset at the start, and loop material whose tail and head don't join smoothly.

Most of these are visible in the waveform. Put differently, if you reduce them to things a waveform can show, you can give the agent a footing for judgment.

Kill the machine-decidable parts first

Before sending anything to ears or an agent, automate what a number can decide. Skip this and reviews drown in subjective back-and-forth. I always run a light gate built on ffprobe and ffmpeg's loudnorm analysis before publishing.

#!/usr/bin/env bash
# audio-gate.sh — machine-judge audio assets before release
# usage: ./audio-gate.sh assets/sounds/*.wav
set -euo pipefail
 
# distribution targets (tune to your app)
TARGET_LUFS=-16      # a mobile playback ballpark
MAX_TP=-1.0          # true-peak ceiling dBTP
MIN_SEC=1.0          # reject material that's too short
MAX_HEAD_SILENCE=0.3 # allowed head-silence seconds
 
for f in "$@"; do
  dur=$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$f")
  stats=$(ffmpeg -i "$f" -af loudnorm=I=$TARGET_LUFS:TP=$MAX_TP:print_format=json -f null - 2>&1 \
          | sed -n '/{/,/}/p')
  lufs=$(echo "$stats" | python3 -c "import sys,json;print(json.load(sys.stdin)['input_i'])")
  tp=$(echo "$stats" | python3 -c "import sys,json;print(json.load(sys.stdin)['input_tp'])")
  head_sil=$(ffmpeg -i "$f" -af silencedetect=noise=-50dB:d=0.1 -f null - 2>&1 \
             | grep -m1 "silence_end" | grep -oE "[0-9.]+" | head -1 || echo 0)
 
  status="OK"
  awk "BEGIN{exit !($dur < $MIN_SEC)}" && status="TOO_SHORT"
  awk "BEGIN{exit !($tp > $MAX_TP)}" && status="CLIPPING"
  awk "BEGIN{exit !($head_sil > $MAX_HEAD_SILENCE)}" && status="HEAD_SILENCE"
  printf "%-28s dur=%.1fs LUFS=%s TP=%s headSil=%ss -> %s\n" \
    "$(basename "$f")" "$dur" "$lufs" "$tp" "$head_sil" "$status"
done

Just running this surfaces, in one list, problems that are hard to catch without A/B listening: "one track is 6 dB louder," "the tail is clipping." When I swapped an AdMob reward sound, this stage caught a true-peak overage and I fixed it before release.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦A verification script that machine-judges loudness, clipping, and head silence with ffprobe and loudnorm
✦A procedure for having an agent review with 'eyes instead of ears' using waveform rendering
✦How to place a pre-release gate so you don't lose stars to volume complaints after launch
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

▣ App Dev2026-11-12
Check Web Font Delivery with an Origin Header, Too: How a Fallback Font Went Unnoticed on My Site for 13 Days
For 13 days, the Latin web font on my own site kept returning 404 and every page was drawn in a fallback face. A plain curl returned 200; only the browser's request, which carries an Origin header, received the stale 404. Here is a script that compares three kinds of request, a setting that keeps long cache lifetimes off error responses, and how to pick a purge that reaches every variant.
▣ App Dev2026-10-30
After I Closed the Image Viewer with Esc, the Page Behind It Stopped Scrolling: What I Counted When Moving to the dialog Element
While fixing the full-screen image viewer on my own site, I worked through three problems in order: Esc did nothing, the page behind kept scrolling, and the close button sat on top of the artwork. Even after moving to dialog, one bug remained, with a check script and numbers.
▣ App Dev2026-10-20
I Edited a Sentence and Only the New Characters Turned into Tofu: Adding a Missing-Glyph Check to a Subsetted Japanese Web Font
Change one line of Japanese copy and the newly added characters can render as tofu boxes. Here is a small script that lists every character missing from a subsetted font, with file and line number, and fails the build if even one is absent, with real output from running it.