Analysis/resynthesis with the short time Fourier transform



Similar documents
B3. Short Time Fourier Transform (STFT)

SGN-1158 Introduction to Signal Processing Test. Solutions

Short-time FFT, Multi-taper analysis & Filtering in SPM12

Auto-Tuning Using Fourier Coefficients

Speech Signal Processing: An Overview

This document is downloaded from DR-NTU, Nanyang Technological University Library, Singapore.

ANALYZER BASICS WHAT IS AN FFT SPECTRUM ANALYZER? 2-1

A Sound Analysis and Synthesis System for Generating an Instrumental Piri Song

SIGNAL PROCESSING & SIMULATION NEWSLETTER

The Calculation of G rms

Design of FIR Filters

L9: Cepstral analysis

Frequency Response of FIR Filters

Agilent Creating Multi-tone Signals With the N7509A Waveform Generation Toolbox. Application Note

The Fourier Analysis Tool in Microsoft Excel

Sampling Theorem Notes. Recall: That a time sampled signal is like taking a snap shot or picture of signal periodically.

How To Understand The Nyquist Sampling Theorem

Sampling and Interpolation. Yao Wang Polytechnic University, Brooklyn, NY11201

FFT Algorithms. Chapter 6. Contents 6.1

The continuous and discrete Fourier transforms

Lab 1. The Fourier Transform

Time Series Analysis: Introduction to Signal Processing Concepts. Liam Kilmartin Discipline of Electrical & Electronic Engineering, NUI, Galway

AN-007 APPLICATION NOTE MEASURING MAXIMUM SUBWOOFER OUTPUT ACCORDING ANSI/CEA-2010 STANDARD INTRODUCTION CEA-2010 (ANSI) TEST PROCEDURE

The Algorithms of Speech Recognition, Programming and Simulating in MATLAB

Analog and Digital Signals, Time and Frequency Representation of Signals

MATRIX TECHNICAL NOTES

Adding Sinusoids of the Same Frequency. Additive Synthesis. Spectrum. Music 270a: Modulation

GABOR, MULTI-REPRESENTATION REAL-TIME ANALYSIS/SYNTHESIS. Norbert Schnell and Diemo Schwarz

SOFTWARE FOR GENERATION OF SPECTRUM COMPATIBLE TIME HISTORY

Lecture 8 ELE 301: Signals and Systems

SIGNAL PROCESSING FOR EFFECTIVE VIBRATION ANALYSIS

Practical Design of Filter Banks for Automatic Music Transcription

Appendix D Digital Modulation and GMSK

Applications of the DFT

chapter Introduction to Digital Signal Processing and Digital Filtering 1.1 Introduction 1.2 Historical Perspective

Digital Signal Processing IIR Filter Design via Impulse Invariance

1.4 Fast Fourier Transform (FFT) Algorithm

Convolution, Correlation, & Fourier Transforms. James R. Graham 10/25/2005

FAST Fourier Transform (FFT) and Digital Filtering Using LabVIEW

Wavelet analysis. Wavelet requirements. Example signals. Stationary signal 2 Hz + 10 Hz + 20Hz. Zero mean, oscillatory (wave) Fast decay (let)

Frequency Response of Filters

Review of Fourier series formulas. Representation of nonperiodic functions. ECE 3640 Lecture 5 Fourier Transforms and their properties

T = 10-' s. p(t)= ( (t-nt), T= 3. n=-oo. Figure P16.2

Aliasing, Image Sampling and Reconstruction

CHAPTER 6 Frequency Response, Bode Plots, and Resonance

TCOM 370 NOTES 99-4 BANDWIDTH, FREQUENCY RESPONSE, AND CAPACITY OF COMMUNICATION LINKS

Spectral Analysis Using a Deep-Memory Oscilloscope Fast Fourier Transform (FFT)

Voltage. Oscillator. Voltage. Oscillator

Final Year Project Progress Report. Frequency-Domain Adaptive Filtering. Myles Friel. Supervisor: Dr.Edward Jones

Introduction to Digital Filters

MUSICAL INSTRUMENT FAMILY CLASSIFICATION

FOURIER TRANSFORM BASED SIMPLE CHORD ANALYSIS. UIUC Physics 193 POM

Chapter 8 - Power Density Spectrum

Lecture 27: Mixers. Gilbert Cell

