bit_crush.go
func BitCrush(buf *audio.FloatBuffer, factor float64) {
	stepSize := crusherStepSize * factor
	for i := 0; i < len(buf.Data); i++ {
		frac, exp := math.Frexp(buf.Data[i])
		frac = signum(frac) * math.Floor(math.Abs(frac)/stepSize+0.5) * stepSize
		buf.Data[i] = math.Ldexp(frac, exp)
	}
}
func BitCrush(buf *audio.FloatBuffer, factor float64) {
	stepSize := crusherStepSize * factor
	for i := 0; i < len(buf.Data); i++ {
		frac, exp := math.Frexp(buf.Data[i])
		frac = signum(frac) * math.Floor(math.Abs(frac)/stepSize+0.5) * stepSize
		buf.Data[i] = math.Ldexp(frac, exp)
	}
}
// BitCrush reduces the resolution of the sample to the target bit depth
// Note that bit crusher effects are usually made of this feature + a decimator