Closed b-tice closed 1 year ago
Merging! Thanks again for contribution!
Only thing that we may want to circle back on, is checking the disassembly if some of the trig functions template-cast as double
instead of float
. If so, we may want to tweak a few of those expressions to be a bit more explicit.
Second Order All Pass Filter
Adds a new filter class called
Soap
. Soap is a second order all pass filter that is configured to be either a bandpass or a band reject with independent center frequency and q input parameters. A detailed writeup by Tom Erbe that discusses the theory of the filter can be found here:http://synthnotes.ucsd.edu/wp4/index.php/2019/11/09/second-order-allpass-filter/
http://synthnotes.ucsd.edu/wp4/index.php/2019/11/10/bandpass-and-bandreject-derived-from-allpass-filter/
Example Output
An electric guitar playing an E major chord is the input to a daisy pod. The q, which is adjustable on Pot 2, is fixed at 50%. The center frequency, which is adjustable on Pot 1, is manually and continuously swept during the video to show the bandpass filter effect.
https://user-images.githubusercontent.com/120678973/230170626-837b8f2a-159d-43d7-beac-8c1e3230b663.mp4
Similarly, an electric guitar playing an E major chord is input into a daisy pod. This time the q on Pot 2 is fixed at 15%, causing the bandpass's bandwidth to be more narrow than the previous example. The center frequency on Pot 1 is manually and continuously swept during the video to show the bandpass filter effect.
https://user-images.githubusercontent.com/120678973/230170715-6f01dcbb-91a1-4150-bf4a-e6b39fb5fce6.mp4
Example Code
This is the source used to generate the videos above. Note that a Daisy Pod was used for its rotary encoder and potentiometers. Turn the rotary encoder until both LED's on the Daisy Pod are BLUE to access the Soap filter. This code is based off of the MultiEffect Daisy Pod example written by Ben Sergentanis.
Future Work
Remove trig calculations and make a lookup table for the coefficients for c and d. this should speed up the algorithm