Correlation and Convolution Class Notes for CMSC 426, Fall 2005 David Jacobs

Impedance 50 (75 connectors via adapters)

Fast Fourier Transform: Theory and Algorithms

Probability and Random Variables. Generation of random variables (r.v.)

AN Application Note: FCC Regulations for ISM Band Devices: MHz. FCC Regulations for ISM Band Devices: MHz

Realtime FFT processing in Rohde & Schwarz receivers

Sampling Theory For Digital Audio By Dan Lavry, Lavry Engineering, Inc.

Lecture 1-6: Noise and Filters

TTT4110 Information and Signal Theory Solution to exam

Real time spectrum analyzer light

Introduction to IQ-demodulation of RF-data

Introduction to Digital Audio

RECOMMENDATION ITU-R SM Measuring sideband emissions of T-DAB and DVB-T transmitters for monitoring purposes

Time series analysis Matlab tutorial. Joachim Gross

Power Spectral Density

UNIVERSITY OF CALIFORNIA, SAN DIEGO Electrical & Computer Engineering Department ECE Fall 2010 Linear Systems Fundamentals

(Refer Slide Time: 01:11-01:27)

CONVOLUTION Digital Signal Processing

Introduction to acoustic imaging

Experiment 3: Double Sideband Modulation (DSB)

APPLICATION NOTE. RF System Architecture Considerations ATAN0014. Description

Electronic Communications Committee (ECC) within the European Conference of Postal and Telecommunications Administrations (CEPT)

Audio Engineering Society. Convention Paper. Presented at the 119th Convention 2005 October 7 10 New York, New York USA

CHAPTER 3: DIGITAL IMAGING IN DIAGNOSTIC RADIOLOGY. 3.1 Basic Concepts of Digital Imaging

Admin stuff. 4 Image Pyramids. Spatial Domain. Projects. Fourier domain 2/26/2008. Fourier as a change of basis

AM Receiver. Prelab. baseband

Matlab GUI for WFB spectral analysis

Optimum Resolution Bandwidth for Spectral Analysis of Stationary Random Vibration Data

MPEG Unified Speech and Audio Coding Enabling Efficient Coding of both Speech and Music

By choosing to view this document, you agree to all provisions of the copyright laws protecting it.

Fermi National Accelerator Laboratory. The Measurements and Analysis of Electromagnetic Interference Arising from the Booster GMPS

Audio Coding, Psycho- Accoustic model and MP3

Little LFO. Little LFO. User Manual. by Little IO Co.

HD Radio FM Transmission System Specifications Rev. F August 24, 2011


High Quality Integrated Data Reconstruction for Medical Applications

How to avoid typical pitfalls when measuring Variable Frequency Drives

Doppler. Doppler. Doppler shift. Doppler Frequency. Doppler shift. Doppler shift. Chapter 19

Spectrum Level and Band Level

The Effective Number of Bits (ENOB) of my R&S Digital Oscilloscope Technical Paper

1995 Mixed-Signal Products SLAA013

Designing a Linear FIR filter

Detection and Comparison of Power Quality Disturbances using Different Techniques

Transcription:

Analysis/resynthesis with the short time Fourier transform summer 2006 lecture on analysis, modeling and transformation of audio signals Axel Röbel Institute of communication science TU-Berlin IRCAM Analysis/Synthesis Team 25th August 2006

AMT Part II: Analysis/resynthesis with the short time Fourier transform 1/22 1 The short time Fourier transform 1.1 Interpretation as bank of filters 2 STFT parameters 2.1 Hop size 2.2 Invertibility 3 Time-/Frequency domain modifications 3.1 Arbitrary modifications 4 Appendix 4.1 Reconstruction from modified STFT

AMT Part II: Analysis/resynthesis with the short time Fourier transform 2/22 1 The short time Fourier transform We have seen how a single analysis obtained with an analysis window cutting part of the signal can be used to investigate the local properties of the signal. The key idea for time frequency analysis is to use a sequence of such analysis frames to obtain a time varying spectral analysis of the signal. two types of graphical presentations are common: log amplitude and log energy. The result of such an analysis in log amplitude form is seen in fig. 1

AMT Part II: Analysis/resynthesis with the short time Fourier transform 3/22 6000 STFT representation 5000 Frequency 4000 3000 2000 1000 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Time Figure 1: STFT amplitude spectrum of a musical performance observable features: bandwidth,... pitch, vibrato, note onsets/offsets, voiced/unvoiced, volume,

