MCPcopy Create free account
hub / github.com/fogleman/nes / Step

Method Step

nes/filter.go:19–24  ·  view source on GitHub ↗
(x float32)

Source from the content-addressed store, hash-verified

17}
18
19func (f *FirstOrderFilter) Step(x float32) float32 {
20 y := f.B0*x + f.B1*f.prevX - f.A1*f.prevY
21 f.prevY = y
22 f.prevX = x
23 return y
24}
25
26// sampleRate: samples per second
27// cutoffFreq: oscillations per second

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected