INTRODUCTION TO COMPUTER MUSIC PHYSICAL MODELS. Professor of Computer Science, Art, and Music. Copyright by Roger B.

Similar documents
INTRODUCTION TO COMPUTER MUSIC SAMPLING SYNTHESIS AND FILTERS. Professor of Computer Science, Art, and Music

Lecture 2: Acoustics

THE BEATING EQUALIZER AND ITS APPLICATION TO THE SYNTHESIS AND MODIFICATION OF PIANO TONES

Dept. of Computer Science, University of Copenhagen Universitetsparken 1, DK-2100 Copenhagen Ø, Denmark

INTRODUCTION TO COMPUTER MUSIC. Roger B. Dannenberg Professor of Computer Science, Art, and Music. Copyright by Roger B.

Direction-Dependent Physical Modeling of Musical Instruments

Sound Synthesis Methods

Music: Sound that follows a regular pattern; a mixture of frequencies which have a clear mathematical relationship between them.

Interpolation Error in Waveform Table Lookup

Flanger. Fractional Delay using Linear Interpolation. Flange Comb Filter Parameters. Music 206: Delay and Digital Filters II

Music. Sound Part II

Sound, acoustics Slides based on: Rossing, The science of sound, 1990.

YAMAHA. Modifying Preset Voices. IlU FD/D SUPPLEMENTAL BOOKLET DIGITAL PROGRAMMABLE ALGORITHM SYNTHESIZER

PHY-2464 Physical Basis of Music

Digitalising sound. Sound Design for Moving Images. Overview of the audio digital recording and playback chain

Computer Audio. An Overview. (Material freely adapted from sources far too numerous to mention )

TURN2ON BLACKPOLE STATION POLYPHONIC SYNTHESIZER MANUAL. version device by Turn2on Software

INHARMONIC DISPERSION TUNABLE COMB FILTER DESIGN USING MODIFIED IIR BAND PASS TRANSFER FUNCTION

A Parametric Model for Spectral Sound Synthesis of Musical Sounds

Musical Acoustics, C. Bertulani. Musical Acoustics. Lecture 14 Timbre / Tone quality II

Physics-Based Sound Synthesis

WARPED FILTER DESIGN FOR THE BODY MODELING AND SOUND SYNTHESIS OF STRING INSTRUMENTS

1. Introduction. 2. Digital waveguide modelling

Chapter 18. Superposition and Standing Waves

CS 591 S1 Midterm Exam

Final Exam Study Guide: Introduction to Computer Music Course Staff April 24, 2015

Copyright 2009 Pearson Education, Inc.

Preview. Sound Section 1. Section 1 Sound Waves. Section 2 Sound Intensity and Resonance. Section 3 Harmonics

Modeling of Tension Modulation Nonlinearity in Plucked Strings

Many powerful new options were added to the MetaSynth instrument architecture in version 5.0.

Impact of String Stiffness on Virtual Bowed Strings

Exploring Haptics in Digital Waveguide Instruments

A-110 VCO. 1. Introduction. doepfer System A VCO A-110. Module A-110 (VCO) is a voltage-controlled oscillator.

FX Basics. Filtering STOMPBOX DESIGN WORKSHOP. Esteban Maestre. CCRMA - Stanford University August 2013

FIR/Convolution. Visulalizing the convolution sum. Convolution

Analog/Digital Guitar Synthesizer. Erin Browning Matthew Mohn Michael Senejoa

v 0s F S Delay Delay H Delay

4.5 Fractional Delay Operations with Allpass Filters

APPENDIX. MIDI Controller List. MIDI Controller List

Whole geometry Finite-Difference modeling of the violin

Contents. 1. Introduction Bank M Program Structure Parameters

Synthesis Techniques. Juan P Bello

TIME DOMAIN ATTACK AND RELEASE MODELING Applied to Spectral Domain Sound Synthesis

MUMT618 - Final Report Litterature Review on Guitar Body Modeling Techniques

Math and Music: Understanding Pitch

ANALYSIS OF PIANO TONES USING AN INHARMONIC INVERSE COMB FILTER

Q106 Oscillator. Controls and Connectors. Jun 2014

NOZORI 84 modules documentation

Realtime audio on mobile devices

12HP. Frequency Modulation, signal input and depth control scaled in V/octave.

Semi-modular audio controlled analog synthesizer

INSTRUMENTS OF THE ORCHESTRA

Sound & Music. how musical notes are produced and perceived. calculate the frequency of the pitch produced by a string or pipe

Frequency-Response Masking FIR Filters

Waves and Modes. Part I. Standing Waves. A. Modes

