draft a simpler version of the bell eq

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-12-28 18:08:12 +02:00
parent 9b87589f7b
commit 8d4a7a5045
5 changed files with 55 additions and 22 deletions

View File

@ -594,6 +594,23 @@ func (s *GoSynth) Render(buffer sointu.AudioBuffer, maxtime int) (samples int, r
if stereo {
stack = append(stack, gain)
}
case opEq:
for i := range channels {
inputSample := stack[l-1-i]
w := params[0] * params[0]
alpha := w * params[1] * 2
A := float32(math.Pow(2, float64(params[2]-.5)*6.643856189774724))
u := alpha * A
v := alpha / A
a0, a1, a2 := 1+v, w*w-2, 1-v
b0, b1, b2 := 1+u, a1, 1-u
output := (b0*inputSample + unit.state[i]) / a0
unit.state[i] = b1*inputSample - b1*output + unit.state[2+i]
unit.state[2+i] = b2*inputSample - a2*output
stack[l-1-i] = output
}
case opSync:
break
default: