makepad/libs/audio_reactive
Admin 012e6f7df5 tools, libs and the rest
cargo-makepad, makepad-builder (with an Android step on every OS), CI tools
and tiles, and the remaining libraries.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 12:26:21 +02:00
..
src kinetic_type: a kit is evaluated whole in the VM -- no text splitter. The kit's glyph, camera_fn and curve_fn are compiled from their fn objects through vm_kernel, bound into the host's entries (kit.splash: glyph_entry, camera_entry, curve_entry, band, the dial accessors) with the kinetic module imported; the kit's top-level helpers are reached through the VM's scopes. The draws derive from DrawKineticGlyph / DrawKineticBackdrop with the kit's fn objects as members (no member text, no format!ed mod.draw.X{..}). Deleted: split/read_fn/skip_balanced/ordered_keys (dials and axes are read in the order written from the object), compose/compose_camera/compose_curve and their line maps (errors now name file:line:col from the VM). audio_reactive's SPLASH text is gone: the audio input is mod.draw.AudioInput (script_mod), which the kinetic draws spread. The settings that shared a name with a shader hook are renamed (surface: {u v copies} -> grid:, floor: {y size} -> ground:; the kits in commercial). Checked: cargo test --release -p makepad-kinetic-type, -p makepad-audio-reactive; all 86 kits x 3 frames hash-identical to before (Motion KineticText docs, makepad-motion frames). 2026-10-01 16:44:45 +02:00
tests tools, libs and the rest 2026-10-13 12:26:21 +02:00
Cargo.toml 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). 2026-09-30 13:52:52 +02:00