analysis of piano tones using an inharmonic inverse comb...

19
1 11th International 11th International Conference Conference on on Digital Audio Digital Audio Effects Effects September September 1-4, 2008, Espoo, Finland 1-4, 2008, Espoo, Finland September 4, 2008 Heidi-Maria Lehtonen Analysis of Piano Tones Using an Analysis of Piano Tones Using an Inharmonic Inverse Comb Filter Inharmonic Inverse Comb Filter Heidi-Maria Lehtonen Helsinki University of Technology (TKK) Department of Signal Processing and Acoustics Espoo, Finland Sound check

Upload: others

Post on 24-Mar-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

1

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008 Heidi-Maria Lehtonen

Analysis of Piano Tones Using anAnalysis of Piano Tones Using anInharmonic Inverse Comb FilterInharmonic Inverse Comb Filter

Heidi-Maria Lehtonen

Helsinki University of Technology (TKK)Department of Signal Processing and Acoustics

Espoo, Finland

Sound check

Page 2: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 2

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

Outline of the PresentationOutline of the Presentation• Introduction and motivation• Fractional-delay inverse comb

filter (ICF)• Design of inharmonic ICFs

– FIR– IIR

• Application examples• Conclusions

Page 3: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 3

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

IntroductionIntroduction• Analyze inharmonic piano tones with

a simple filtering-based method– Cancel all partials → residual signal– Select single partials

• Continuation to earlier work– Analysis of harmonic musical signals

(Välimäki et al. 2004, Välimäki et al. DAFx-07,Lehtonen et al. 2008)

Page 4: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 4

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

MotivationMotivation• The Ultimate Goal: physically

informed sound synthesis of thepiano

• Need for parameters and otherinformation from recorded tones– Partial amplitudes, decay times– Characteristics of the residual

• Simple and effective way to cancelpartials or select them forparameter extraction?

Page 5: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 5

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

Fractional-delay Inverse Comb Filter (ICF)Fractional-delay Inverse Comb Filter (ICF)• Delay line length L = fs/f0

– fs = sampling rate (44.1 kHz)– f0 = fundamental frequency

Harmonic locations

Use e.g. Thiran or Lagrange filter designto implement fractional delay (Välimäki et al.DAFx-07, Lehtonen et al. 2008)

Page 6: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 6

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

Inharmonic Inharmonic ICFICF• Piano tones are

inharmonic!• Inharmonicity is caused

by dispersion• Partial frequencies fk

can be computed from(Fletcher et al. 1962)

– B is inharmonicity coefficient(assumed to be known)

Partial locations

!

fk

= kf0

1+ k2B

Page 7: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 7

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

Properties of Inharmonic ICFProperties of Inharmonic ICF• The filter in the ICF needs

to have frequency-dependent phase delay

• Many design techniquesapproximate this behavior(e.g. Rocchesso and Scalcon 1996,Testa et al. 2004, Bensa et al. 2005,Rauhala and Välimäki 2006 etc.)

• For signal analysis, moreaccuracy is needed

Page 8: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 8

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

Inharmonic Inharmonic FIR FIR FilterFilter• Design phase and magnitude response: H(ω)=|H(ω)|ejθ(ω)

– Phase is a multiple of 2π radians at partial frequencies fk– Magnitude response imitates a lowpass filter (passband 0-20 kHz)

• Use inverse DFT to obtain filter coefficients from H(ω)• Linear-phase LP filter HU(z) is used to synchronize the

signals

Control the gainat the bottom ofthe notches

Page 9: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 9

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

Inharmonic Inharmonic IIR IIR Filter Filter (Abel and Smith DAFx-06)(Abel and Smith DAFx-06)

• Nonparametrictechnique:– Divide the desired

group delay area intosections of 2π

– Assign a pole-zeropair to each section

– Each pair contributesarea of 2π to thetotal group delay

Gro

up d

elay

(sam

ples

)

Frequency (radians)0 π

100

Target

Obtainedgroup delay(sum ofsections)

Group delay of each section

Use a tuning filter tocompensate thedifference

Page 10: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 10

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

Inharmonic Inharmonic FIR FIR vsvs. IIR . IIR FilterFilterFIR

IIR with tuning filter

IIR

• Attenuation atpartial frequencies:* FIR of order 1000• IIR, 30 biquads and

tuning filter of order29

x IIR, 30 biquads

• Filters are designedfor C4– f0 = 261.6 Hz– B = 3.0x10-4

Page 11: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 11

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

Harmonic Extraction Filter (HEF)Harmonic Extraction Filter (HEF)• Select single harmonics by cascading a resonator with the

ICF structure (Välimäki et al. DAFx-07, Lehtonen et al. 2008)• The pole of the resonator cancels one zero of the ICF in

the z-plane– One partial is preserved while the others are canceled

Page 12: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 12

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

Application #1: Harmonic ExtractionApplication #1: Harmonic Extraction• Extract single harmonics

(#1, #25, #55) from asynthetic test signal

• Signal is a sum of 58sinusoids– f0 = 261.626 Hz (C4)– B = 2.9936x10-4

Page 13: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 13

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

Application #1:Application #1: Harmonic ExtractionHarmonic Extraction

Inharmonic ICF with FIR Inharmonic ICF with IIR

Page 14: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 14

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

Application #2: Partial Extraction from Real Piano TonesApplication #2: Partial Extraction from Real Piano Tones• Select partials from

the piano tone A2• Use ICF with FIR

Spectrum of the tone Response of the filter

Partial #10

Original tone and10 first partials

Page 15: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 15

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

Application #3: Residual Signal of a Real Piano ToneApplication #3: Residual Signal of a Real Piano Tone• Use a recorded

piano tone D5 (f0 =587.1 Hz, B =0.0012), filter twicefor goodattenuation

• FIR performsbetter

x = Attenuation atpartial frequencies

FIR

IIR

Page 16: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 16

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

Application #3: Residual Signal ExtractionApplication #3: Residual Signal Extraction

B2 filtered once B2 filtered twice

Original tone Filtered

Page 17: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 17

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

ConclusionsConclusions• Filtering-based analysis tool for inharmonic musical

tones was presented• FIR filter designed by frequency sampling and an

IIR filter by Abel and Smith (DAFx-06) were used toimplement frequency-dependent delay in ICF

• Provides a simple and efficient way to cancel andselect partials from piano tones

Page 18: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

Heidi-Maria Lehtonen 18

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008

ReferencesReferencesBensa, J., S. Bilbao, R. Kronland-Martinet, J. O. Smith III, and T. Voinier, Computational

modeling of stiff piano strings using digital waveguides and finite differences, ActaAcust. united Acust., vol. 91, pp. 289-298, 2005.

Fletcher, H., E. D. Blackham, and R. Stratton, Quality of piano tones, J. Acoust. Soc. Am.,vol. 34, no. 6, pp. 749-761, 1962.

Lehtonen, H.-M., V. Välimäki, and T. I. Laakso, Canceling and selecting partials frommusical tones using fractional-delay filters, Computer Music J., vol. 32, no. 2,2007.

Rauhala, J. and V. Välimäki, Tunable dispersion filter design for piano synthesis, IEEESignal Process. Lett., vol. 13, no. 5, pp. 253-256, 2006.

Rocchesso, D. and F. Scalcon, Accurate dispersion simulation for piano strings, in Proc.Nordic Acoustical Meeting, Helsinki, Finland, June 1996, pp. 407-414.

Testa, I., G. Evangelista, and S. Cavaliere, Physically inspired models for the synthesis ofstiff strings with dispersive waveguides, EURASIP J. Appl. Signal Process., vol.2004, no. 7, pp. 964-977, 2004.

Välimäki, V., M. Ilmoniemi, and M. Huotilainen, Decomposition and modification ofmusical instrument sounds using a fractional delay allpass filter, in Proc. NordicSignal Processing Symp., Espoo, Finland, June 2004, pp. 208-211.

Välimäki, V., H.-M. Lehtonen, andT. I. Laakso, Musical signal analysis using thefractional-delay inverse comb filters, in Proc. Int. Conf. Digital Audio Effects(DAFx-07), Bordeaux, France, September 2007, pp. 261-268.

Page 19: Analysis of Piano Tones Using an Inharmonic Inverse Comb ...legacy.spa.aalto.fi/dafx08/papers/dafx08_59/slides_333.pdf · •Piano tones are inharmonic! •Inharmonicity is caused

19

11th International 11th International Conference Conference ononDigital Audio Digital Audio EffectsEffectsSeptember September 1-4, 2008, Espoo, Finland1-4, 2008, Espoo, Finland

September 4, 2008 Heidi-Maria Lehtonen

Analysis of Piano Tones Using anAnalysis of Piano Tones Using anInharmonic Inverse Comb FilterInharmonic Inverse Comb Filter

Heidi-Maria Lehtonen

Helsinki University of Technology (TKK)Department of Signal Processing and Acoustics

Espoo, Finland