agentleFS
blushneybusiness-glitchblushneybusiness-glitch/roblox-omniskills/skills/rbx-audio-mixing/SKILL.md

rbx-audio-mixing

Skill0 starsChanged 3 months agoMITView on GitHub

The SoundGroup mix tree, ducking, and volume discipline that keep forty sounds from becoming mud — Master → Music/SFX/UI/Ambience, sidechain and tween ducking, per-channel ceilings, phone-speaker reality checks. Use when the user says "volume settings", "music is too loud", "balance the audio", "duck the music", "add volume sliders", or when everything plays at Volume 1 and important sounds drown. Do not use for building the settings screen itself — load rbx-ui-settings — or for positioning sounds in the world — load rbx-audio-spatial instead.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every Sound in the game sets .SoundGroup.

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

rbx-audio-mixing

When to load

Any session that creates its first Sound (the tree goes in NOW), volume-slider requests, "too loud / can't hear X" complaints, dialogue or cutscene work that needs music out of the way, and every rbx-audio-music / rbx-audio-sfx job — they assign into this tree.

The tree

Script-created, idempotent, in SoundService, at boot:

Master (1.0)
├─ Music    (0.35)
├─ SFX      (0.7)
├─ UI       (0.6)
└─ Ambience (0.5)

Every Sound in the game sets .SoundGroup. A Sound outside the tree is unmixable — it ignores Master, ignores the settings sliders, and is the one thing still blaring when the player mutes music. Nested group volumes multiply: Master 0.5 halves everything.

Per-sound ceilings inside those groups: UI 0.25–0.5, SFX 0.4–0.7, ambience 0.15–0.35, music 0.2–0.4. Nothing at 1.0 — Volume above 1 clips and distorts; loudness headroom lives in the group, not the Sound.

Ducking

Two implementations; pick by need:

  • Tween duck (default). One AudioDucker client util owns duck(reason): tween the Music group to 0.3× over 0.2s, hold while any reason is active, release over 1s. Reasons stack in a set — dialogue ending doesn't un-duck if a reward burst is still playing. Systems request ducks; none of them touch Music.Volume directly.
  • Sidechain duck (automatic). CompressorSoundEffect parented to the Music group with SideChain = <SFX group>, Threshold −20, Ratio 4, Attack 0.01, Release 0.2 — music dips whenever SFX actually plays, no requests needed. Use for dense combat games; the tween duck is more predictable for scripted moments.

Duck for: dialogue, cutscenes, purchase/reward celebrations, boss intros. Never duck UI under anything — clicks must always land.

Volume sliders

Settings exposes Master, Music, and SFX sliders (UI and Ambience ride Master). Slider value maps straight onto the group's Volume; the saved preference lives in player data and is applied client-side on join before the first Sound plays. The slider write is a client-owned cosmetic preference — it never routes through a remote that could set another player's mix, and any server-persisted value is clamped 0–1 on write.

Phone-speaker law

Most players hear the game through a phone speaker, not headphones. A light CompressorSoundEffect on Master (Threshold −12, Ratio 2) evens the mix for tiny speakers. Judge the mix against "mono phone speaker in a noisy room": sub-bass rumbles vanish, harsh 3–5kHz content hurts, and anything that only reads on headphones is decoration.

Sharp edges

  • CRITICAL — Retrofitting the tree after forty loose Sounds shipped: every wiring site needs a revisit and half get missed. Fix: the tree exists before Sound #1; every audio skill in this repo assigns on creation.
  • HIGH — Duck that never releases: a reason set that adds but never removes (dialogue closed via a path that skips the release call) leaves music at 0.3× forever. Fix: one util owns the reason set; release on a task.delay timeout as backstop (5s max hold per reason unless renewed).
  • HIGH — Amplifying quiet assets by setting Sound.Volume above 1: clips into distortion. Fix: raise the group, or source a louder asset.
  • MEDIUM — Sliders writing to individual Sounds instead of groups: new sounds ignore the setting. Fix: sliders touch group Volume only.
  • MEDIUM — Sidechain compressor left on for horror/quiet games: constant pumping reads as broken audio. Fix: tween duck for sparse mixes.

Load with

rbx-ui-settings (the sliders' UI and persistence), rbx-audio-sfx and rbx-audio-music (everything they create assigns into this tree), rbx-juice-celebrations (the loudest duck customers).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.