22

Wikipedia says:

An all-pass filter is a signal processing filter that passes all frequencies equally in gain, but changes the phase relationship among various frequencies.

  1. What does changes the phase relationship among various frequencies mean and what is its musical application?
  2. Where is an All-Pass Filter used?
  3. Are there any All-Pass filter plugins (AU, VST, AAX)?
0

4 Answers 4

26
  1. Are there any All-Pass filter plugins(AU, VST, AAX)?

The standard EQ plugin of Reaper (ReaEQ, you can also get this as a separate VST plugin) has different modes for the filters (a parametric EQ is nothing but a cascade of tweakable filters), including allpass.

enter image description here

  1. What does changes the phase relationship among various frequencies mean and what is its musical application?

One way to look at it is that an all-pass filter is a short frequency-dependent delay. (In fact, an ordinary delay might also be considered an all-pass filter, though that's not usually what's meant by it.) See this example of a sweeping 1st-order all-pass applied to two different sinusoidals:

Overview of how all-pass acts on sinusoidals

For very high filter frequencies, both signals are only delayed by the same small time, whereas for very low frequencies the delay approaches ½ or the signal period. (These exact details may vary between different kinds of APFs, but the principle is always similar.)

  1. What does changes the phase relationship among various frequencies mean and what is its musical application?

As the other answer said, it is mostly relevant when you combine multiple signals that have a fixed phase relation – like one instrument recorded with two microphones. It may be that the microphones give in-phase signals below 300 Hz but out-of-phase for higher frequencies. In this case, neither direct mix nor phase-inverting one of the mics may give a good result, but an all-pass filter (and/or a short delay) on one of the channels might help.

Unlike a delay, an all-pass filter does also have an effect when applied to a single signal in isolation, though this is not evident on sinusoidals and almost inaudible because the ears are most sensitive to the Fourier amplitudes (i.e. sinusoidal components). However, in practice most signals are of course not sinusoidal. As the filters are linear, the result for a superposition is the same as a superposition of individually-filtered sinusoidals, however because those are delayed by different amounts, the resultant waveshape does actually change. In the example of those two sinusoidals, like this:

APF on sine-superposition

Again, the ear isn't very sensitive to phase, but the effect is quite significant in particular for signals with strong transients, such as this:

APF on transient-heavy signal

Notice how, although the APF does by definition not affect the power of the signal, it does in this case reduce the amplitude considerably, because the transient is smeared out a bit. This can be useful e.g. for drum tracks, to maximise loudness within a given headroom without needing compressor/limiter/softclipping.


Source code (Haskell with dynamic-plot):

import Graphics.Dynamic.Plot.R2
import Data.List
import Data.Function
import Text.Printf

type Signal = [Double]

lpf :: Double -> Signal -> Signal
lpf f = go 0
 where go s (y:ys) = s' : go s' ys
        where s' = s*(1-η) + y*η
       go _ [] = []
       η = 2*pi * f / sRate


allpass :: Double -> Signal -> Signal
allpass f ys = zipWith (\lfd orig -> 2*lfd - orig)
                  (lpf f ys) ys

signalPlot :: Signal -> DynamicPlottable
signalPlot ys = lineSegPlot $ zip [0, 1/sRate..] ys

functionSignal :: Double -> (Double -> Double) -> Signal
functionSignal l f = f <$> [0, 1/sRate .. l]

sRate :: Double
sRate = 44100

examples :: [ [DynamicPlottable] ]
examples = [ example ++ [forceXRange (0.01, 0.02), xAxisLabel "𝑡"]
           | example <- plots ]
 where plots
        = [ let [sig0, sig1] = functionSignal 0.02
                 <$> [(+1) . sin . (2*pi*440*), (+(-1)) . sin . (2*pi*675*)]
            in [ signalPlot sig0 & legendName "440 Hz"
               , signalPlot sig1 & legendName "675 Hz"
               , animatedAllpassPlot $ \apf -> plot $ signalPlot . apf
                                                 <$> [sig0, sig1]
               ]
          , let sig = functionSignal 0.02
                 $ \t -> sin (2*pi*440*t) + sin (2*pi*675*t)
            in [ signalPlot sig & legendName "440 Hz & 675 Hz"
               , animatedAllpassPlot $ \apf -> signalPlot $ apf sig
               ]
          , let sig = functionSignal 0.02
                 $ \t -> let φ = 2*pi*300*t in (sin φ/1.4 + 0.3)^9 - cos φ/3
            in [ signalPlot sig & legendName "Orig"
               , animatedAllpassPlot $ \apf -> signalPlot $ apf sig
               ]
          ]
       animatedAllpassPlot ftrUsr
               = plotLatest [ ftrUsr (allpass f)
                               & legendName (printf "APF @%.0g Hz" f)
                            | f <- (+50) . (*800) . (+1) . sin <$> [0,0.1..]
                            ]