Waveshaping Synthesis. Indexing. Waveshaper. CMPT 468: Waveshaping Synthesis

Sound Modeling from the Analysis of Real Sounds

Piecewise Linear Circuits

the blooo VST Software Synthesizer Version by Björn Full Bucket Music

Operational Amplifiers

PHYSICS AND THE GUITAR JORDY NETZEL LAKEHEAD UNIVERSITY

Quick Start. Overview Blamsoft, Inc. All rights reserved.

Player s Guide. Contents. Imitations Flute...6 Cello...6 Horn...6 Harmonica...6 Energy Slide...6 Distortion Pick...6

Resonant Self-Destruction

Resonator Factoring. Julius Smith and Nelson Lee

The Physics of Musical Instruments

Physics in Entertainment and the Arts

2. When is an overtone harmonic? a. never c. when it is an integer multiple of the fundamental frequency b. always d.

Interference of sound waves. Sound II. Interference due to path difference. Noise canceling headphones. Interference. Interference

Sound Interference and Resonance: Standing Waves in Air Columns

A NONLINEAR SECOND-ORDER DIGITAL OSCILLATOR FOR VIRTUAL ACOUSTIC FEEDBACK

Principles of Musical Acoustics

A Musical Controller Based on the Cicada s Efficient Buckling Mechanism

Sound synthesis and physical modeling

Musical Instrument of Multiple Methods of Excitation (MIMME)

DREAM DSP LIBRARY. All images property of DREAM.

Modelling and Synthesis of Violin Vibrato Tones

An Effective Model of BucketBrigade Device-Based Audio. Circuits. Colin Raffel CCRMA DSP Seminar May 7th, 2010

the blooo VST Software Synthesizer Version by Björn Full Bucket Music

Creating a Virtual Cello Music 421 Final Project. Peder Larson

Perceptual Study of Decay Parameters in Plucked String Synthesis

FIR/Convolution. Visulalizing the convolution sum. Frequency-Domain (Fast) Convolution

SECTION 7: FREQUENCY DOMAIN ANALYSIS. MAE 3401 Modeling and Simulation

Spectrum. Additive Synthesis. Additive Synthesis Caveat. Music 270a: Modulation

Music 270a: Modulation

VK-1 Viking Synthesizer

constructive interference results when destructive interference results when two special interference patterns are the and the

CMPT 468: Delay Effects

SETUP I: CORD. Continuous Systems

Acoustic Resonance Lab

Real-time Computer Modeling of Woodwind Instruments

ABC Math Student Copy

Falcon Singles - Oud for Falcon

Modeling of the part-pedaling effect in the piano

L 23 Vibrations and Waves [3]

Chapter PREPTEST: SHM & WAVE PROPERTIES

A DSP IMPLEMENTED DIGITAL FM MULTIPLEXING SYSTEM

MAGNITUDE-COMPLEMENTARY FILTERS FOR DYNAMIC EQUALIZATION

Chapter 5: Music Synthesis Technologies

SUGGESTED ACTIVITIES

Transcription:

INTRODUCTION TO COMPUTER MUSIC PHYSICAL MODELS Roger B. Dannenberg Professor of Computer Science, Art, and Music Copyright 2002-2013 by Roger B. Dannenberg 1 Introduction Many kinds of synthesis: Mathematical functions (FM, Additive) Sampling Source/Filter models None model complexities of physical systems When aspects of physical systems defy analysis, we can resort to simulation Even simulation is selective, incomplete Key is to model the interesting aspects while keeping the simulation computation tractable Copyright 2002-2013 by Roger B. Dannenberg 2 1

Mass-Spring Model of a String Restoring Force Expensive to compute But computers are fast Discrete time simulation is mostly multiplies and adds Number of modes (partials) corresponds to number of masses. Can add stiffness and other interesting properties Copyright 2002-2013 by Roger B. Dannenberg 3 A Variation Karplus-Strong Plucked String Algorithm Fill table with noise or initial conditions Perform table-lookup oscillator on noise Phase-increment = 1 Average adjacent samples as they are read Averaging adjacent samples is a low-pass filter Averaging causes global exponential decay Very efficient simulation of string behavior Copyright 2002-2013 by Roger B. Dannenberg 4 2

Karplus-Strong (2) http://music.columbia.edu/cmc/ musicandcomputers/ chapter4/04_09.php Copyright 2002-2013 by Roger B. Dannenberg 5 Improving Karplus-Strong Problem: integer table lengths Solution: all-pass filter with fractional delay Problem: changing string length Solution: interpolate all-pass filter Problem: controlling decay, loss Solution: use different filter (than averaging) Copyright 2002-2013 by Roger B. Dannenberg 6 3

