Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Latest commit

 

History

History

math

AudioLazy Math

This directory have scripts with some symbolic math calculations that should be seen as a proof, or perhaps as a helper on understanding, for some equations written as part of the AudioLazy code. For such a symbolic processing, the Sympy CAS (Computer Algebra System) Python package was used.

Originally, some of these results were done manually, but all were needed for designing some part of AudioLazy. Regardless of their difficulty, the blocks implemented in AudioLazy just use the results from here, and doesn't require Sympy to work.

Running

They're all scripts, you should just run them or call Python. Works on both Python 2 and 3, but be sure to have Sympy installed before that:

pip install sympy

So you can run them directly like you would with an AudioLazy example, with one of the following lines:

./script_name.py
python script_name.py
python3 script_name.py

(where obviously you should replace script_name with the script file name).

Proofs

  • lowpass_highpass_bilinear.py

    An extra proof using the bilinear transformation method for designing the single pole and single zero IIR lowpass and highpass filters from their respective Laplace filters prewarped at the desired cut-off frequencies. The result matches the highpass.z and lowpass.z strategies.

  • lowpass_highpass_digital.py

    Includes the digital filter design of the lowpass.pole, highpass.z, highpass.pole and lowpass.z strategies.

  • lowpass_highpass_matched_z.py

    Includes the analog filter design (Laplace) for a single pole lowpass IIR filter, and for a single zero and single pole highpass IIR filter. These are then converted to digital filters as a matched Z-Transform filter (pole-zero mapping/matching), which yields the equations used by the lowpass.pole_exp and highpass.z_exp filter strategies. These are then mirrored to get the lowpass.z_exp and highpass.pole_exp filter strategies.