reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfselectivity...

40
Reverberation algorithms Augusto Sarti Summary The Reverb Problem Reverb Perception Acoustic impulse response: Formation mechanisms Parameters Early Reflections Late Reverb Numerical reverberation algorithms Schroeder Reverbs Feedback Delay Network (FDN) Reverberators Waveguide Reverberators Geometrical reverberation algorithms

Upload: others

Post on 12-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Reverberation algorithms

Augusto Sarti

SummaryThe Reverb ProblemReverb PerceptionAcoustic impulse response:

Formation mechanismsParameters

Early ReflectionsLate ReverbNumerical reverberation algorithms

Schroeder ReverbsFeedback Delay Network (FDN) ReverberatorsWaveguide Reverberators

Geometrical reverberation algorithms

Page 2: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Impulse responseThe sounds we perceive heavily depend on the surrounding environment

Environment-related sound changes are of convolutive origin (filtering)

Well-modeled by a space-varying impulse response

Direct signal

Earlyreflections

Reverberations

S

R

S

R

S

R

Time

Am

plit

ud

e

Impulse response

Page 3: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Reverberation tf FunctionThree sources, one listener (two ears)

Filters should include pinnae filtering

Filters change if anything in the room changes

(exact model)

Global descriptorsEnergy decay curve (EDC)

Introduced by Schroeder to define reverberation timeIt measures the total signal energy remaining in the reverberator’s impulse response at time tIt decays more smoothly than the impulse response, therefore itworks better than the amplitude’s envelope for defining the reverberation timeIn reverberant environments a large amount of the total energy iscontained in the last portion of the impulse response

