pub const WAVE_SAMPLES: usize = 512;Expand description
How many time-domain samples an AnalysisFrame carries in
waveform.
512, which is MilkDrop’s own count (Plan 0100 Phase 4): its waveform draws
512 consecutive samples, every preset’s wave_mode geometry is written
against that resolution, and a converted preset should draw the figure its
author drew. At 48 kHz it is 10.7 ms of audio against MilkDrop’s 11.6 ms at
44.1 kHz — the same gesture, a fraction of a beat either way.
The samples are the most recent 512 of WINDOW_SIZE, taken
consecutively rather than decimated across the whole window. Decimation would
alias: a 4:1 pick of every fourth sample of a 12 kHz tone at 48 kHz reads as a
3 kHz one, and a waveform display exists to show exactly that shape.