Filter node

Audio Beat Detection

Machine-learning drum onset detection (in-house model, fine-tuned on real human drumming). Kick/Snare/Hat/Onset fire from per-class thresholds with local-maximum peak picking and a refractory period, held high for Hold ms (0 = pure 1-frame pulse for event logic); the Prob outputs rise instantly on attack and decay along Fall Smoothing. ~27 ms latency at 187.5 analysis frames per second. Per-class thresholds are calibrated defaults — tune them on your material.

Inputs

PortTypeDefault
Audio DataThe audio to listen to. Cable it from Audio Input, Audio Player or any source that carries a live sample ring — the same port Audio FFT and Pitch Detection use.structure—
EnableOff stops the analysis and holds every output at zero, so nothing fires while it is muted.booltrue
Kick ThreshHow confident the model must be before a kick counts. Clamped to 0.01…1 — lower catches soft kicks and more false hits, higher fires only on the obvious ones.float0.8
Snare ThreshConfidence needed before a snare counts. Clamped to 0.01…1; lower is more sensitive, higher is stricter.float0.75
Hat ThreshConfidence needed before a hat counts. Clamped to 0.01…1 — hats are dense, so raising this is the usual cure for machine-gun triggering.float0.85
Onset ThreshConfidence needed before a generic onset counts, whatever the instrument. Clamped to 0.01…1.float0.9
Refractory msMinimum silence between two hits of the same drum, in milliseconds — the double-trigger guard. Floored at 5 ms with no upper limit; 20…60 suits most material.float30
Hold msHow long a detected beat stays high so visuals can see it. 0 gives a clean one-frame pulse for event logic; negative values are treated as 0, and 30…100 reads well on screen.float50
Fall SmoothingHow slowly the probability outputs fall after a hit — the rise is always instant. Clamped to 0…1, where 0 snaps back immediately and 1 leaves a long tail.float0.3

Outputs

PortType
Kickbool
Snarebool
Hatbool
Onsetbool
Kick Probfloat
Snare Probfloat
Hat Probfloat
Onset Probfloat
Probsfloat

Live Anatomy

Interactive — per-class probabilities, thresholds and Hold windows

How It Works

Audio Beat Detection is an original in-house neural network, trained on synthetic drums and fine-tuned on real human drumming (the Groove MIDI Dataset — attributed in the app's About screen; no dataset audio ships in the app). The audio is resampled to 48 kHz, converted to a log-mel spectrogram whose every coefficient is loaded from the training contract (the Swift analysis chain is test-verified bit-identical to the training pipeline), and classified by a ~213k-parameter Core ML model at 187.5 analysis frames per second — one inference every 5.3 ms, costing ~0.2 ms of CPU.

For every frame the model outputs four probabilities: Kick, Snare, Hat, and Onset (any drum event). A class fires when its probability crosses the class threshold at a local maximum, with a refractory window so one physical hit can never double-trigger. Total algorithmic latency is ~27 ms — tight enough that triggered visuals read as on-the-beat.

Like all Grafit ML analysis, one engine is shared per audio source: several Beat Detection nodes cost one inference, and each node keeps its own thresholds.

Parameters in Depth

ParameterMeaning
Kick / Snare / Hat / Onset Thresh (0–1)Per-class firing thresholds. Defaults (0.8 / 0.75 / 0.85 / 0.9) are live-tuned for full program mixes; lower them for clean drum stems, raise them if a busy mix over-triggers. Watch the Prob outputs in the inspector to see where your material peaks.
Refractory msMinimum silence between two hits of the SAME class (default 30). One physical hit often produces two adjacent probability peaks — the refractory merges them into one event. 30 ms still allows ~33 hits/s per class (16ths at 200 BPM arrive every 75 ms). Raise to 50–80 for smeary 808s; lower to 10–15 for extreme drum'n'bass rolls.
Hold msA fired class stays true for this window (default 50) so visuals actually see it — a 1-frame pulse at 60 fps is a 16 ms blink. Set 0 for pure 1-frame pulses in deterministic event logic.
Fall Smoothing (0–1)Decay tail of the probability outputs: they rise instantly on the attack and fall along a real time constant (0.3 ≈ 135 ms). The bool pulses are unaffected.

Use Cases

  • Three-layer rhythm visuals — Kick → background flash, Snare → camera shake via Point Transform, Hat → particle sparkle: each drum owns a visual layer.
  • Beat-locked color — Kick Prob → Remap (Out 1…1.6) → Canvas Scale: the whole frame breathes with the kick, with a soft tail for free.
  • Protecting the melody analysis — Onset → Pitch Detection's Drum Gate: the two ML ears cover each other.
  • Counting and structure — Kick → Counter → Array Get: step through a color palette or preset list every N kicks.
  • Probs as a cloud — Probs [4] → Notes to Points (Line): a four-point equalizer of the drum kit itself.

Tips

  • The model was trained on drums — on melodic material without percussion, use Audio Analysis's spectral-flux detector instead; on full mixes the two can run in parallel (DSP for BPM/prediction, ML for per-class triggers).
  • The Onset class is the strictest by default (0.9): it fires on any drum event and is the natural Drum Gate feed.
  • Bool outputs respect the event-logic conventions — with Hold 0 they are exact 1-frame pulses, safe for Do Once and Counter.
  • Works with Audio Input (mic/loopback), Audio Player and Video Player audio alike — anything on the shared Audio port.

Open Audio Beat Detection in the interactive catalog →

Audio Beat Detection is one of 381 nodes in Grafit Pro.

Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.

More Filter nodes