interpolated delay lines ideal bandlimited interpolation...

49
Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional Delay Filter Design

Upload: hanhi

Post on 19-Aug-2018

231 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Interpolated Delay Lines

Ideal Bandlimited Interpolation

Fractional Delay Filter Design

Page 2: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

  Low-Order (Fast) Interpolators   Linear

  Allpass

  High-Order Interpolation   Ideal Bandlimited Interpolation

  Windowed-Sinc Interpolation

  Optimal FIR Filter Design for Interpolator

  Least Square

Summary

Page 3: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Simple Interpolators for Real-Time

Fractional Delay Filtering

  Linearly Interpolated Delay Line (1st-Order

FIR)

  Allpass Interpolated Delay Line (1st-Order)

Page 4: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 5: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Frequency Responses of Linear

Interpolation for Delays between 0 and 1

Page 6: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Linear Interpolation as a Convolution

Page 7: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 8: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 9: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 10: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 11: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

x [n ] x̂[n− Δ ]

Page 12: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Phase Delays of First-Order Allpass

Interpolators for Various Desired Delays

Page 13: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

First-order allpass interpolation

Page 14: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 15: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 16: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 17: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 18: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 19: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 20: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 21: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 22: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 23: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 24: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 25: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 26: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 27: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 28: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 29: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Windowed sinc

Page 30: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional
Page 31: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Effects in

time-space domain

Page 32: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Summary

  Fractional Delay line – overview

  Time Variant Fractional Delay line

  Digital effects

  Industry standard structure

  Vibrato

  Flanger

  Chorus

  Eco

  Leslie

Page 33: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Delay line – Overview

  Minimum delay time is depending on sample rate:

  Tmin = 1/Fs

  We define Tmin as the unitary delay time

  In many applications it’s needed a “continuous delay”

Fractional Delay Line

z− k y[n]= x[n− k ]x [n ] k ∈ Z

Page 34: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Fractional Delay line – Overview

  We define D

  D can be defined as the sum of an integer part and a real part

0<= α< 1

  Defining an operator LD, we obtain

Where LD is the delay operator and an interpolation operator which can be a function or a filter

z− D y[n]= x[n− D]x [n ] D∈ R

Page 35: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Interpolation

Filter

Time Variant Fractional Delay Line

  Many digital effects are based on a Delay variant on time

  Implementation

Time Variant Fractional Delay Line

y[n ]= x[n− D[n ]] D depends on n (time)

Page 36: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Time Variant Fractional Delay Line

  We write as

D0 is the nominal length of the delay

fd[n] is the variation function

is the variation index

the type of the effect is depending on fd[n] and md

  A sinusoidal variation function is often used (LFO)

  Considering the original relation, we obtain

D0 is the mean values of the delay line

D[n ]

y[n] = x[n−D0(1+mD fD [n])

mD=D1

D0

∈ [0,1]

Page 37: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Time Variant Fractional Delay Line Phase Modulation by TV-FDL

  Given xm[n] a modulant signal and x[n] the carrier

  We define modulation as

where f is a generic modulation function, if it is true that

where g is the demodulation function

  The Phase Modulation can be written as

  if D[n] = kpxm[n] Phase Modulation made

by TV-FDL

  Depending on the modulation function we will also have a modulation in frequency.

Page 38: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Traditional effects

  Traditional effects are typically based on the superposition of multiple delayed version of the musical signal   Depending on delays between repetitions we have

  Echo

  Chorus

  Flanger

  Based on modulated delay line   Which also allows us to make

  Vibrato

  Doubling

Page 39: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Industry standard structure

  Dattorro proposed a general scheme for some digital effects

  Modulated delay line:

  delay D[n] is modulated (LFO)

  feedback fb

  Feedforward ff

  Output: modulated signal mixed with the non-modulated one and

controlled with a blend coefficient b

Z− D[n]

LFO

Page 40: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Vibrato

  Vibrato is a simple frequency modulation

  Remove feedback and blending (only modulated

output signal)

  Delay line sized for a delay of about 5 ms

  A minimal delay (below 1ms) gives best results

Z− D[n]

b ff fb

Page 41: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Z− D[n]

Flanger

  Add to the original signal a “dynamically” delayed signal   Delay must be within the ear’s integration time

  A 1 ms delay line is OK for most applications

  This results in a richer spectrum (FM)

  The above coefficients tend to maximize the “spectral comb”

  Allpass interpolator is preferable   The amplitude attenuation of a linear interpolator would damage

high-frequency peaks

b ff fb

Page 42: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Standard chorus

  Add to the original sound a slightly delayed replica of its (a 5 ms delay is OK for most cases)   In this case the spectral comb is undesirable, therefore we remove the feedback

  Transparency is usually desirable (guitarists usually prefer)   Linear interpolation is not suitable because of high-frequency attenuation

  A better solution (white chorus) is to feed the signal back, while keeping the whole system as allpass as possible, i.e. setting fb=b. This way the output is richer at high frequencies without using an allpass

  Residual peaks is reduced by setting ff different from b

b ff fb

Z− D[n]

Page 43: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Z− D[n]

b ff fb

Doubling

  It’s a chorus with a single delay line and Depth

values generally higher

  Mostly used by singers as it doubles the voice

  Delay margin can change quite significantly (typically 20

ms)

  Modulation should be rather random

Page 44: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Echo

  Needs a significantly long delay line

  below 80 ms we cannot distinctly perceive two replicas of

identical signals

  coefficients must be adjusted depending on desired timbre

b ff fb

Z− D[n]

Page 45: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Electro-mechanical ancestor   Rotary Speaker – Leslie

  One of the most famous effect (Electro-mechanical) use to effect

the sound of the Hammond

  Two rotary horn as treble

speakers (only 1 active)

  One rotary cylinder for bass

speaker

  Possibility of changing rotary

speed

  Choral (low) ~ 15-20 rpm

  Tremolo (high) ~ 300-500

rpm

Page 46: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Leslie   In model 122 only one treble rotary speaker is used

  Wood rotary cylinder in front of the woofer

  If the listener is in a fixed position

  Amplitude modulation given by the high directivity of the rotating speaker

  Pitch modulation given by the doppler effect

 The max amplitude value will be when

 The max pitch modulation will be when

Page 47: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Leslie   Generally Leslie it’s amplified with 3 microphones:

  a stereo couple for the treble

  high directivity

  a single mic for the bass

  doppler effect is less evident

Page 48: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Leslie   Considering only the rotating horns

Page 49: Interpolated Delay Lines Ideal Bandlimited Interpolation ...home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf · Interpolated Delay Lines Ideal Bandlimited Interpolation Fractional

Leslie

  2 channels: yL[n] and y

R[n]

  Frequency modulation for doppler effect (TV-TDL)

  Amplitude modulation for each channel