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.
In this repository253 other files it gives its agents.
- rbx-abtestSkill
- rbx-accessibilitySkill
- rbx-analytics-eventsSkill
- rbx-analytics-funnelsSkill
- rbx-analytics-readingSkill
- rbx-animationSkill
- rbx-anim-cutscenesSkill
- rbx-anim-npcSkill
- rbx-anim-proceduralSkill
- rbx-anim-rigsSkill
- rbx-anim-tweenSkill
- rbx-architectureSkill
- rbx-assets-audioSkill
- rbx-assets-id-policySkill
- rbx-assets-sanitizeSkill
- rbx-assetsSkill
- rbx-assets-toolboxSkill
- rbx-assets-webSkill
- rbx-audio-feedback-mapSkill
- rbx-audio-mixingSkill
- rbx-audio-sfxSkill
- rbx-audioSkill
- rbx-audio-spatialSkill
- rbx-badges-groupsSkill
- rbx-build-compositionSkill
- rbx-build-detailingSkill
- rbx-build-greyboxSkill
- rbx-buildingSkill
- rbx-build-interiorsSkill
- rbx-build-kitbashSkill
- rbx-build-landscapeSkill
- rbx-build-propsSkill
- rbx-build-scaleSkill
- rbx-build-structuresSkill
- rbx-camera-controllersSkill
- rbx-camera-cutsceneSkill
- rbx-camera-shakeSkill
- rbx-chat-moderationSkill
- rbx-ciSkill
- rbx-combat-abilitiesSkill
- rbx-combat-hitregSkill
- rbx-combat-meleeSkill
- rbx-combat-rangedSkill
- rbx-combatSkill
- rbx-combat-statusSkill
- rbx-complianceSkill
- rbx-comprehendSkill
- rbx-controlsSkill
- rbx-data-crossserverSkill
- rbx-data-profilestoreSkill
- rbx-data-recoverySkill
- rbx-data-schemaSkill
- rbx-data-sessionlockSkill
- rbx-dataSkill
- rbx-design-difficultySkill
- rbx-design-loopSkill
- rbx-design-sheetSkill
- rbx-design-socialSkill
- rbx-economy-currenciesSkill
- rbx-economy-gachaSkill
- The first 60 shown.
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
- Distinctive: line 22
Every loop is seam-audited: Before shipping, audition the loop point twice in Studio.
- Very specific: line 90
Read: asset-library.md for proven, mood-tagged track ids.
≈ “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.
Files
rbx-audio-music
Laws
- Music never restarts on respawn. The music controller is one client module in a
ScreenGui-independent LocalScript (or
ResetOnSpawn = falsecontainer); on death the track continues from itsTimePosition. A lobby loop that restarts every death is the fastest way to make players mute the game. - 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
TimeLengthminus 2 seconds, fade A out and B in over those 2 seconds, alternate. - 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). - 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
TimePositionstays synced, then tween layer volumes from the state machine. Fading a percussion layer in reads composed; shuffling to a "combat track" reads random. - Rotate or fatigue. 2–3 tracks per context minimum, and the per-player music-off /
volume preference persists in player data via
rbx-ui-settingswiring.
Passes
- 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.
- Source — per Sourcing below; audition every candidate for loudness consistency and loop cleanliness before wiring.
- Controller — one client MusicController module: plays into the Music SoundGroup from
rbx-audio-mixing, owns crossfade and layer tweens, exposessetContext(name)andduck(reason). Zone detection uses CollectionService-tagged zone parts, never directworkspacepaths — under StreamingEnabled the zone part may not exist client-side yet. - 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.
- 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_outputfor 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 -- TODOplaceholder
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:.
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
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.

