diff --git a/lib/__init__.py b/lib/__init__.py index c835149..4511c25 100644 --- a/lib/__init__.py +++ b/lib/__init__.py @@ -43,7 +43,7 @@ def neonpink(xs): return tilter2(xs, 'raw') def c_render(cascade, precision=4096): - # TODO: deprecate in favor of tilter2 (which also needs to be renamed) + # TODO: deprecate in favor of tilter2 xs = xsp(precision) return xs, tilter2(xs, cascade) @@ -102,7 +102,7 @@ def tilter(xs, ys, tilt): lament("tilter(): DEPRECATED; use ys -= tilter2(xs, tilt) instead.") return xs, ys - tilter2(xs, tilt) -def tilter2(xs, tilt): +def tilter2(xs, tilt): # TODO: rename noise = np.zeros(xs.shape) if isinstance(tilt, str) and tilt in cascades: tilt = cascades[tilt] diff --git a/lib/planes.py b/lib/planes.py index 1f51768..9a212bd 100644 --- a/lib/planes.py +++ b/lib/planes.py @@ -3,6 +3,11 @@ from . import tau import numpy as np import sympy as sym +# implements the modified bilinear transform: +# s <- 1/tan(w0/2)*(1 - z^-1)/(1 + z^-1) +# this requires the s-plane coefficients to be frequency-normalized, +# and the center frequency to be passed as a transformation parameter. + def zcgen_py(n, d): zcs = np.zeros(d + 1)