AMT Part II: Analysis/resynthesis with the short time Fourier transform 4/22 1.1 Interpretation as bank of filters In a mathematical formulation the STFT is written as follows: sequence of DFT analysis with moving window w X(n, k) = N 1+n X m=n w(m n)x(m)e jω N k(m n) (1) for symmetric windows we may transform into X(n, k) = = N 1+n X m=n m= w(m n)x(m)e jω N k(m n) (2) x(m)(w(n m)e jω N k(n m) ) (3) = x(n) ((w(n)e jω N kn ) = x(n) h w (n, k) (4)

AMT Part II: Analysis/resynthesis with the short time Fourier transform 5/22 convolution of the signal with N bandpass filters at center frequencies Ω N k. each bandpass has impulse response amplitude envelope corresponding to analysis window. filter transfer function equal to amplitude spectrum of the window, centered at the respective frequency bin. linear phase transfer function, due to the fact that the window is not centered at the origin. X(n, k) represents the signal parameters for window position n and frequency 2πk N! as seen previously X(n, k) represents sinusoidal values at the center of the window w that starts at time position n. ATTENTION: eq. (4) is used only for theoretical investigations!!! For practical applications the FFT analysis of the overlapping frames as in eq. (6) is generally much faster. While the gain depends on the STFT parameters, for common settings it is at least two orders of magnitude.

AMT Part II: Analysis/resynthesis with the short time Fourier transform 6/22 2 STFT parameters The STFT parameters are window type and length L, FFT size N, frame offset (hop size) I. MOST IMPORTANT!! window size L is selected according to frequency and time resolution such that the interesting features (sinusoidal trajectories) are resolved. for harmonic sounds: Mainlobe width fundamental frequency L 4 F 0 what can be seen is determined mostly by the window size window type is selected according to compromise between sidelobe attenuation requirements and mainlobe width. (generally Hanning or Blackman) For best efficiency FFT size N is power of 2 larger than L (STFT) (or 2L sinusoidal parameter analysis). hop size according to bandwidth of bandpass outputs (see below).

AMT Part II: Analysis/resynthesis with the short time Fourier transform 7/22 6000 small window = 1.5ms Frequency 4000 2000 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Time Figure 2: STFT amplitude spectrum with window size too small. Sinusoids are not resolved, we observe only some energy fluctuations weak relation to physical process

AMT Part II: Analysis/resynthesis with the short time Fourier transform 8/22 6000 proper window = 18.1ms Frequency 4000 2000 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Time Figure 3: STFT amplitude spectrum with properly selected window sizes. all sinusoids are resolved, information about relevant physical parameters can be obtained

AMT Part II: Analysis/resynthesis with the short time Fourier transform 9/22 6000 large window = 130ms Frequency 4000 2000 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Time Figure 4: STFT amplitude spectrum window sizes too large. time variation of sinusoids cannot be observed correctly. sinusoids disconnect. information about relevant physical process cannot be obtained Conclusion: Window size needs to be adapted to the signal and the information one is looking for.

AMT Part II: Analysis/resynthesis with the short time Fourier transform 10/22 2.1 Hop size Taking a frame offset of one we get for each bin of the STFT a complex signal with the same sample rate as the signal Because the bandwidth of the complex signal that represents the evolution of the spectrum over time is much smaller than the bandwidth of the original signal we have a rather redundant representation. using filter bank interpretation we conclude that the bandwidth of the signal attached to a particular bin is given by the mainlobe of the analysis window. we can calculate the mainlobe width B M in [Hz] for a given analysis window and derive the frame offset according to the Shannon sampling theorem such that no aliasing occurs. I = 1 B w (5) for the rectangular window we get the required frame offset for alias free representation to I M 2 for the Hanning window we get I M 4 and for Blackman I M 6

AMT Part II: Analysis/resynthesis with the short time Fourier transform 11/22 mathematical formulation of sub-sampled STFT X(lI, k) = li+n X 1 m=li w(m li)x(m)e jω N k(m li) (6) l {0, ±1, ±2,...} is integer, I is hop size, N is FFT size, L is window size.

AMT Part II: Analysis/resynthesis with the short time Fourier transform 12/22 2.2 Invertibility Can we construct the original signal from X(lI, k)? Inverse Fourier transform of one frame yields w(n )x(n + li) = r N (n ) NX X(lI, k)e jω N kn (7) k=0 n is coordinate system at the start position of the window r N (n ) is rectangular window of length N which is used to select a single period of the periodic inverse transform transform coordinate system into signal time n = n + li w(n li)x(n) = r N (n li) 1 N NX X(lI, k)e jω N k(n li) (8) k=0

AMT Part II: Analysis/resynthesis with the short time Fourier transform 13/22 short cut notation for inverse DFT of individual STFT frame x(li, n) = w(n li)x(n) (9) overlap add the contributions of all frames l using coordinate system of original signal 1 N (r N (n li) NX X(lI, k)e jω N k(n li) ) = x(li, n) (10) k=0 = w(n li)x(n) (11) = x(n) w(n li)(12) for each n for that C(n) = w(n li) 0 (13)

AMT Part II: Analysis/resynthesis with the short time Fourier transform 14/22 we can divide by C(n) to get x(n) = 1 N P r N(n li) P N k=0 X(lI, k)ejω N k(n li) P w(n li) (14) if N > L > I then C(n) 0 and the input signal can be reconstructed from the STFT

AMT Part II: Analysis/resynthesis with the short time Fourier transform 15/22 3 Time-/Frequency domain modifications

AMT Part II: Analysis/resynthesis with the short time Fourier transform 16/22 3.1 Arbitrary modifications We may apply arbitrary operators to modify a given STFT of a signal Due to the overlap of the analysis windows the STFT of a signal obeys a characteristic correlation between the neighboring frames. If these correlations are not respected, there is no signal that corresponds with the given STFT. The question to be solved: how do we generate a signal that has a STFT as close as possible to the STFT at hand. looking for minimum squared error solution the target STFT is Y (li, k), and we are looking for the signal x(n) such that N 1 X k=0 X(lI, k) Y (li, k) 2 = MIN (15)

AMT Part II: Analysis/resynthesis with the short time Fourier transform 17/22 the solution (see section 4.1) has been given by Griffin and Lim in 1984. x(n) = P w(n li)y(li, n) P w(n li)2 (16) where y(li, n) is the inverse DFT of each individual frame Y (li, k) and w(n) is the analysis window. procedure to obtain inverse STFT of modified or unmodified STFT: 1. inverse transform individual frames 2. apply analysis window as synthesis window to inverse transform 3. overlap add and keep track of the squared sum of synthesis window factors applied to each time position n 4. normalize. procedure yields original signal if STFT has not been modified and signal with optimally close STFT in case the STFT has been modified.

AMT Part II: Analysis/resynthesis with the short time Fourier transform 18/22 4 Appendix

AMT Part II: Analysis/resynthesis with the short time Fourier transform 19/22 4.1 Reconstruction from modified STFT We assume that we have a given STFT Y (li, k) that has DFT size N, hop size I and analysis window w. Y may be modified such that there exists no signal x(n) with a STFT X(lI, k) = Y (li, k). Nevertheless we may the signal x(n) that, if transformed into the STFT domain will minimize the squared error with respect to Y (li, k) D = N 1 X k=0 X(lI, k) Y (li, k) 2 = MIN (17) According to the Linearity of the DFT and to Parseval s relation for the DFT we may replace the inner sum by means of the sum over the corresponding time signal D = 1 N N 1 X k=0 x(li, n) y(li, n) 2 (18) In this equation we are given y(li, n) and we are searching for x(n) that is related to

AMT Part II: Analysis/resynthesis with the short time Fourier transform 20/22 x(li, n) according to D = 1 N N 1 X n=0 w(n li)x(n) y(li, n) 2 (19) Calculating the derivative with respect to x(n) and setting to zero we obtain the result of Griffin and Lim, eq. (16), as follows 0 = x(n) w(n li) 2 = x(n) = P 2(w(n li)x(n) y(li, n))w(n li) (20) y(li, n)w(n li) (21) y(li, n)w(n li) P w(n li).2 (22) (23)

AMT Part II: Analysis/resynthesis with the short time Fourier transform 21/22 which shows that the optimal signal is obtained by means of normalization with the squared window.

AMT Part II: Analysis/resynthesis with the short time Fourier transform 22/22 References