Audio · class
KickDetector
Explained in Your first game.
class KickDetectorimport { KickDetector } from '@driftengine/audio';Constructor
new
constructor(nodes: KickDetectorNodes)| Parameter | Type | Description |
|---|---|---|
nodes | KickDetectorNodes |
Properties
| Name | Type | Description |
|---|---|---|
pulse | number | 0–1, spiking on a kick and decaying back. What a light should follow. |
energy | number | Smoothed low-end presence, for anything that wants level rather than hits. |
level | number | 0–1, how much low end is arriving that the bassline does not explain.MoreThe one to drive a visual from, and This is the whitened signal the detector already computes for its own gating — the level
left after the bassline, the mud and the low mids are masked out of it — which is the part
that actually moves with the kick rather than with how loud the track is. It keeps its
dynamics on the same material where |
Methods
update
update(nowMs: number): voidOne frame. Reads the analysers and advances the pulse.
| Parameter | Type | Description |
|---|---|---|
nowMs | number |