|
|
@ -42,16 +42,18 @@ |
|
|
|
"the output, and a scalar for the zero-delay contribution of the input to the output. For mathematical convenience, we group\n", |
|
|
|
"the output, and a scalar for the zero-delay contribution of the input to the output. For mathematical convenience, we group\n", |
|
|
|
"the last two into a single 3-vector. Thus, a filter is described as the tuple $(\\mathbf{A}, B, C)$, and each step is as follows:\n", |
|
|
|
"the last two into a single 3-vector. Thus, a filter is described as the tuple $(\\mathbf{A}, B, C)$, and each step is as follows:\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
|
|
|
|
"$$\n", |
|
|
|
"\\begin{align}\n", |
|
|
|
"\\begin{align}\n", |
|
|
|
" out_n & = C \\cdot concat([[x_n], y_n]) \\\\\n", |
|
|
|
" out_n & = C \\cdot concat([[x_n], y_n]) \\\\\n", |
|
|
|
" y_{n+1} & = B \\cdot x_n + \\mathbf{A} \\cdot y_n\n", |
|
|
|
" y_{n+1} & = B \\cdot x_n + \\mathbf{A} \\cdot y_n \\\\\n", |
|
|
|
"\\end{align}\n", |
|
|
|
"\\end{align}\n", |
|
|
|
|
|
|
|
"$$\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"Where the $\\cdot$ notation represents dot product, vector times scalar, or matrix times vector multiplication, respectively.\n", |
|
|
|
"Where the $\\cdot$ notation represents dot product, vector times scalar, or matrix times vector multiplication, respectively.\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"Question: would it be more convenient to have a single 3x3 matrix?\n", |
|
|
|
"Question: would it be more convenient to have a single 3x3 matrix?\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"There is some redundancy in this representation. Obviously, multiplying A and B times some scalar, and dividing C by the same,\n", |
|
|
|
"There is some redundancy in this representation. Obviously, multiplying B times some scalar, and dividing C by the same,\n", |
|
|
|
"is a filter with the same results. More subtly, the y vector can be transformed by any non-degenerate linear transformation.\n", |
|
|
|
"is a filter with the same results. More subtly, the y vector can be transformed by any non-degenerate linear transformation.\n", |
|
|
|
"However, these transforms do matter when the filter parameters are modulated, which is especially common in synthesizers, and\n", |
|
|
|
"However, these transforms do matter when the filter parameters are modulated, which is especially common in synthesizers, and\n", |
|
|
|
"also matter for roundoff behavior (particularly important when evaluating the filters using 32 bit floating point arithmetic).\n", |
|
|
|
"also matter for roundoff behavior (particularly important when evaluating the filters using 32 bit floating point arithmetic).\n", |
|
|
@ -85,7 +87,7 @@ |
|
|
|
"y vector represents the two state variables in transposed direct form II. For review, the transfer function of this\n", |
|
|
|
"y vector represents the two state variables in transposed direct form II. For review, the transfer function of this\n", |
|
|
|
"filter is:\n", |
|
|
|
"filter is:\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"\\begin{equation} H(z) = \\frac{b_0 + b_1 z^{-1} + b_2 z^{-2}}{1 + a_1 z^{-1} + a_2 z^{-2}} \\end{equation}" |
|
|
|
"$$ H(z) = \\frac{b_0 + b_1 z^{-1} + b_2 z^{-2}}{1 + a_1 z^{-1} + a_2 z^{-2}} $$" |
|
|
|
] |
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
@ -208,7 +210,7 @@ |
|
|
|
"source": [ |
|
|
|
"source": [ |
|
|
|
"Simper prefers a resonance control that ranges from 0 to 1. If you prefer the classic Q, just use this conversion:\n", |
|
|
|
"Simper prefers a resonance control that ranges from 0 to 1. If you prefer the classic Q, just use this conversion:\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"\\begin{equation} res = 1 - .5/Q \\end{equation}\n", |
|
|
|
"$$ res = 1 - .5/Q $$\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"Let's test the filter out:" |
|
|
|
"Let's test the filter out:" |
|
|
|
] |
|
|
|
] |
|
|
|