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

rbx-audio-music

Skill0 starsChanged 3 months agoMITView on GitHub

Music systems that survive a 40-minute session — free tracks selected per zone and mood, seam-verified loops, crossfaded zone switching, and layered intensity that follows game state. Use when the user says "add music", "background music", "soundtrack", "boss theme", "different music per zone", or when the current music loops with an audible seam, restarts on every respawn, or grates after ten minutes. Do not use for one-shot stingers and effect sounds — load rbx-audio-sfx — or for volume balance between music and SFX — load rbx-audio-mixing instead.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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. Distinctive:

    Every loop is seam-audited: Before shipping, audition the loop point twice in Studio.

    line 22
  2. Very specific:

    Read: asset-library.md for proven, mood-tagged track ids.

    line 90

≈ “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-music

Laws

  1. Music never restarts on respawn. The music controller is one client module in a ScreenGui-independent LocalScript (or ResetOnSpawn = false container); on death the track continues from its TimePosition. A lobby loop that restarts every death is the fastest way to make players mute the game.
  2. Every loop is seam-audited. Before shipping, audition the loop point twice in Studio. A track that doesn't loop cleanly gets the two-instance crossfade: start instance B at A's TimeLength minus 2 seconds, fade A out and B in over those 2 seconds, alternate.
  3. Switch by crossfade, never by cut. Zone and state changes tween the outgoing track's Volume to 0 and the incoming from 0 over 1.5–2s. Hard cuts read as bugs; the one exception is the deliberate music-cut before a reveal (rbx-audio-feedback-map).
  4. Layers beat playlists. Where the game has intensity states (combat near, final 30 seconds, boss phase), start 2–3 stem Sounds the SAME frame so TimePosition stays synced, then tween layer volumes from the state machine. Fading a percussion layer in reads composed; shuffling to a "combat track" reads random.
  5. Rotate or fatigue. 2–3 tracks per context minimum, and the per-player music-off / volume preference persists in player data via rbx-ui-settings wiring.

Passes

  1. Map — list the game's music contexts (lobby, each zone, round-active, last-30s, results, boss) and the transition graph between them. One track per context is the floor, not the goal.
  2. Source — per Sourcing below; audition every candidate for loudness consistency and loop cleanliness before wiring.
  3. Controller — one client MusicController module: plays into the Music SoundGroup from rbx-audio-mixing, owns crossfade and layer tweens, exposes setContext(name) and duck(reason). Zone detection uses CollectionService-tagged zone parts, never direct workspace paths — under StreamingEnabled the zone part may not exist client-side yet.
  4. State wiring — server replicates round/combat state via Attributes or a RemoteEvent; the client maps state → context. State is server-owned; the client only renders it — a client claiming "boss phase" changes its own music and nothing else.
  5. Verify — walk every zone boundary in play mode both directions, die once mid-track, idle through two full loops listening for the seam, get_console_output for load fails.

Sourcing

Tiers per asset-id-policy.md: asset-library.md first (pcall re-verified), then search_asset on the Creator Store audio catalog — search mood + genre + "loop" ("calm forest ambient loop", "battle drums loop"), prefer tracks 60–180s (shorter loops fatigue, longer ones bloat memory). Ids from THIS session's search only. Any result arriving as a Model wrapper passes rbx-security-modelscan before use. The user's own compositions route through rbx-handoff-uploads — wire the controller now with 0 -- TODO ids in CONFIG.

Performance budget

Music streams; it does not need PreloadAsync except the first lobby track. At most one crossfade pair plus layer stems playing simultaneously — 4 concurrent music Sounds is the ceiling. Layer stems all keep playing at Volume 0 rather than stop/start (restart desyncs TimePosition); that is the deliberate cost of sync. Destroy zone tracks the player has left after the fade completes; don't keep every zone's music alive at Volume 0 forever.

Load with

rbx-audio-mixing — the Music group, ducking, and volume ceilings live there; don't ask, include it. Volume sliders and the music-off toggle: rbx-ui-settings. Cut-the-music moments and boss-entrance silence: rbx-audio-feedback-map. Own uploads: rbx-handoff-uploads.

AI-tells

  • ☐ One track for the whole game, looping with an audible seam
  • ☐ Music restarts from 0:00 on every respawn or menu open
  • ☐ Hard cuts at zone boundaries instead of 1.5–2s crossfades
  • ☐ Music at Volume 0.8+ fighting the SFX instead of sitting at 0.2–0.4
  • ☐ "Combat music" that starts 3 seconds after combat did (state polled, not evented)
  • ☐ No music-off option, or the preference forgotten between sessions
  • ☐ Zone detection via direct workspace paths that break under StreamingEnabled
  • ☐ Invented rbxassetid instead of a 0 -- TODO placeholder

Memory

Read: asset-library.md for proven, mood-tagged track ids; the game's projects.md block for existing SoundGroup paths, zone tags, and state Attributes. Write: shipped track ids into asset-library.md tagged by context ("lobby loop", "boss stem — percussion"); the context→track map into the game's projects.md block; upload TODOs into manual steps pending:.

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.