Skip to main content

dynamic_groove

Function dynamic_groove 

Source
pub fn dynamic_groove(bpm: f32, secs: f32, format: AudioFormat) -> Vec<f32>
Expand description

An envelope-shaped, beat-gridded signal with dynamics at bpm for secs — the one generator here that rises and falls (Plan 0037, ADR-0039).

Every other generator is a steady tone or steady noise: measured through the band report, bass:60 gives min/mean/max 0.187 / 0.187 / 0.187, zero variance, and chord 0.058 / 0.059 / 0.060. A filmstrip of those exercises the DSP with material that never changes, which is not what any preset is authored against.

Three layers on a beat grid, each landing in a different band, plus a phrase envelope: an 8-beat cycle that builds over six beats and rests for two. The rest is what produces real dynamics — without a near-silent stretch the running mean climbs to meet the peak and max / mean collapses toward 1.

  • kick, every beat: a pitch-dropping low sine, ~105 Hz down to ~45 — the bass band, and the transient the onset detector fires on.
  • hat, on each off-beat: a very short broadband tick — the treble band.
  • pad, continuous: a three-note chord around 220-330 Hz that swells across each beat — the mid band.

It exercises dynamics; it is not evidence about real loopback levels. Nothing synthesized here can be — only a measurement of real material through --audio speaks to that (docs/capturing.md).

A pure function of its arguments like every generator here: no wall clock, and the hat’s noise comes from a fixed seed pulled once per sample, so the sequence is identical on every run and every machine (NFR section 6).