Skip to content

hat

Hat — TR-808 style hi-hat. gain / decay (~0.04 = closed, ~0.3 = open). Tune the metallic tone via baseFreq / ratios.

Quick Start

hat({ gain: 0.45, decay: 0.04 })

Parameters

Name Type Default Range/Options Description
gain number 0.45 0–1 0–1 Output gain
decay number 0.04 0.01–1 s Decay time (~0.04 = closed, ~0.3 = open)
tone number 0.6 0–1 0–1 Oscillator/noise ratio (0 = brush, 1 = metallic); velocity shifts within this range
click number 0.4 0–1 0–1 Gaussian metallic click transient amount (velocity² scaled)
baseFreq number 400 100–2000 Hz Oscillator base frequency
ratios number[] [1,1.213,1.401,1.663] Inharmonic square-wave frequency ratios (TR-808 derived); array length = oscillator count