Introduction to Digital Filters

Although I have a background in electrical engineering and programming, Audulus was really my first serious exposure to musical synthesis in general and digital synthesis in particular. I had played with other plug-ins, but never really considered the actual code producing the sound. When I discovered Audulus, I soon realized that the underlying mathematics were more complex than I had thought. After puzzling over some of SansNom’s excellent filter designs, I decided to do some further study. Even though I had been exposed to most of the math before (a very long time before!), I struggled to understand many of the papers. This is an attempt on my part to help others who are not familiar with calculus to understand the basic principles as it applies to filters. In the tutorial I cover basic integration, and how it applies to a simple RC filter circuit, and then show how these same principles can be applied to a digital signal by constructing a digital model of the filter. I have included the examples as an Audulus file as well for your reference. I hope you find it useful. I would like to thank @biminiroad and @robertsyrett for their generous help and encouragement.
Introduction to Digital Filters.pdf (1.4 MB)
Intorduction to Digital Filters.audulus (103.0 KB)


This is an amazing intro to digital filters and really helped me learn a lot! Required reading for anyone who’s interested in building their own digital filters in Audulus.

1 Like

This is great, thanks for putting it together!


That’s awesome - you did a great job at reducing many college classes into a succinct, yet understandable document. This takes me back to college, and working through the same math (including the calculus and the various other methods of determining area under a line), but I’m sure you know as well as I do how complex (sic) the math can get when you start looking at filters in greater detail.


Audulus is blowing my mind, but the gold I find in the forums is blowing my mind even more. I’ve been looking for an angle to learning digital filters and this might just be it. Thank you!!!


"The charge is also like the amount of water in our cup. In the same way that the total
amount of water in the cup is the integral of the flow over time, the total charge on the capacitoris the integral of the current into the capacitor over time. "

I took that to mean that the integral is the result, given that “the total
amount of water in the cup is the integral of the flow over time.” It would be interesting to have someone explain electricity without plumbing metaphors.

“RC is referred to as the time constant of the filter and represents the decay time for the circuit.”

Circuits decay? That’s what I thought when I read that. It seems like when a set of relations are said to represent a behaviour in a system, the introduction of these tools could benefit by offering an explanation of what motivates our response.

There is a something just over that next hill in my brain.

Hermann von Helmholtz in 1847 published his important work on conservation of energy in part of which he used those principles to explain why the oscillation dies away, that it is the resistance of the circuit which dissipates the energy of the oscillation on each successive cycle.

Frequent-cy; if something occurs very frequently, how frequent is its frequency. Perhaps that is the spectrum…maybe the spectrum is a cycle slice.

I used the plumbing metaphor because I thought that it would be something familiar to everyone. The key concept is that solving the integral will give you the total charge present in the capacitor. Since current is the number of units of charge (typically electrons) that pass a given point per unit of time, if you know the value of the current into the capacitor at each instant, you can calculate the total number of units of charge present by integrating the current over time.

The decay time of a circuit is a measure of how long the voltage at the output will take to reach zero after the input is made zero. In our case this is determined by the total amount of charge present which is proportional to C, the capacitance of the circuit and R which is the resistance of the circuit. The higher the capacitance and resistance value, are the longer it will take for the voltage to reach zero. AN RC circuit won’t resonate, but if we introduce an inductor into the circuit it is possible too configure the circuit so that the capacitor and inductor act as a kind of “see-saw” where current flows from the captor to the inductor and then from the inductor back to the capacitor in a repeating cycle. In this case the oscillation will gradually die away if no additional energy is introduced into the circuit, since energy is lost as heat due to the resistance of the circuit and radiated away as electromagnetic radiation.

At a more fundamental level you could ask “what is the nature of electrical charge”, but unfortunately all we can say is that it comes in two types (positive and negative), it has a fundamental unit value (the amount of charge on an electron), and a moving charge generates an electromagnetic wave. As is the case with most of what seems to make up our universe, we observe a set of events that appear to be related in some way and subsequently postulate the existence of some fundamental entity whose properties match the observed events. According to the theory of quantum mechanics, we can’t even say with certainty that an electron really exists, at least in the classical sense. Rather it is a wave of probability smeared out in space and time. As counter-intuitive as this may appear, it matches our observations with a very high degree of accuracy and is the basis for much of modern electronics.

1 Like

I follow the Amercian Pragmatist school of thought (which is a specific set of ideas), in believing that putting the word ‘really’ in front of ‘exists’ can cause a lot of unnecessary head scratching. People tend to get to quantum mechanics and throw their arms up with satisfaction, however, the subject of existence has been written about long before Lucretius proposed that the universe was composed of invisible particles called atoms.

The subject of ‘being’ is the way in. In short, Heidegger went back and worked through Aristotle’s (arguably the first scientist) metaphysics. What I get from Heidegger is that we participate in what happens by inescapably, always, having a certain agenda or motivation. The pragmatists (working separately around the same time) had very similar criticisms about the then dominant traditions.

If you go looking for electrons, chances are you will find electrons. This just means that the measurement practices that develop around expert cultures have been refined enough that their success leads to inferences. The pragmatists are happy to agree that certain metaphors are better than other metaphors, they just get off the elevator when anyone wants to go higher and say, “the reason it works is because it is true.” Although this next move is tempting, it is a great liability with low returns.

I would agree. My point was that the very concept of “existence” doesn’t apply in the quantum realm.

1 Like

Yes, it does!

No, it doesn’t!




1 Like