update 12
This commit is contained in:
parent
91cc02a1a4
commit
3deacf0d16
2 changed files with 7 additions and 2 deletions
|
@ -43,7 +43,7 @@ def neonpink(xs):
|
||||||
return tilter2(xs, 'raw')
|
return tilter2(xs, 'raw')
|
||||||
|
|
||||||
def c_render(cascade, precision=4096):
|
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)
|
xs = xsp(precision)
|
||||||
return xs, tilter2(xs, cascade)
|
return xs, tilter2(xs, cascade)
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ def tilter(xs, ys, tilt):
|
||||||
lament("tilter(): DEPRECATED; use ys -= tilter2(xs, tilt) instead.")
|
lament("tilter(): DEPRECATED; use ys -= tilter2(xs, tilt) instead.")
|
||||||
return xs, ys - tilter2(xs, tilt)
|
return xs, ys - tilter2(xs, tilt)
|
||||||
|
|
||||||
def tilter2(xs, tilt):
|
def tilter2(xs, tilt): # TODO: rename
|
||||||
noise = np.zeros(xs.shape)
|
noise = np.zeros(xs.shape)
|
||||||
if isinstance(tilt, str) and tilt in cascades:
|
if isinstance(tilt, str) and tilt in cascades:
|
||||||
tilt = cascades[tilt]
|
tilt = cascades[tilt]
|
||||||
|
|
|
@ -3,6 +3,11 @@ from . import tau
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import sympy as sym
|
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):
|
def zcgen_py(n, d):
|
||||||
zcs = np.zeros(d + 1)
|
zcs = np.zeros(d + 1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue