(sampleRate float32, cutoffFreq float32)
| 36 | } |
| 37 | |
| 38 | func HighPassFilter(sampleRate float32, cutoffFreq float32) Filter { |
| 39 | c := sampleRate / math.Pi / cutoffFreq |
| 40 | a0i := 1 / (1 + c) |
| 41 | return &FirstOrderFilter{ |
| 42 | B0: c * a0i, |
| 43 | B1: -c * a0i, |
| 44 | A1: (1 - c) * a0i, |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | type FilterChain []Filter |
| 49 |
no outgoing calls
no test coverage detected
searching dependent graphs…