Mechanical Oscillator http://www.phys.unsw.edu.au/jw/bows.html Copyright 2002-2013 by Roger B. Dannenberg 7 Waveguide Model Introduced by Julius Smith Wave propagation modeled by delay Left-going and right-going waves are separate Physical variable (amplitude or flow) is sum of corresponding values in two delay lines Copyright 2002-2013 by Roger B. Dannenberg 8 4

Lumped Filters Real systems (transmission lines, strings, air columns) exhibit continuous, distributed losses Length (therefore period) can be frequencydependent Can model losses within waveguide: Or, lump losses at the end for efficiency: Copyright 2002-2013 by Roger B. Dannenberg 9 McIntyre, Woodhouse (1979), + Schumacher (1983) Physicists trying to understand the nature of oscillation in acoustical instruments Model: -line loop of one period Low-pass filter modeling losses over one loop Non-linear element to generate oscillation Copyright 2002-2013 by Roger B. Dannenberg 10 5

Smith: Efficient Reed-Bore and Bow- String Mechanisms (ICMC 86) Pm/2 + P - b HP ρ P + Δ/2 P + b + + LP Mouth Reed Bore Bell Pm/2 = mouth pressure, ρ(p + Δ/2) = reflection coefficient (lookup table) Copyright 2002-2013 by Roger B. Dannenberg 11 Bowed String Model ρ Vb + + ρ Bridge Bridge/ Body + Nut String Bow String Bridge Body Here, delays contain velocity rather than pressure Copyright 2002-2013 by Roger B. Dannenberg 12 6

Non-linear Oscillation Apply pressure biases reed to negative resistance High pressure front to bell, reflects as negated front Negated front returns and reflects again (no sign inversion because mouthpiece is approximately closed, not open) Negative pressure zone is left behind Reflection from open end again brings return-tozero wave traveling back to mouthpiece Positive traveling wave reaches mouthpiece and starts second period of oscillation Pm/2 ρ + + P - b P + b LP HP Copyright 2002-2013 by Roger B. Dannenberg 13 Non-linear Oscillation There are losses, so we need to feed energy in When pressure drop reflects from mouthpiece, mouthpiece switches from high to low pressure Reed changes from open to closed Closing increases reflection coefficient and amplifies reflection (with maximum gain of 1) Also shuts off pressure coming from mouth potential gain is greater than 1. Pm/2 ρ + + P - b P + b LP HP Copyright 2002-2013 by Roger B. Dannenberg 14 7

Non-linear Oscillation With rising pressure at mouthpiece, Reflection coefficient falls with opening of reed Attenuates reflection coefficient, but Increases pressure let in from mouth Positive wave reflection is Boosted when below a certain level Attenuated when above a certain level Negative wave reflection is limited by shutting of reed Dynamic equilibrium is established Pm/2 ρ + + P - b P + b LP HP Copyright 2002-2013 by Roger B. Dannenberg 15 Flute Physical Model Bore 0.55 LP HP Copyright 2002-2013 by Roger B. Dannenberg 16 8

Detailed Diagram Copyright 2002-2013 by Roger B. Dannenberg 17 Physical Models in Nyquist (pluck pitch [dur] [final-amp]) Variations on STK clarinet model: (clarinet step breath-env) (clarinet-freq step breath-env freq-env) (clarinet-all step breath-env freq-env vibrato-freq vibrato-gain reed-stiffness noise) Variations on STK saxophony model: (sax step breath-env) (sax-freq step breath-env freq-env) (sax-all step breath-env freq-env vibrato-freq vibrato-gain reed-stiffness noise blow-pos reedtable-offset) Copyright 2002-2013 by Roger B. Dannenberg 18 9

More Physical Models in Nyquist See manual for more. Copyright 2002-2013 by Roger B. Dannenberg 19 MORE PHYSICAL MODELS Commuted Synthesis Electric Guitar Model Analysis 2D Waveguide Mesh Copyright 2002-2013 by Roger B. Dannenberg 20 10

Commuted Synthesis Bodies and resonances are a problem for strings, guitars, and others Consider a single strike/pluck/hammer: String Model Body Model But string and body are linear filters: Body Model String Model Copyright 2002-2013 by Roger B. Dannenberg 21 Commuted Synthesis Bodies and resonances are a problem for strings, guitars, and others Consider a single strike/pluck/hammer: String Model Body Model But string and body are linear filters: Body Model String Model Copyright 2002-2013 by Roger B. Dannenberg 22 11

Commuted Synthesis So, drive the string with impulse response of body When bow slips on string, it generates a sort of impulse At every bow slip, insert body impulse response into string model Good model for piano synthesis, where driving force is simple (hammer hitting string) body is complex (sound board) Copyright 2002-2013 by Roger B. Dannenberg 23 Electric Guitar (Charles R. Sullivan) Extending Karplus Strong Low-pass filter Determines decay rate Would like to control it at different frequencies FIR filter: y n = a 0 x n + a 1 x n-1 + a 2 x n-2 Problem: potentially has gain >= 1 at zero Hz (DC) Copyright 2002-2013 by Roger B. Dannenberg 24 12

Loop Filter Design To eliminate DC, add high-pass filter: y n = a 0 x n + a 1 x n-1 + b 1 y n-1 Need to provide continuous tuning: Simple linear interpolation y n = c 0 x n + c 1 x n-1 But this also produces attenuation (low-pass filter) So adjust loop filter (FIR) to provide only the additional attenuation required Might require compensating boost at higher frequencies Don t boost, sometimes higher frequencies will suffer Copyright 2002-2013 by Roger B. Dannenberg 25 Tuning and Glissandi Use interpolation to control sub-sample length To glissando, slowly change c 0, c 1 When one reaches 1, you can change the delay length by 1, flip c 0, c 1, and no glitch Need to change loop FIR filter when c 0, c 1 change Change every sample? Expensive Change at control rate, e.g. 1000Hz? creates artifact Solution: change once per period so artifacts generate harmonics that are masked by string harmonics Copyright 2002-2013 by Roger B. Dannenberg 26 13

Distortion Single note distortion just adds harmonics But: distortion of a sum of notes is not the sum of distorted notes Copyright 2002-2013 by Roger B. Dannenberg 27 Soft Clipping Function F(x) = 2/3 x 1 x x 3 /3-1 < x < 1-2/3 x -1 Copyright 2002-2013 by Roger B. Dannenberg 28 14

3/20/15 Feedback Output can be pre- or post- distortion Will favor pitches and harmonics whose period matches feedback delay Possible to control exact onset and frequency of feedback Copyright 2002-2013 by Roger B. Dannenberg 29 Pickup Position Deriving output from a different point in the delay has little effect on the output. Similar system, viewed as right-going and left-going waves on a string. Copyright 2002-2013 by Roger B. Dannenberg 30 15

Pickup Position Copyright 2002-2013 by Roger B. Dannenberg 31 Initializing the String Copyright 2002-2013 by Roger B. Dannenberg 32 16

3/20/15 Additional Features Guitar body resonances Coloration and distortion of guitar amps Effects processors: Distortion Wah-wah pedals Chorus Reference: Charles R. Sullivan, Extending the Karplus- Strong Algorithm to Synthesize Electric Guitar Timbres with Distortion and Feedback. Computer Music Journal, Vol. 14, No. 3, Fall 1990. Copyright 2002-2013 by Roger B. Dannenberg 33 Analysis Example Estimation of loop filter based on decay of harmonics Exponential decay à straight lines on db scale Slope relates to filter response Filter is fitted to measured data Copyright 2002-2013 by Roger B. Dannenberg 34 17

3/20/15 Driving force In this model, after fitting filter to string recording, Inverse filter to obtain residual; Use residual to drive the string model to get realistic sound. Source: Karjalainen, Valimaki, and Janosy. Towards HighQuality Sound Synthesis of the Guitar and String Instruments in Proc. ICMC 1993. Copyright 2002-2013 by Roger B. Dannenberg 35 2-D Digital Waveguide Mesh From: Van Duyne and Smith, Physical Modeling with the 2-D Digital Waveguide Mesh, in Proc. ICMC 1993. Copyright 2002-2013 by Roger B. Dannenberg 36 18

Summary Bore or String modeled using delay Losses are lumped into a filter that closes the loop Non-linear element models driving force and generates oscillation Digital Waveguide offers efficient implementation separates left- and right-going waves into 2 delays. Copyright 2002-2013 by Roger B. Dannenberg 37 Advantages of Physical Modeling Non-linear and chaotic elements of instrument tend to arise naturally from models Models have relatively small set of controls Controls tend to be meaningful, intuitive Models tend to be modular, e.g. easy to add coupling between strings, refined loop filter, etc. to get better quality Copyright 2002-2013 by Roger B. Dannenberg 38 19

Disadvantages of Physical Models Real 3D world resists simplification Example: violin body is very complex and perceptually important Control is difficult: Real instruments require great skill and practice Cannot invert to determine control required for a desired sound Computation is very high when simplifications break down Copyright 2002-2013 by Roger B. Dannenberg 39 20