main :: IO ()
main = mapM_ plotWindow examples
3
  • 3
    The last image and explanation here also demonstrates the idea behind a very popular use for phase rotation: processing for radio broadcast. Phase rotators are (or at least were - not sure if digital broadcast still does this) used in radio broadcast to reduce the peaks (called modulation in radio) without reducing the signal power. Commented Nov 6, 2020 at 19:08
  • Great answer! Cannot compete with Haskell!
    – Tom
    Commented Nov 7, 2020 at 1:11
  • I wish I understood any of that. Even the tiniest bit.
    – Creynders
    Commented Nov 9, 2020 at 15:24
8

I am going to answer only your first two questions (or at least, I will try).

An audio signal can be seen as a sum of sinusoids. These sinusoids each have an amplitude and a phase. The amplitude is self-explaining but the phase actually tells you if all your sinusoids started together or not (in a very rough way).

Most of filters (standard low-pass, high-pass and bandpass) are modifying both the amplitude of these sinusoïds (for instance reducing the one of higher frequency for the low-pass), but also their phases. For the particular example of the low-pass, what you get after the filter will be in phase with the incoming signal below its cutting frequency and completely out of phase above. Completely out of phase actually means that the signal is reversed: A(t) becomes -A(t). Around the cutoff frequency, intermediate situations exist as the phase shift is continuous between 0 and pi (or minus pi, 2pi depending on the filter).

This can cause some issue, for instance leading to phase issues if you try to mix the original signal with the filtered signal: the phase relationship between these two signals will not be the same below and above the cutoff frequency. To prevent this, one can use an allpass to change the phase relationship between two signals to avoid this.

This kind of filters can also be used for instance in phase distortion synthesis in order to modify the tone of a sound.

(A quick and dirty answer, I'll try to edit when I get a bit of time…)

1
  • 1
    Interestingly, many kinds of filters may be produced by taking an all-pass filter and mixing its output with the unmodified original signal. Signals whose phase is unaffected or shifted by a whole manner of periods will double in strength; those whose phase was shifted by an odd number of half-periods will be eliminated. Those whose phase is shifted by other amounts will be attenuated and phase-shifted to varying degrees.
    – supercat
    Commented Nov 7, 2020 at 20:59
5

I have tried to answere the questions to my understanding, but I would not consider myself very experienced in this topic. So feel free to correct or hint me if something is not totally correct or just plain wrong.


I have found the following information on this site:

1. What does changes the phase relationship among various frequencies mean and what is its musical application?

Allpass filters are filters that have what we call a flat frequency response; they neither emphasize nor de-emphasize any part of the spectrum. Rather, they displace signals in time as a function of frequency. The time displacement accomplished by an allpass filter is specified by its phase response. Allpass filters are used in circuit design to perform various frequency-dependent time-alignment or time-displacement functions.

So all pass filters are making changes to the phase of an audio source in specific frequencie ranges.

What is the phase?

Sound is just moving air and the phase is the way the air moves. For example if a string of a guitar is swinging with 500 Hz (swinging 500 times a second) you could show the air movement which is produced in this way:

enter image description here

(Of course it would not produce such a clean wave. The string would also swing on other frequenzies like 1000 Hz, would resonate with itself, the body of the guitar etc. Thats why you dont hear a sinus tone when you struc a string.).

You can now switch the phase and get this result:

enter image description here

An all pass filter can make such changes for specific frenquencies in an audio source.


2. Where is All-Pass Filter used?

Audio applications include filter banks, speaker crossovers, and reverberators. Allpass filters appear in both continuous- and discrete-time applications.

So all pass filters seems to be part of other audio transforming effects like reverbs.

Changing the phase of an audio source is often used to disable phase canccelation

Phase canccelation is when thwo phases, like the ones above, would cancel each other out. If you layer those two sine waves above another, you would hear no sound, since each wave valley would be canceld out by the wave crest of the other sine wave. So you would have no movement at all. This is a big factor in recording, aspecially when you use two mics to record the same source.


3. Are there any All-Pass filter plugins(AU, VST, AAX)?

As of my understanding of the article I linked, all pass filters most of the time are used internally inside other more complex vst's. There are some eq's and filters which provide an all pass filter functionality like the ReaEQ and the Fruity Love Philter

1
  • 1
    Fruity Love Philter is a standalone filter plugin with an all pass filter (available as VST or FL proprietary format)
    – Edward
    Commented Nov 6, 2020 at 15:55
5

I have answered these questions in full in a video and an article.

In summary:

  1. What does changes the phase relationship among various frequencies mean and what is its musical application?

It means that different frequencies are delayed by different phase shifts in radians. The maximum negative phase delay occurs for the Nyquist frequency (half the sampling rate). For example, for a first-order all-pass filter, phase delay is 0 radians at 0 Hz and -PI radians at the Nyquist frequency. Again, visualization for the first-order all-pass filter and the second-order all-pass filter.

  1. Where is an All-Pass Filter used?

Selected applications of all-pass filters are reverberation algorithms (Schroeder reverberator, Freeverb algorithm), parametric equalizers (musically useful high-pass, low-pass, shelving, notch, band-pass filters), the phaser effect, and phase equalization (e.g., when mixing signals from microphones with different phase responses).

  1. Are there any All-Pass filter plugins (AU, VST, AAX)?

Yes, ReaEQ (as was mentioned), here I present an example anyone can play with.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.