analyze
Analyze audio of the currently-playing pattern, returning spectrum, tempo, key, or rhythm data with confidence metrics.
Instructions
Audio analysis on the currently-playing pattern. include=["all"] (default) returns the full spectrum + features object, matching the pre-consolidation behaviour. include=["tempo"] returns only BPM with confidence. include=["key"] returns detected key + scale + confidence. include=["spectrum"] returns FFT features (bass, mid, treble, brightness, etc.). include=["rhythm"] returns rhythm-only analysis (complexity, density, syncopation). Combining values returns an object keyed by category, e.g. analyze({ include: ["tempo", "key"] }) → { tempo: {...}, key: {...} }. Example: analyze({ include: ["tempo"] }) to cheaply re-check BPM during a session. For static pattern analysis (no browser) use analyze_pattern_local; for runtime validation use validate_pattern_runtime.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include | No | Which analyses to return. Default ["all"] preserves pre-consolidation behaviour. | |
| session_id | No | Optional session ID (#108). Omit to use default session. |