Allpass Filter from 2 Comb Filters

An allpass filter is a filter used to pass all frequencies with equal gain but change the relationship in the phase.  This might not mean a lot, however, allpass filters are used in reverbs, vocoders and different kinds of delays.  They are also very easy to make in Max/MSP using Gen~.

This little post shows how to make an allpass filter in which the delay time is not set, meaning any amount of delay in samples can be used.  This allows the user to have various types of effects from one allpass filter.  Besides serving as a traditional allpass, it can create echo with some feedback as well as reverb and echo with each echo having reverb.  This is all controlled by the delay time.

Screen Shot 2016-03-21 at 4.29.14 PM

In the above patch an input is being added to a delayed version of itself.  The delay @feedback 1 takes the signal and delays it by a certain amount of samples.  The @feedback 1 argument is used to allow feedback to occur.  Out of the delay, the signal gets multiplied by a gain amount -1 which will cause the feedback gain and feedforward gain to be inverse from one another (cross fade between clean and effect).  The signal + feedback get multiplied by gain and added to the delay.

The description might be a little confusing, but to sum it up… a delayed signal is added to itself (feedback) and added to the feed forward signal.  The flow chart is as follows


Screen Shot 2016-03-21 at 4.41.30 PM

It is important to note that the feed forward takes place after the input gets multiplied by the feedback and the feedback happens before it gets added to the feedforward.  This small little patch can also be duplicated in series or parallel to create interesting reverb and echo.  Also, if the feedforward is left out it turns into a one-pole filter.


One thought on “Allpass Filter from 2 Comb Filters

  1. Thanks! Just browsing the internet for a gen~ allpass implementation and your example helped me!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s