2
Paper ID 8055 A Hybrid Approach for Real-Time Room Acoustic Response Simulation A. Primavera 1 , L. Palestini 1 , S. Cecchi 1 , F. Piazza 1 and M. Moschetti 2 1 3MediaLabs - Universit ` a Politecnica delle Marche, Via Brecce Bianche, 60131 Ancona, Italy 2 Korg Italy, Via Cagiata, 60027 Osimo, Italy www.a3lab.dibet.univpm.it 1. Introduction Reverberation is a well known effect that has an important role in our lis- tening experience: it is composed of a series of delayed reflections from many different directions of a reproduced sound. Artificial Reverberation: State of the Art Measured IR: the desired signal can be obtained by convolving the in- put signal with a measured impulse response Accurate reproduction of a space and computational complexity bounded to the IR length. Synthetic IR: the reverberation effect can be obtained using an IIR structure (e.g. comb and/or allpass). Great flexibility, high compu- tational efficiency, low accuracy. Objective of this work We propose a Hybrid Reverberator (HR) based on both approaches: this solution attempts to create a parametric and realistic reverberation, with a low computational cost. 2. Proposed Algorithm The overall common scheme of the proposed Hybrid Reverberator is de- rived from the Moorer’s Reverberator [1]. Figure 1: Block diagram of proposed Hybrid Reverberator for the single channel case. Early reflections device: based on the convolution with an acoustic IR for the reproduction of the early echoes. Late reflections device: based on the Freeverb structure [2], an IIR filter network composed of four all-pass filters in series and eight par- allel low-pass feedback comb filters (for each audio channel), for the simulation of the reverberation tail. Figure 2: Block diagram of Freeverb (single channel). An offline procedure allows to determine all the parameters of the Hybrid Reverberator starting from an IR of a real environment: 1. Evaluation of the mixing time [3, 4, 5] to set the early reflection device (Early Reflection Partitioning). 2. Use of a minimization criteria, based on Simultaneous Perturbation Stochastic Approximation (SPSA) [6, 7] to set the late reflections de- vice (Late Reflection Analysis). 3. Early Reflection Partitioning Two main approaches used simultaneously to evaluate the mixing time: Gaussianity Estimator, Kurtosis (k ) and MAD/SD ratio (r ). k = E (x - μ) 4 σ 4 - 3 0 r = E (|x - μ|) σ r 2 π (1) Evaluation of the phase distortion based on eXtensive Fourier Trans- form. Figure 3: Estimation of the mixing time on Medium and Large Room IRs. 4. Late Reflection Analysis An adaptation procedure, based on SPSA, has been used to iteratively find the parameters set of the IIR structure. Figure 4: General scheme of the adaption proce- dure. 3 loss functions (I t , I f , I ff ) and hysteresis system in [8, 9]. Our Approach 4 loss functions (I tmodif ied , I f , I ff , I 60 ) and threshold system. 1. The index I t allows to recreate envelope and echo density. Subdividing the temporal axis in N windows of length N cam it is possible to define: I t = max(P i ) 1 i N (2) P i = P r i -P a i P r i P r i >P a i P a i -P r i P a i P a i >P r i P r i = 1 N cam N cam k =1 h 2 r (k +(i - 1)N cam ); P a i = 1 N cam N cam k =1 h 2 a (k +(i - 1)N cam ); In order to reduce the jagged effect due to the normalization a new index I tmodif ied based on an extensive window has been introduced: N cam i = N cam 0 * ρ i 1 ρ 1.1 (3)

A Hybrid Approach for Real-time Room Acoustic Response Simulation

Embed Size (px)

DESCRIPTION

Reverberation is a well known effect particularly important for music listening especially for recorded and live music. Generally, there are two approaches for artificial reverberation: the desired signal can be obtained by convolving the input signal with a measured impulse response (IR) or a synthetic one. Taking into account the advantages of both approaches, a hybrid artificial reverberation algorithm is presented. The early reflections are derived from a real IR, truncated considering the calculated mixing time, and the reverberation tail is obtained considering the Moorer's structure. The parameters defining this structure are derived from the analyzed IR, using a minimization criteria based on Simultaneous Perturbation Stochastic Approximation (SPSA). The obtained results showed a high-quality reverberator with a low computational load.

Citation preview

Page 1: A Hybrid Approach for Real-time Room Acoustic Response Simulation

Paper ID 8055

A Hybrid Approach for Real-Time Room Acoustic

Response SimulationA. Primavera1, L. Palestini1, S. Cecchi1, F. Piazza1 and M. Moschetti2

1 3MediaLabs - Universita Politecnica delle Marche, Via Brecce Bianche, 60131 Ancona, Italy2 Korg Italy, Via Cagiata, 60027 Osimo, Italy

www.a3lab.dibet.univpm.it

1. Introduction

Reverberation is a well known effect that has an important role in our lis-tening experience: it is composed of a series of delayed reflections frommany different directions of a reproduced sound.

Artificial Reverberation: State of the Art

•Measured IR: the desired signal can be obtained by convolving the in-put signal with a measured impulse response→ Accurate reproductionof a space and computational complexity bounded to the IR length.•Synthetic IR: the reverberation effect can be obtained using an IIR

structure (e.g. comb and/or allpass). → Great flexibility, high compu-tational efficiency, low accuracy.

Objective of this work

We propose a Hybrid Reverberator (HR) based on both approaches: thissolution attempts to create a parametric and realistic reverberation, witha low computational cost.

2. Proposed Algorithm

The overall common scheme of the proposed Hybrid Reverberator is de-rived from the Moorer’s Reverberator [1].

Figure 1: Block diagram of proposed Hybrid Reverberator for the single channel case.

•Early reflections device: based on the convolution with an acoustic IRfor the reproduction of the early echoes.•Late reflections device: based on the Freeverb structure [2], an IIR

filter network composed of four all-pass filters in series and eight par-allel low-pass feedback comb filters (for each audio channel), for thesimulation of the reverberation tail.

Figure 2: Block diagram of Freeverb (single channel).

An offline procedure allows to determine all the parameters of the Hybrid

Reverberator starting from an IR of a real environment:

1. Evaluation of the mixing time [3, 4, 5] to set the early reflection device(Early Reflection Partitioning).

2. Use of a minimization criteria, based on Simultaneous PerturbationStochastic Approximation (SPSA) [6, 7] to set the late reflections de-vice (Late Reflection Analysis).

3. Early Reflection Partitioning

Two main approaches used simultaneously to evaluate the mixing time:•Gaussianity Estimator, Kurtosis (k) and MAD/SD ratio (r).

k =E (x− µ)4

σ4− 3→ 0 r =

E (|x− µ|)σ

→√

2

π(1)

•Evaluation of the phase distortion based on eXtensive Fourier Trans-form.

Figure 3: Estimation of the mixing time on Medium and Large Room IRs.

4. Late Reflection Analysis

An adaptation procedure, based on SPSA, has been used to iterativelyfind the parameters set of the IIR structure.

Figure 4: General scheme of the adaption proce-dure.

3 loss functions (It, If , Iff) andhysteresis system in [8, 9].

Our Approach

4 loss functions (Itmodified, If , Iff ,Itω60) and threshold system.

1. The index It allows to recreate envelope and echo density. Subdividingthe temporal axis in N windows of length Ncam it is possible to define:

It = max(Pi) 1 ≤ i ≤ N (2)

Pi =

Pri−PaiPri

Pri > PaiPai−PriPai

Pai > Pri

Pri = 1Ncam

∑Ncam

k=1 h2r(k + (i− 1)Ncam);

Pai = 1Ncam

∑Ncam

k=1 h2a(k + (i− 1)Ncam);

In order to reduce the jagged effect due to the normalization a new indexItmodified based on an extensive window has been introduced:

Ncami= Ncam0

∗ ρi 1 ≤ ρ ≤ 1.1 (3)

Page 2: A Hybrid Approach for Real-time Room Acoustic Response Simulation

2. The index If is used to obtain a similar frequency coloration. It is definedas:

If =

L∑k=1

(Hr(f )−Ha(f ))2 (4)

where L is the FFT length.3. The index Iff is used to minimize the maximum shifting. It is defined as

Iff = max (|Fai − Fri|) 1 ≤ i ≤M (5)

where

Fri = max(Hr(k + (i− 1)Mcam)) 0 < k < Mcam − 1 (6)

Fai = max(Ha(k + (i− 1)Mcam)) 0 < k < Mcam − 1 (7)

They are obtained subdividing the frequencies axis in M window oflength Mcam, for the i−th window.

4. The index Itω60 allows to recreate the same reverberation time for all thefrequencies.

Itω60 = max (|T60r(ω)− T60a(ω)|) (8)

Figure 5: Evolution of the four indices (It, Itmodified, If and Iff ) against to the iterations numbers.

Taking into account a minimization problem, where L(θ) is the loss func-tion and θ is the p-dimensional vector of parameters, steepest descentmethod can be used to find the set of parameters θ∗ that minimize L(θ):

∂L(θ)∂θ

∣∣∣θ=θ∗

= 0 → characterized by a large number of parameters

Starting from the general recursive form of a classic minimization problem:

θk+1 = θk − ak∂L(θk)∂θk→ SPSA → θk+1 = θk − akgk(θk)

where ak is an arbitrary gain sequence and gk is the gradient estimation∂L(θk)∂θk

on the k−th iteration. Considering a simultaneous perturbation, thevalue of gk can be computed as

gk(θk) =y (θk + ck∆k)− y (θk − ck∆k)

2ck

∆k1...

∆kp

−1

(9)

where y(·) denotes a measure of the loss function, ck is a gain sequenceand ∆(k) is a p-dimensional random vector.

5. Real-Time Implementation

A real time implementation of the Hybrid Reverberator has been real-ized on DIOPSIS940HF a dual-core processing platform composed of anARM926 at 160MHz and a mAgicV VLIW floating-point DSP at 80MHz.•Early Reflection Device: FIR filtering implemented using the parti-

tioned overlap and save technique [10, 11, 12] to obtain low input/outputdelay.•Late Reflection Device: High performance have been obtained paral-

lelizing DMA transfer and signal processing operations.Design constraints impose an implementation of the Hybrid Reverberatorusing a frame-size (FS) of 64 samples.

6. Experimental Results

The automatic procedure for the parameters setting has been testedwith 2 different real IRs, relative to a Medium and a Large Room.

Figure 6: EDR of natural (top) and artficial (bottom) IRs using Hybrid Reverberator.

The artificial effect generated to reproduce the Medium Room environ-ment sounds really similar to the natural one, while the effect generatedto reproduce the Large Room environment sounds slightly unnatural.

Maximum length of the IR using Partitioned Overlap-Save (P-OLS)→ 64samples→ 160ms.

Workload results as the sum oftwo contributes:

•Early Reflections Device→ it de-pends on the mixing time value.• Late Reflections Device → it is

equal to 11%.

P-OLS HR

(2048 samples) (64 samples)

Medium Room 14% 53%

Large Room 18% 45%

Table 4: Workload obtained using P-OLS andHR with different values of the FS.

7. Conclusion

•A Hybrid Reverberator with an automatic procedure for the parameterssetting has been proposed.•The automatic procedure is based on the evaluation of the mixing time

and the minimization of four different loss function using SPSA criteria.•A real time implementation of the proposed algorithm has been realized

on a DSP platform.•Different tests have been carried out in order to evaluate reverberation

quality, in terms of subjective evaluation and objective measures.•The generated artificial effect sounds really similar to the natural one

when T60 is relatively short (T60<1.5s).•Future works will be oriented toward the refinement of the IIR filters net-

work.

References[1] J. Moorer, “ About This Reverberation Business,” Computer Music Journal, vol. 3, no. 2, pp. 13–28, 1979.

[2] “http://freeverb3.sourceforge.net/.”

[3] B. Blesser, “An interdisciplinary synthesis of reverberation viewpoints,” J.Audio Eng. Soc., vol. 49, no. 10, pp. 867–903, 2001.

[4] G. Defrance and J. Polack, “Measuring the mixing time in auditoria,” Proc. of Acoustics 08 Paris, pp. 3869–3974, 2008.

[5] R. Stewart and M. Sandler, “Statisical measures of early reflections of room impulse responses,” in DAFX 07, (Bordeaux, France), September 2007.

[6] J. Spall, “An Overview of the Simultaneous Perturbation Method for Efficient Optimization,” Johns Hopkins APL Tech. Dig., vol. 19, pp. 482–492,1998.

[7] ——, “Implementation of the Simultaneous Perturbation Algorithm for Stochastic Optimization,” IEEE Trans. on Aerospace and Electronic Systems,vol. 34, pp. 817–823, 1998.

[8] A. Uncini and G. Constantini, “Real-Time Room Acoustic Response Simulation by an IIR Adaptive Filter,” Elec. Letters, vol. 39, pp. 330–332, 2003.

[9] ——, “Adaptive Filter for Real-Time Room Acoustic Response Simulation,” Proc of the 2nd Int. Conf. “Understanding and Creating Music”, Caserta,no. November, 2002.

[10] W. Gardner, “Efficient Convolution without Input-Output Delay,” J.Audio Eng. Soc., vol. 43, pp. 127–136, 1995.

[11] A. Farina and A. Torger, “Real-Time Partitioned Convolution for Amiophonics Surround Sound,” IEEE Work. on App. of Signal Proc. to Audio andAcoustics, 2001.

[12] ——, “Implementation of Real-Time Partitioned Convolution on a DSP Board,” IEEE Workshop on App. of Signal Proc. to Audio and Acoustics, 2003.