audio-analysis
Skill4 starsChanged 10 days agoApache-2.0View on GitHub
Read real-time amplitude and 8-band frequency data from any AudioSource, AudioStream, or VideoPlayer entity in a Decentraland SDK7 scene with the AudioAnalysis component. Use when the user asks for music visualizers, beat reactivity, equalizers, or audio-reactive scenes. To play sound see audio-video.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- Bbeierle12/Skill-MCP-Claudetheir own version, first seen Nov 1, 2026
- QuixiAI/Hexistheir own version, first seen Oct 8, 2026
- QuixiAI/agi-memorytheir own version, first seen Oct 8, 2026
- Xuepoo/agent-lx-music-skillstheir own version, first seen Aug 23, 2026
- flintfromthebasement/skillstheir own version, first seen Jul 6, 2026
- Xuepoo/sonic-bridge-skillstheir own version, first seen May 31, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- QuixiAI/agi-memory★ 623same name
- QuixiAI/Hexis★ 623same name
- Bbeierle12/Skill-MCP-Claude★ 9same name
- flintfromthebasement/skills★ 1same name
- Xuepoo/agent-lx-music-skills★ 1same name
- Xuepoo/sonic-bridge-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- add-3d-modelsSkill
- add-interactivitySkill
- advanced-inputSkill
- advanced-renderingSkill
- animations-tweensSkill
- audio-videoSkill
- authoritative-serverSkill
- avatar-animationsSkill
- build-uiSkill
- camera-controlSkill
- compositesSkill
- create-sceneSkill
- creator-hub-mcpSkill
- dcl-gddSkill
- dcl-prototypeSkill
- deploy-sceneSkill
- deploy-worldsSkill
- fontsSkill
- lighting-environmentSkill
- migrate-sdk6-to-sdk7Skill
- multiplayer-syncSkill
- nft-blockchainSkill
- npcsSkill
- optimize-sceneSkill
- particle-systemSkill
- player-avatarSkill
- player-physicsSkill
- promote-sceneSkill
- report-sdk-issueSkill
- scene-feedbackSkill
- scene-retroSkill
- scene-runtimeSkill
- script-componentsSkill
- sdk-scenesSkill
- smart-wearablesSkill
- unity-explorer-mcpSkill
- wearablesSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
Use the helper AudioAnalysis.createAudioAnalysis(entity, mode?, amplitudeGain?, bandsGain?).
- Very specific: line 145
No scene permission or hostname whitelist is needed: ALLOW_MEDIA_HOSTNAMES / allowedMediaHostnames are legacy and ignored …
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AudioAnalysis
Real-time audio signal analysis attached to any entity that already has an AudioSource, AudioStream, or VideoPlayer. The renderer analyzes the audio frame buffer and writes results back into the component each tick. Scenes read those results to drive visualizers, beat-reactive geometry, audio-driven lights, etc.
RULE: Requires an audio-emitting component on the same entity
AudioAnalysis does nothing on its own. The entity MUST also have one of: AudioSource, AudioStream, or VideoPlayer. The renderer taps that component's audio frame buffer to compute amplitude/bands. An entity with only AudioAnalysis produces no data.
RULE: Audio must be playing for non-zero output
Values are derived from live audio frames. If the source is paused, muted, or not yet loaded, amplitude and all bands[] stay at 0. There is no "ready" event — start your reactive systems unconditionally, they will simply animate toward 0 while silent.
RULE: Not implemented everywhere — always design a silent fallback
- Unity (desktop): implemented.
- Mobile (Godot): app 1.14.0+,
AudioSourceonly; older mobile apps write no analysis.AudioStreamandVideoPlayerread0: their audio is decoded by native platform players and never reaches the analyser. Band values differ from desktop by a constant factor (and band edges differ, since mobile downmixes to mono first), so tune thresholds and gains on both clients. - Bevy: ignores the component (no analysis written).
Where it is unimplemented (including a stream or video on mobile) the values simply stay at 0 — same shape as silence — so the scene never errors, it just goes still. Always design a fallback that does not depend on amplitude (e.g. a base scale, a looping tween) so the scene still reads on every client.
RULE: Read via readIntoView into a pre-allocated view
readIntoView / tryReadIntoView write into a caller-owned AudioAnalysisView = { amplitude: number, bands: number[] }. Allocate the view once at scene init and reuse it every frame — do not new it inside the system. The bands array MUST be pre-sized to 8.
RULE: Use createAudioAnalysis, not create
Use the helper AudioAnalysis.createAudioAnalysis(entity, mode?, amplitudeGain?, bandsGain?). It pre-fills all required protobuf fields (8 bands + amplitude + mode) with safe defaults. Calling the raw AudioAnalysis.create(entity, {...}) requires you to provide every band/amplitude field manually. Use createOrReplaceAudioAnalysis to overwrite an existing one without throwing.
Import
import {
AudioAnalysis,
AudioAnalysisView,
PBAudioAnalysisMode,
AudioSource, // or AudioStream / VideoPlayer
engine,
Transform,
} from "@dcl/sdk/ecs";
import { Vector3 } from "@dcl/sdk/math";AudioAnalysisView is a TypeScript type alias (not a component), exported from @dcl/sdk/ecs: { amplitude: number, bands: number[] }, bands[0] = lowest frequency, bands[7] = highest.
Component fields
Component ID is 1212.
Output (filled by the renderer; read in your systems):
| Field | Type | Range | Notes |
amplitude | number | 0..~1 (mode-dep.) | Aggregate signal strength of the current audio frame. |
band0 | number | 0..~1 (mode-dep.) | Lowest frequency bin (sub-bass). |
band1..6 | number | 0..~1 (mode-dep.) | Increasing frequency bins, log-spaced under MODE_LOGARITHMIC. |
band7 | number | 0..~1 (mode-dep.) | Highest frequency bin (treble/air). |
Inputs (configure once at create time):
| Field | Type | Default | Notes |
mode | PBAudioAnalysisMode | MODE_LOGARITHMIC | MODE_RAW = 0 (raw FFT magnitudes) | MODE_LOGARITHMIC = 1 (perceptual log mapping, recommended for visualizers). |
amplitudeGain | number? (optional) | 5.0 when omitted | Multiplier applied to amplitude. Only used in MODE_LOGARITHMIC. |
bandsGain | number? (optional) | 0.05 when omitted | Multiplier applied to all 8 bands. Only used in MODE_LOGARITHMIC. |
Values are unbounded floats — gains can push them above
1. Clamp or scale in your system if the visual you drive needs0..1. For typical music at default gains, expect peaks roughly in0..1with normal content sitting0..0.5.
Reading the data
const view: AudioAnalysisView = { amplitude: 0, bands: new Array<number>(8) };
engine.addSystem(() => {
// Throws if the entity has no AudioAnalysis
AudioAnalysis.readIntoView(audioEntity, view);
// Or, defensive variant — returns false if missing, no throw
// if (!AudioAnalysis.tryReadIntoView(audioEntity, view)) return
// view.amplitude and view.bands[0..7] are now populated
});readIntoView(entity, out) — populates out from the latest analysis. Throws if the entity has no AudioAnalysis.
tryReadIntoView(entity, out): boolean — same, but returns false instead of throwing when the component is missing; use it when the analysis may be attached later (e.g. added at runtime).
Common patterns
// 1. Pulse an entity's scale to overall amplitude
const view: AudioAnalysisView = { amplitude: 0, bands: new Array<number>(8) };
engine.addSystem(() => {
AudioAnalysis.readIntoView(audioEntity, view);
const t = Transform.getMutable(pulseEntity);
const s = 1 + view.amplitude * 10; // base 1, gain to taste
t.scale = Vector3.create(s, s, s);
});
// 2. 8-bar equalizer (one entity per band, scale Y by bands[i])
for (const [entity, _] of engine.getEntitiesWith(VisualBar, Transform)) {
const i = VisualBar.get(entity).index; // 0..7
Transform.getMutable(entity).scale = Vector3.create(
1,
view.bands[i] * BAR_HEIGHT,
1
);
}
// 3. Bass-only kick — react to the lowest band
const bass = view.bands[0] + view.bands[1]; // sub + low
if (bass > 0.7) {
/* trigger flash */
}
// 4. Custom gains (less sensitive amplitude, punchier bands)
AudioAnalysis.createAudioAnalysis(
audioEntity,
PBAudioAnalysisMode.MODE_LOGARITHMIC,
2.0,
0.1
);For a complete music visualizer (audio source + amplitude sphere + 8-band equalizer bars), see {baseDir}/references/audio-analysis-example.md.
Mode selection
MODE_LOGARITHMIC(default) — bands are log-spaced and gain-scaled to roughly fit0..1for typical music. Use this for visualizers, scaling, color reactivity.amplitudeGainandbandsGainapply.MODE_RAW— raw FFT-derived magnitudes, linearly spaced. Lower bands dominate visually because most musical energy is there.amplitudeGain/bandsGainare ignored. Use only if you intend to do your own normalization.
Gotchas
- Throttled updates. The renderer runs analysis under a frame-time budget — values update each frame in normal conditions but can skip frames under heavy load. Drive smooth animations with
dtinterpolation rather than assuming a fixed update cadence. - Multi-source scenes. Each audio-emitting entity needs its own
AudioAnalysisif you want to react to that specific source. There is no global mix-down; you pick the entity to analyze. - Works on
VideoPlayeraudio too — callAudioAnalysis.createAudioAnalysis(videoEntity)on the same entity that hasVideoPlayer. The renderer taps the video's audio frame buffer the same way it does forAudioSource. This holds for both progressive files (MP4/WebM at a direct URL) and HLS streams (.m3u8); the88,-10-audio-visualizationtest scene drives a third visualizer group from a live HLS stream. - No
pitchinteraction.AudioSource.pitchchanges playback speed; the analysis runs on the actual played audio frames, so a higher pitch shifts perceived band energy upward. This is expected, not a bug.
Permissions
No scene permission or hostname whitelist is needed: ALLOW_MEDIA_HOSTNAMES / allowedMediaHostnames are legacy and ignored ({baseDir}/../create-scene/references/scene-json.md → Required Permissions).
Example scenes
- audio-visualization — engine-team test scene: three independent visualizer groups side by side, each 8 bars + an amplitude sphere driven by its own
AudioAnalysis. Group 0:AudioSource(local mp3). Group 1:VideoPlayeron a progressive MP4. Group 2:VideoPlayeron an HLS.m3u8stream. Each group owns a pre-allocatedAudioAnalysisViewand gets its ownreadIntoViewcall in a single read system. Demonstrates thatAudioAnalysisbehaves identically across all three source kinds. Each amplitude sphere is also the play/pause button for its source —MeshCollider.setSpheremakes it clickable, and the handler flipsplayingonAudioSource.getMutable/VideoPlayer.getMutable(the same toggle works for MP4 and HLS).
Resources
{baseDir}/references/audio-analysis-example.md— full music visualizer scene from the SDK examples (audio source + amplitude pulse + 8-bar equalizer).
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.