Reverberation time

}60)0()(:{60 dBEDCtEDCtT −==

Page 4: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Global descriptors

EDR of a violin body

Page 5: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

In the room’s transfer function we can single out resonant modes

The spacing between two resonant modes is given by

which is valid above the threshold frequency

Global descriptors

Number of echoes in the impulse response before time t

Derivative of Nt:

Clarity index: ratio btw early reflections energy and latereverberation energy

Global descriptors

Page 6: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Implementation

Page 7: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize
Page 8: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize
Page 9: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize
Page 10: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize
Page 11: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize
Page 12: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize
Page 13: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize
Page 14: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Moorer reverberatoraccounts for late reverberations by placing anIIR filter after the FIR filter (tapped delay line)

Page 15: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Binaural impulse responseOur sound perception is affected by ourown body

Head Related Transfer Function (HRTF)

Acoustic paths can begrouped together toreduce cost

Comb filter

Page 16: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Allpass filter

Page 17: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Steady-state

tones (sinusoids)

really do see the

same gain at

every frequency

in an allpass,

while a comb

filter has widely

varying gains

Page 18: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Comb filters and reverberation timeThe decay between successive samples in comb and allpass filters is described by the gain coefficient gi

In order for the comb filter’s decay to correspondto a given reverberation time, we must have

Combination of comb filters

Single comb filters do notprovide sufficient echo density

In order to improve the echodensity, we need to combine multiple comb filters

Cascading comb filterscorresponds to multiplying theirtransfer functions

Frequency peaks not shared by allcomb filters are cancelled bymultiplication

Page 19: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Combination of comb filters

Better to place combfilters in parallel

Example

Parallel comb filters

The poles of comb filters are given by

The poles have the same magnitudes

The modal density (No. of modes per Hz) is

Page 20: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Parallel comb filtersModal density turns out to be the same at allfrequencies, unlike real rooms

Above a threshold frequency, the modal density is constant

The modal density of the comb filters is then set to the modal density above the thresholdfrequency

Parallel comb filtersThe echo density of the comb filters isapproximatively given by

Relating echo density and modal density provides:

Page 21: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Combination of allpass filtersUnlike comb filters, allpass filters must becascaded

Multiplying freq. responses corresponds to adding phase responses

Schroeder’s reverberator (1)

Page 22: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Schroeder’s reverberatorDelays of the comb and allpass filters are chosen so thatthe ratio of the largest and smallest delay is 1.5 (typically30 and 45 ms)

The gains gi of the comb filters are chosen to provide a desired reverberation time Tr according to

Allpass filters delays are set to 5 and 1.7 ms

Page 23: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize
Page 24: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Feedback Delay Networks……at a glance

Unitary matrix: definition

A matrix is unitary if :

We can also write that a matrix is unitary if

|||||||| uuM =⋅

1|||||||| == MMMM TT

Page 25: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

FDN

Stability of the feedback loop is guaranteed if A = gM where M is an unitary matrixand |g|<1.

Outputs will be mutually incoherent: we can use the FDN to render the diffusesoundfield with a 4 loudspeaker system.

The early reverbeartions can be simulated by appropriately injecting the inputsignal into the delay lines.

⎥⎥⎥⎥

⎢⎢⎢⎢

=

44434241

34333231

24232221

14131211

aaaa

aaaa

aaaa

aaaa

A

Jot’s reverberator

⎥⎥⎥⎥

⎢⎢⎢⎢

=

NN

N

N

aaa

aaa

aaa

4421

22221

11211

L

MMMM

L

L

A

⎥⎥⎥

⎢⎢⎢

⎡=

Nb

b

M1

b

[ ]=c

⎥⎥⎥

⎢⎢⎢

⎡=

Nc

c

M1

c

Page 26: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Jot’s reverberator

The input-output relation of Jot’s reverberator is given by

with and

Jot’s reverberatorSystem transfer function:

Zeros:

Poles:

Page 27: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Jot’s reverberatorMoorer noted that convolving exponentiallydecaying white noise with source signalsproduces a very natural sounding.

As a consequence, by introducing absorptivelosses into a lossless prototype, we shouldobtain a natural sounding reverberator.

This is accomplished by associating a gain witheach delay:

Jot’s reverberatorThe logarithm of the gain is proportional to the length of the delay:

The above modification has the effect of replacing z withz/γ in the transfer function

The lossless prototype response h[n] will be multiplied byan exponential envelope γn

Page 28: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Modeling the Environment

Modeling the environment

Simulate reverberations due toenvironment

Page 29: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

MotivationsAcoustical environment provides ...

Sense of presence

Comprehension of space

Localization of auditory cues

Selectivity of audio signals (“cocktail party effect”)

Geometric acoustic modelingSpatialize sound by computing reverberationpaths from source to receiver

Page 30: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Similarities to GraphicsBoth model wave propagatation

Differences from Graphics ISound has longer wavelengths than light

Diffractions are significant

Specular reflections dominate diffuse reflections

Occlusions by small objects have little effect

Page 31: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Differences from Graphics IISound waves are coherent

Modeling phase is important

Sound travels more slowly than lightReverberations are perceived over time

Differences from Graphics III

Page 32: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Overview of approachesFinite element methods

Boundary element methods

Image source methods

Ray tracing

Beam tracing

Finite element methodsSolve wave equation over grid-aligned mesh

Page 33: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Boundary element methodsSolve wave equation over discretizedsurfaces

Boundary Element Trade-offs

AdvantagesWorks well for low frequencies

Simple formulation

Page 34: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

DisadvantagesComplex function stored with each element

Form factors must model diffractions & specularities

Elements must be much smaller than wavelength

Boundary Element Trade-offs

Image source methodsConsider direct paths from “virtual sources”

Page 35: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Image source trade-offsAdvantages

Simple for rectangular rooms

DisadvantagesO(nr) visibility checks in arbitrary environments

Specular reflections only

Image source trade-offs

Page 36: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Path tracingTrace paths between source and receiver

Path Tracing Trade-offsAdvantages

Models all types of surfaces and scattering

Simple to implement

Incoming ray

Sampledreverberations

Page 37: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Path Tracing DisadvantagesDisadvantages

Subject to sampling errors (aliasing)

Depends on receiver position

Beam TracingTrace beams (bundles of rays) from source

Page 38: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Beam Tracing Trade-offsAdvantages

Takes advantage of spatial coherence

Predetermines visible virtual sources

Beam Tracing Disadvantages

DisadvantagesDifficult for curved surfaces or refractions

Requires efficient polygon sorting and intersection

BSPsCell adjacency graphs

Page 39: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

Complex 3D EnvironmentsPrecompute beam tree for stationary source

Interactive PerformanceLookup beams containing moving receiver

Page 40: Reverberation algorithms - completefreeverb3vst.osdn.jp/doc/reverberation_algorithms.pdfSelectivity of audio signals (“cocktail party effect”) Geometric acoustic modeling Spatialize

SummaryFEM/BEM

best for low frequencies

Image source methodsbest for rectangular rooms (very common)

Path tracingbest for high-order reflections (very common)

Beam tracingbest for precomputation