makepad/libs/audio_reactive/Cargo.toml
Admin e9ea5add2b audio_reactive: makepad-audio-reactive, the played sound as an input for looks and games (the vj_fx dissolve: its audio texture becomes an engine input) -- AudioReactive analyses what the host plays (mono or interleaved stereo at its rate, a frame's worth at a time; idle frames decay) into a 256 x 384 float texture: a scrolling log spectrogram (30 Hz .. 16 kHz, ~5.5 s), the peak-decimated waveform (~1.4 s) and the stereo side, plus smoothed band levels, auto-gained levels, onsets (kick, snare, hat by spectral flux against a running mean, auto-gained), loudness against its recent maximum, a short/long energy ratio and song form (a drop after a breakdown, the section's energy); AudioFrame is one frame of it for every consumer, bind_audio puts it on any draw whose shader declares the uniforms (by name), SPLASH is the declarations and the reading helpers (audio_fft(f, age), audio_wave(t), audio_wave2(t)) as Splash shader fields for a runtime shader, and bed is the deterministic music bed (and its player) for hosts with no music. Moved from Stage's vj_fx audio_tex.rs / audio_bed.rs; the spectrum now uses makepad-audio-picture's FFT (the same windowing and full-scale reference) instead of a copy. Checked: cargo test --release -p makepad-audio-reactive (5 unit: absolute spectrum row, signed bounded wave row, the bed a pure function of time with a kick on the beat and energy in every band, the analyser hears the bed; tests/splash_compiles: the Splash fields compile for metal, hlsl, glsl and wgsl).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-30 13:52:52 +02:00

15 lines
700 B
TOML

# Audio-reactive input for looks and games: the played sound analysed into
# a GPU texture (a scrolling log spectrogram, the waveform, the stereo side)
# plus levels, onsets (kick, snare, hat), loudness drive and song form,
# bound onto any draw call by name; Splash helpers a shader reads it with;
# and a deterministic music bed for tools that have no music.
[package]
name = "makepad-audio-reactive"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Audio-reactive input: the played sound as a GPU texture and signals for looks and games"
[dependencies]
makepad-draw = { path = "../../draw", version = "2.0.0" }
makepad-audio-picture = { path = "../audio_picture" }