Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
nyanpasu64
· 2y ago · 0 comments
Is "decay" subtracting the waveform's original shape (right-shifted to drop its lowest 2-ish bits) from itself, plus arithmetic overflow?
Comments
[–]
CmdrKrool
2y ago
Yes, exactly that. Search for "function applyDecay" here:
https://www.zapspace.net/defender_sound/defender.js
(It right-shifts by 4 instead of 2.)