numerical simulations of piano strings

Upload: mihai-dinca

Post on 03-Jun-2018

248 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Numerical Simulations of Piano Strings

    1/7

    Numerical simulations of piano strings. I. A physical modelfor a struck string using finite difference methodsAntoineChaigneSignalDepartment,CNRS UIL4 820, Telecom aris,46 rue Barrault, 75634ParisCedex13, FranceAnders AskenfeltDepartmentof SpeechCommunication nd Music Acoustics; oyal Institute of TechnologyKTH),P.O. Box 700 14, S-100 44 Stockholm, Sweden(Received8 March 1993;accepted or publication26 October 1993)The first attempt to generatemusicalsoundsby solving he equations f vibratingstringsbymeansof finitedifferencemethods FDM) wasmadeby Hiller and Ruiz [J. Audio Eng. Soc.19,462472 (1971)]. It is shownhere how this numericalapproachand the underlyingphysicalmodelcan be improved n order to simulate he motionof the piano stringwith a high degreeof realism.Starting rom the fundamental quations f a damped,stiff string nteractingwith anonlinear hammer, a numerical finite differencescheme s derived, from which the time historiesof stringdisplacementnd velocity or eachpointof the stringare computedn the timedomain.The interacting orcebetweenhammerand string,as well as the forceactingon the bridge,aregivenby the samescheme. he performance f the model s illustratedby a few examples fsimulated string waveforms. A brief discussionof the aspectsof numerical stability anddispersionwith reference o the properchoiceof samplingparameterss also ncluded.PACS numbers: 43.75.Mn

    LIST OF SYMBOLS

    all(t)bl b3c =Ef(x,Xo,t)flLFs(t)F/(t)g( x,Xo)iKLMs=pLMrMr/Ms

    coefficientsn the discretewave equationhammer accelerationdampingcoefficientstransversewave velocityof stringYoung's modulusof stringforce densityfundamental requencysampling requencybridge forcehammer forcespatialwindowspatial ndexcoefficient of hammer stiffnessstring engthstring masshammer masshammer-stringmass atio (HSMR)time index

    NpsTv(x,t)VHOXoy(x,t)a =xo/Lat=l/feAx= L/N/(t)K

    =

    numberof stringsegmentsstiffness onlinearexponentcross-sectional area of the corestring tensiontransverse tring velocityhammer velocityinitial hammer velocity (t = 0)distance f hammer rom agrafietransverse isplacement f stringrelativehammerstrikingposition RHSP)time stepspatialstepstring stiffness arameterhammer displacementradius of gyrationof stringlinear massdensity of stringdecay ratedecay imeangular frequency

    INTRODUCTIONThe vibrationalpropertiesof a musical nstrument--like any other vibrating structurecan be describedby aset of differentialand partial differentialequationsderivedfrom the general awsof physics. ucha set of equations,which define he instrumentwith a higher or lesserdegreeof perfection,s often eferred o as a physicalmodel.Dueto the complexdesign f the traditional nstruments, hich

    in most cases also include a nonlinear excitation mecha-nism, no analytical solutionscan, however,be expected

    from sucha set of equations.Consequently,t is necessaryto use numerical methodswhen testing the validity of aphysicalmodel of a musical nstrument.Once the numerical difficulties have been mastered, a

    simulationof a traditional nstrumentby a physicalmodelmeans hat the influence f step-by-stepariations f sig-nificant designparameters ike string properties,plate res-onances,and others, can be evaluated. Such a systematicresearchmethod could hardly be achievedwhen workingwith real instruments, not even with the assistance ofskilled instrumentmakers. n the future, it is hoped that

    1112 d. Acoust.Soc. Am. 95 (2), February1994 0001-4966/94/95(2)/1112/7/$6.00 1994 Acoustical ocietyof Annefica 1112

  • 8/13/2019 Numerical Simulations of Piano Strings

    2/7

    advancedphysicalmodels,which reproduce he perfor-manceof traditional nstruments ith highfidelity,can beusedas a tool for computer-aided-lutherieCAL).Variousnumericalmethods avebeenused xtensivelyfor manyyears n otherbranches f acoustics,or examplein underwater coustics here he goal s to solve he elas-tic wave quationn a fluid. In musicalcoustics,t is ofgreatvalue o obtaina solutiondirectly n the time domain,since t allowsus to listen to the computedwaveformdi-rectly,and udge he realismof the simulation. mong helarge numberof numerical echniques vailable, inite dif-ferencemethods FDM) are particularlywell suited orsolvingyperbolicquationsn the imedomain.Forsys-tems in one dimension, like the transverse motion of avibrating string, the use of FDM leads to a recurrenceequationhatsimulateshepropagationlonghestring.The generalityof FDM makes t possibleo alsouse hemfor solvingproblems n two and three dimensions. hemain practical imit then is set by the rapidly increasingcomputing ime.Historically,Hiller and Ruiz were he first to solve heequations f the vibratingstringnumerically n order tosimulate usicalounds?hemodel f thepiano tringand hammerusedby thesepioneerswas, however, athercrude n view of the improvementsn pianomodelingoverthe ast wodecades?orexample,hecrucialalue f hecontact duration between hammer and string, in realitybeing a result of the complexhammer-string nteraction,was set beforehand s a known parameter.Someyears ater, Baconand Bowsherdeveloped dis-crete model for the struck string where the hammer wasdefinedy tsmassnd ts nitial elocity.Displacementwaveforms erecomputedor both hammerand stringatthe contactpoint.Their modelcan be regarded sthe firstseriousattempt to achievea realistic descriptionof thehammer-string nteraction n the time domain.However,severaleffectswere not modeled n detail. The dampingwas includedas a single fluid (dashpot) term, and thestiffness f the string was neglected.The model assumedfurther a linear compressionaw of the felt. From a nu-mericalpoint of view, no attemptsweremade o investigatestability,dispersion, nd accuracyproblems.More recently,Boutilionmadeuseof finite differencesfor modelinga piano string without stiffness, ssumingnonlinear ompressionaw and the presence f a hysteresisin the felt. He investigated,n particular, the hammer-string nteraction or two notes, n the bassand mid range,respectively.In all three papers mentioned, the numerical velocity,i.e., the ratio between he discretespatialand time steps,was set equal to the physical ransverse elocity of thestring. It has been shown hat this particularchoice spossible or an ideal string only, and that the numericalscheme becomesunstable if stiffness,or nonlinear effectsdue o largevibrationamplitudes, re taken nto account nthe model.

    At about he same ime, Suzukipresented n alterna-tive for simulating he motionof hammerand string,usinga string model with lumped elements truck by a hammer

    with a nonlinearcompression haracteristic.He investi-gated, n particular,somedetailsof the hammer-stringinteraction, nd the efficiencyn the energy ransmissionfrom hammer o string.The effectof string nharmonicitywas taken nto account n a simplifiedmannerby slightlymodifyinghevaluesf the umpedtring ompliances?In a recentpaper,Hall madeuseof anotherapproachfor simulating stiffstringexcitedby a nonlinearhammer,which he named a standing-wavemodel. His method canbe regarded s a seminumericalpproach, ince t partiallymakesuse of analyticalresults.By this method, he inves-tigatedsystematicallyhe effects f stepby stepvariationsof hammer nonlinearityand stiffness arameters, mongotherhings?In comparison with the earlier studies mentionedabove, he presentmodelhas he featureof a detailedmod-eling of the piano stringand hammer as closelyas possibleto the basicphysical elations:Our model s entirelybasedon finite difference pproximations f the continuous qua-tions or the transverse ibrationsof a dampedstiff stringstruckby a nonlinearhammer.The blow of the hammer srepresentedy a forcedensity erm in the waveequation,distributed n time and space,and the damping s fre-quencydependent.The presentations organized s follows. n Sec. , thecontinuousmodel for the dampedstiff string is briefly re-viewed,with regard o the waveequation,and to the equa-tions governing he hammer-string nteraction. n Sec. f,it is shownhow this heoretical ackground an beput intoa discrete orm for time-domainsimulations.Some mpor-tant aspectsof numerical stability, dispersion, nd accu-racyarebrieflydiscussedere, n particular he selection fthe appropriate umberN of spatialsteps s a functionofthe fundamental requency of the string, for a givensamplingrequency. A detailed reatment f the numer-ical aspects an be found in a previouspaper by the firstauthor.In Sec.II, thestructuref hecomputerrogramis presented, nd a few examples f the capabilities f themodel or representinghe wavepropagation n the stringare given.A thorough evaluation of the model by systematiccomparisons etweensimulated nd measuredwaveformsand spectrawas left as a separate tudy.That work willalso ncludea systematic xploration f the influence f thehammer-stringparameters n the piano tone.I. THEORETICAL BACKGROUNDA. Wave propagation on a damped stiff string

    The presentmodel describes he transversemotion of apiano string in a plane perpendicular o the soundboard.The vibrationsare governedby the followingequation:2-2 oy-- +2b3 ---+f(x,xo,t),

    (1)in which stiffness nd damping terms are included. Thestiffness arameter s given by

    e=(ES/TL2). (2)1113 J. Acoust.Soc. Am.,Vol. 95, No. 2, February 994 A. Chaigne nd A. Askenfelt: imulationsf pianostring 1113

  • 8/13/2019 Numerical Simulations of Piano Strings

    3/7

    It has been shown that this stiffness erm, which is themain causeof dispersionn piano strings,especiallyn thelowest range of the instrument, gives ise to a precursorwhich precedes he main pulses n the string waveform.Possibly it could also affect the perceived attacktransient.0

    The two partial derivatives f odd order with respectto time in Eq. (1) simulatea frequency-dependentecayrate of the form,a= 1/r=b +b3o . (3)As a consequence,he decay imesof the partials n thesimulated ones will decreasewith frequency,as can beobservedn realpianos. It must epointedut hat hissimplifiedormulayieldsa smooth aw of dampingwhichis only a fair approximation f the reality.The constants and b3 n Eq. (3) were derived rom experimental aluesthroughstandard itting procedures, nd it is assumedhattheseempirical aws accountglobally or the lossesn theair and in the stringmaterial,as well as for thosedue to thecoupling o the soundboard.No attempts were made to-ward an accuratemodelingof each ndividualphysicalpro-cess hat causes nergydissipationn the strings. he formof Eq. (3) is particularlyattractiveas t hasbeenshown nprevious tudieshat the time responsef mechanical ys-tems s stableand caual or lawsof dampingnvolvingeven rder olynomialsn frequency.2The model does not include the mechanisms which

    give rise to two differentdecay times in the piano tone,promptound nd aftersound.3Thiseffectsmainlydue to string polarization, differences n horizontal andverticalsoundboard dmittance, nd mistuning within astring triplet.The forcedensity erm f(xXo,t) in Eq. ( 1 representsthe excitationby the hammer. This excitation s limited intime and distributed over a certain width. It is assumedthat the force density erm doesnot propagate long thestring, so that the time and spacedependence an be sep-arated,

    f(x,x o,t) = f l( t)g(x,xo). (4)From a physicalpoint of view, it is clear that the di-

    mensionlesspatialwindowg(x,x o) accountsor the widthof the hammer.Within the contextof numericalanalysis,tis interesting o notice that the use of such a smoothingwindow eliminates the artifacts that occur in the solution(in the form of strongdiscontinuities),when the excitationis concentratedn a singlepoint.The density erm fu(t) is related o the time historyofthe forceFn(t) exertedby the hammeron the stringby thefollowingexpression:

    where he lengthof the stringsegmentnteractingwith thehammer s equal o 28x.

    B. Initial and boundary conditionsFor the struck string, it is now well known that theforce Ft(t) is a result of a nonlinear nteraction processbetweenammerndstring. n ourmodel,hemotion fthe string startsat t=0 as the hammer with velocity VH0makescontactwith the stringat the strikingposition 0. ItisassumedhatF(t) isgiven ya poweraw,Ft.(t) =KI */(t) --Y(Xo,t) P, (6)

    where the displacement /(t) of the hammer head is givenbyMud----=-F(t), (7)

    and where he stiffness arameters and p of the felt arederived rom experimental ata on real piano hammers.The lossesn the felt are neglected.In the computerprogram, he interactionprocess ndswhen the displacement f the hammer head becomes essthan the displacementof the string at the center of thecontactsegment x0). This yields,amongother things, hecontactdurationbetweenhammerand string.The string s assumed o be hingedat both ends,whichcorrespondso the ollowingourboundaryonditions?

    y(O,t) =y(L,t) =0and (8)

    (0,t)=I (L,t)=O.Theseboundaryconditionsdo not correspond trictlyto the string erminationsn real pianos, nd will be recon-sidered in a future work.The continuousmodel of piano stringsdeveloped nthis section orms the basit of our numerical model. Em-

    phasiswill nowbe put on the computational ethods sedfor solving he equations, nd the obtained lgorithmswillbe discussed.

    II. TIME-DOMAIN SIMULATIONSA. String model

    The equationsof motion for the string and hammerpresentedn Sec. are formulated n discrete orm usingstandardexplicit differences chemes entered n space ndtime?Themainvariables the ransversetring isplace-ment y(x,t) which is computed or the discretepositionsxi= i fix, and at discrete ime steps n= n At. Valuesof thehammerposition /(t) are computed,using he same imegrid and the same ncrementAt. In the following, he sim-plified notation,

    y( x,t ) - y( xi,t,) -, y( i,n ), (9)will be used for convenience

    In a secondstage, he velocity and accelerationof thehammer, and of each discretepoint of the string, are de-rived from the correspondingdisplacementvalues bymeans of finite differences centered in time. Finite differ-

    1114 d. Acoust.Soc. Am., VoL 95, No. 2, February1994 A. Chaigneand A. Askenfelt:Simulations f pianostring 1114

  • 8/13/2019 Numerical Simulations of Piano Strings

    4/7

    TABLE . Coefficientsf therecurrencequationor thedampedtiff 1000string.a = [2 - 2r2+ b3/At-6N:r2]/Da3= [r2( +4eN2)]/Das= [-- b3/At]/DwhereD= 1+bAt+2b3/At

    a2= [- 1+bAt+2b3/At]/Da4= [b3/At--and r=cAt/Ax

    ences enteredn space re used or computinghe forcetransferredromonesegmentf the string o its adjacentsegments.hisgives,n particular,he orceFa(t) exertedby the stringon the bridge.The interactionorcebetweenthehammer nd hestrings obtainedn a straightforwardway by putting Eq. (6) into a discrete orm.These numerical schemes lead to convenient recur-renceequations here, or eachpoint , the variableunderexaminationt a future ime step n + 1 is a functionofthe same ariable t the sameposition and at adjacentpositionsi--2,i--l,i+l,i+2) at present nd past timestepsn, n'--1, andn-- 2). The recurrencequationor thetransverse isplacementf a dampedstiff stringcorre-spondingo Eq. (1), is givenbyy(i,n+ 1 =a(i,n) +azv(i,n- 1

    +a3[Y(i+ l,n) + y(i- 1,n) +a4[y(i+ 2,n)+y(i- 2,n) ] +a 5 y(i+ l,n- 1+y(i-- 1,n-- 1 +y(i,n-2) ]+ [At2NFn(n)g(i,o) /Ms, (10)

    where he coefficients to a5 are given n Table .Before tartinghecomputation,n appropriateum-ber (N) of spatialstepsmust be selected. or a standardexplicit inite difference cheme,t hasbeenshown heoret-ically hat thisselections critical or stability nd numer-icaldispersion.In practice,hestabilityonditionro-vides switha maximumumberNmax) f discretetringsegments,i.e., with a minimum egmentengthAXmin)assuminghat the (dimensionless)tiffnessarametere),the undamentalrequencyf) of thestring, nd hesam-pling requencyre) aregiven. hestability ondition'ranbe written as

    Nma={ [ -- 1+ ( 1+ 16e)1/2]/8E}1/2, ( 11where

    y=fo/2f. (12)If thestiffnesss neglectede=0), thenEq. (11) reducesto

    Nmax=y. (13)In additiono these tability equirements,he prob-lem of numericaldispersionmust also be taken into ac-count. t hasbeenshown hat someunwanted ispersiveeffects grid dispersion)may be presentn the solution fan explicit initedifferencechemes used or solvinghestiff tringquation)his umericalispersionhouldot

    1oo

    lO

    (b)(el

    A__1 lO 100 1oo0 10o0oFUNDAMENTALREQUENCYHz)FIG. 1. Maximumnumberof spatialstepsNma as a functionof thefundamentalrequencyt of the string or different alues f the stiffnessparameter.a) e= 10'-8;b) e= 10-6; c) = 10 4.Thesamplingre-quency s f=48 kHz.be confusedwith the intrinsicphysicaldispersion ue tothe stiffnesserm in Eq. (1). As a resultof the grid dis-persion,he eigenfrequenciesf the stringand the inhar-monicityare slightlyunderestimatedor a givenstiffnessparameter.Fortunately, his appliesprimarily to the fre-quency ange ust below he Nyquist requencyre/2). Byusinga sufficientlyigh samplingate so that the stringpartialsnear he Nyquist requency ontainno significantenergy, the effectsof this underestimation an be madeinaudible. urther, n order o limit thedispersionsmuchas possible, shouldbe equal o the highest ossiblente-ger valuewhich s immediatelyower hanNraax.

    Usually, he actualsamplingrequencye, is deter-minedby the audioequipment. herefore,t wasdecidedto select,n thisparticular xperiment, neof the standardvalues32, 44.1,and48 kHz) for theoutput amplingate.Figure 1 showsNm as a functionof the fundamentalfrequencyf) of the string,at a samplingate of fe48kHz for threedifferent aluesof the stiffnessarameter.The threedecadesor f shown n the figurecover herangeof a grandpiano.Notice hat Na is not directlydependenton the string length, but rather on the ratiobetweenhis parameter nd the transverse avevelocity.In practice, he computationwill be madeat a lowersampling ate (say ,= 16 kHz) for noteswith fundamen-tal frequencybelow 100 Hz, in order to limit N to anacceptable alue.The synthesizedignalswill be then in-terpolated y a factor2 or 3 and played ackat a standardsamplingate.At theotherend,oversamplingill benec-essaryor thehighest otes f the nstrumenttypicallyorf greater han 1 kHz, i.e., for note C6 and above),sincetruncation rrorsmay appear n the solution or too smallvaluesof N. In this range, he computations ere madewith a sampling ate of 64 kHz, or even 96 kHz for noteC7, and he signals ereplayed ackafter ow-passilter-ing and decimation.B. Modeling the initial and boundary conditions

    At time t=0 (n----O), he hammer elocitys assumedto be equal to Vn0, and its displacementnd the force1115 J.Acoust.oc. m., ol. 5,No. , February.994 A.ChaignendA.Askenfelt:imulationsfpianotring1115

  • 8/13/2019 Numerical Simulations of Piano Strings

    5/7

    exertedon the stringare takenequal o zero.For the sakeof simplicity,only the simplest ase,where the string sassumedo be at restat the originof time, will be presentedbelow. Note, however, hat the model can handle any ini-tial condition.With the string at rest at t=0,y(i,0) =0. (14)At time t=At (n=l), the hammer displacement s

    given bya7(1)= Vm0At. (15)At that time, Eq. (10) generally annotbe used orcomputinghe stringdisplacement,ince our time stepsare involved n the general ecurrence quation.One solu-tion, however, onsistsn assuminghat the string s at restfor the first three ime steps.Another echnique sedhereisto estimate(i,1 by heapproximatedaylor eries:y(i, 1 = [y(i+ 1,0) +y(i-- 1,0) 1/2. (16)Thus the force exertedby the hammer on the string

    becomesF(1) =K I/(1)--y(i0,1)I p. (17)This enables s to compute first estimate f the dis-placement(i,2). In order o limit the time and space e-pendenceor n =2, a simplified ersion fEq. (10) is used,where he stiffnessnd damping ermsare neglected. hisyieldsy(i,2) =y(i- 1,1 +y(i+ 1,1 --y(i,O)

    + [ AI2NFn( g(i, o) /Ms. (18)Similarly, he hammerdisplacement/(2) is givenby(2)=2(I)--i(O)--[At2Fn(1)]/Mn, (19)

    and the hammer force is now written asFn(2) =K 1(2) --y(i0,2)I p. (20)At this stage,one may ask if it is fully justified ocompute he displacementsn Eqs. (18) and (19) at timen=2 using he valueof the forceat time n = 1, i.e., with atimedelayequal o At. This follows rom the mplicit orm

    of Eq. (20), which equireshevalues f thedisplacementsin order to compute he hammer orce.Normally, he effects f this approximation anbe ne-glected, rovidedhat thesamplingrequencys sufficientlyhigh. n that case,only the high-frequencyontentof thesynthesized ignal will be affectedby the delay, and theinfluenceon the computationswill be small. An accurateestimation of the effect can be obtained by iterating theprocedure escribedbove, nd calculating second sti-mateof the displacementssingEq. (20), which n tu nleads to a more accurate estimate of the hammer force.This procedureanbe repeated ntil no significantiffer-ences between successive esults are observed. In our sim-ulations, he algorithmconvergedapidly,and the differ-ences between the first and second estimates fordisplacementsnd forceswerenevergreater han 1% in

    0.5VVVVVVVVvlvvvvvvvv -1Z 0 10 20 30 ms

    40 50 60

    FIG. 2. Illustrationof a repetitionof a note showingcomputed tringdisplacementat 40 mm from the hammer,bridgeside). First blow ofhammerat t=0 with string nitially at rest, ollowed y a repeated lowat t= 32 ms with string n motion.

    the worst cases. t was thereforedecided o calculateonlythe first estimate of the variables, in order to limit thecomputationalime.Once the valuesof the displacementsre known forthe first hree ime steps,t is possibleo startusing hegeneral ecurrenceormula given n Eq. (10), where hefuture displacement(i,n+ 1 is computed ssuminghatthe presentorceFn(n) is known.The hammer eaveshestringwhen

    (n+ 1) (y(io,n+ 1), (21)after which ime the string s left to freevibrations.n thiscase,Eq. (10) still applies, ut the force erm is tempo-rarily removed.By furthercomparisonsf stringandham-mer displacements,he possibilityof hammer recontactcan be taken into account. This latter feature has beenobservedhowever only for the low bassstrings.An attractive feature of the method is that there is noneed o assumehat the string nitially is at rest.The forcedensityerm (x,xo,t) canbe ntroducedt any ime n thewaveequation,whatever he vibrational tateof the string.Thus the model makes t possible o simulate not onlyisolated ones,but also a musical ragmentwith realistictransitionsbetweennotes (see Fig. 2). In this case, re-peatednotesare obtainedby re-initializing he hammerposition o zero beforestriking he movingstring.Thisfeature s not available n today'scommercialsynthesizers.As for the boundaryconditions,he numericalexpres-sionscorrespondingo hingedendscase n Eq. (8) arestraightforward nd yield:

    y(0,n)=0 and y(N,n)=O, (22)y(- 1,n) = --y(1,n) and (23)y(N+ 1,n) = --y(N-- 1,n).If the load of the soundboardat i=N is modeled by afrequency-dependentdmittance, hen the secondcondi-tion in Eq. (23) can conveniently e replaced y the dis-crete form of the appropriatedifferentialequation.Thisrefinementhas already been successfully pplied to theguitar?The conditions iven n Eq. (23) are important orderivingspecificecurrence quationsor the points = 1and i=N--1 which are close to the string terminations.Due to the stiffnesserm, Eq. (1) is of the fourth-order n

    1116 d. Acoust. oc.Am.,Vol.95, No.2, February994 A. Chaigne ndA. Askenfelt:imulationsf piano tring 1116

  • 8/13/2019 Numerical Simulations of Piano Strings

    6/7

    STRING, BRIDGE SIDE1

    0

    -15 ms 10

    -35 ms 10

    STRING, AGRAFFE SIDE1

    o / k -i

    0 5 ms 10:3 d)l-3

    5 ms 10

    STRING, STRIKING POINT

    0

    -1 0 5 ms 103

    -30 5 ms 10

    HAMMER FORCE2O

    10

    00 6 ms 10

    FORCE AT THE BRIDGE5

    o / .-50 ms 10

    FIG. 3. Computed aveformsor pianostringC4 at four positions.String,bridge ide a) stringdisplacementat 40 mm tomhehammer),(b) stringvelocity.String,agrafieside (c) stringdisplacementat 40mm from the hammer); d) stringvelocity. trikingpoint (e) stringdisplacement,f) stringvelocity. g) hammer orce.Bridge h) forcetransmitted o the bridge.

    space, nd hus he recurrencequationor the point willdependon the vibrationalstate of points --2 to i+2.Therefore, t is necessaryo know the valuesof the dis-placements( -- 1,n) andy(N+ 1,n) in order o computethe solution t i= 1 and i=N-1, respectively.ecausei= - 1 and =N+ 1 donotbelongo the physical tring,Eq. (23) must be used or replacing (- 1,n) and y(N+ 1,n) by expressionsnvolvingonly the valuesof the dis-placementsor i within he interval 0,N].Ill. STRUCTURE AND PERFORMANCE OF THECOMPUTER PROGRAM

    The simulationprogram is written in Turbo-Pascal,and runson a 80486basedPersonal omputerDEC sta-tion 425 PC677-A3.At a clockspeed f 25 MHz, it takesabout100s to obtain1 s of sound t a samplingrequencyof 32 kHz, with the stringdivided nto N= 100 spatialsteps.This value s a typicalorder of magnitudeor thecomputingime, although t may vary slightly rom onestring to the other.The main part of the programholds he modelof thestringmotion,describedn the previous ection. hispartis linked with data files which contain the values of thehammerand stringparametersctuallyused n the simu-lations.Someof the parameters eremeasuredy the au-thors,while otherswere extracted rom the literature. '15'17The stiffness arameters andp of the hammer elt, and

    STRING VELOCITY

    A H B

    FIG. 4. Simulated elocity rofile f a piano tring C4) during he irst4 msafter heblow.The timestepbetweenuccessivelots s62.5 ts. Thestring erminationsre ndicated y A (agrafie)and B (bridge),and thestriking point by H (hammer).the damping oefficients and b3 of the string,werede-rived from experimental ata by meansof standard urve-fitting procedures.In its standard xecutable ersion, he programstartswith an interactionwith the user, equestinghe samplingfrequencyin kHz), the fundamentalrequencyin Hz),and the durationof the computednote (in s). This enablesthe program o compute he number N) of spatialsteps,usingEqs. ( 11 -(13). This procedures followedby thecomputation f the first hree ime steps n =0 to n=2), asdescribedn the previous ection, singEqs. (14)-(20).Then, he recurrencearametersf thedamped tiffstringgiven n Table I are calculatedonce or all. For n3, theprogramcomputeshe hammer orceF(n), stringdis-placement(i,n), andhammer isplacement,/(n), in par-allel. If the condition n Eq. (21) is met, the force erm isremoved rom the recurrence chemen Eq. (10) beforethe computations roceed.At each ime step, he program anprovide completesetof signals, dding our variables--v(i,n), he stringve-locityat eachpointof the string,FB(n), the forceexertedby the stringon the bridge,vu(n), hammervelocity,andart(n) hammer cceleration--to( i,n , l( n , andF( n ,which are the three principalvariablesn the computa-tions.Examples f waveforms enerated y the model ornote C4 are shown n Fig. 3.A greatadvantage f usinga finitedifferencemethod sthat eachphysical uantity displacement,elocity, orce)is directly vailableor all discrete oints t each imestep.In this way, it becomes traightforwardo plot the stateofthe stringat successivenstants,n order o obtaina viewofthe wavepropagationlong he string.This feature s il-lustratedn Fig. 4, whichshowshe velocity rofileof a C4string during the first 4 ms after the blow of the hammer.

    1117 J.Acoust.oc.Am., ol. 5,No.2, February994 A.ChaignendA.Askenfelt:imulationsfpianotring 1117

  • 8/13/2019 Numerical Simulations of Piano Strings

    7/7

    FIG. 5. Comparison f stringvelocities t the bridgesideof the strikingpoint (40 mm from the hammer), for a mid range note (C4) playedmezzoforte,imulateddashed) ndmeasuredfull line)?

    ment of SpeechCommunication nd Music Acoustics,Royal Institute of Technology (KTH), Stockholm,withfinancialsupport rom Centre National de la RechercheScientifique CNRS). The projectwas further supportedby the SwedishNatural Science esearchCouncil (NFR),the Swedish Council for Research in the Humanities andSocial Sciences (HSFR), the Bank of Sweden Tercente-nary Foundation, and the Wenner-Gren Center Founda-tion.

    In particular, he propagating ave ront and ts reflectionat the bridge can be clearly seen.Similar plots of the wavepropagation n a piano stringhave beenpresented y Su-zuki, however, using a string model with lumpedelements?A detailed est of the model by comparisons etweensimulatedand measuredwaveformswill be the topic of aseparate tudy.An exampleof the strengthof the model sgiven n Fig. 5, which compares tring waveforms or thenote C4. It can be seen hat our model reproduces hecharacteristics f the measuredwaveformconvincingly, s-ing measured alues f stringand hammerparameters. hesmall discrepancies hich can be observed n the actualtiming relations etween he pulses re mostlydue to slightdifferencesn observationpoints.

    IV. CONCLUSIONThe numericalmodelpresentedn this paperhas in-teresting eatures,which allow a simulationof a pianostring very closely to the basic physical relations.The

    method s time efficient, nd the numerical dvantagesndlimitationshavebeen horoughly nvestigated nd are welldocumented. he first examplesand comparisons ithmeasurementsndicate that the model generateswave-forms and spectrawhich closely esemble he signalsob-served n real pianos.Although all details n the designofthe pianostill are not modeled srealistically sdesired inparticular the boundaryconditions),we consider hemodel to be a promising ool for exploring he spaceofstring-hammerparameters nd their influenceon pianotone.

    ACKNOWLEDGMENTSPart of this work was conductedduring Fall 1990,when he firstauthorwasa guest esearchert the Depart-

    R. A. Stephen,Solutionso range-dependentenchmarkroblemsythe finite-difference method, J. Acoust. SOc. Am. 87, 1527-1534(1990).2A. R. Mitchelland D. F. Grifliths,TheFiniteDifference ethodnPartial DifferentialEquationsWiley, New York, 1980).3A. Cbaigne,On theuseof finitedifferencesor musicalynthesis.Application o pluckedstringed nstruments, . d'Acoust.5(2), 181-211 (1992).4L. HillerandP. Ruiz, Synthesizingusicaloundsy solvinghewaveequation or vibratingobjects, . Audio Eng. Soc.19, 462-472(part I) and 542-551 (part II) (1971).See, orexample,hedetailedutorial npiano cousticsy t. Suzukiand I. Nakamura, Acousticsof pianos, Appl. Acoust.30, 147-205(1990).SR.A. Bacon ndJ. M. Bowsher,A discrete odel f a struck tring,Acustica 41, 21-27 (1978).X. Boutilion,Model or pianohammers:xperimentaleterminationand digital simulation, J. Acoust. Soc. Am. 83, 746-754 (1988).8 . Suzuki,Model nalysisf a hammer-stringnteraction, . Acoust.Soc. Am. 82, 1145-1151 (1987).9D. Hall, Piano tring xcitation.I: Nonlinear odeling, . Acoust.SO.Am. 92, 95-105 (1992).1M.PodlesakndA. Lee, Dispersionf wavesn piano trings, .Acoust. $oc. Am. 83, 305-317 (1988).

    ugee, or example,. Meyer ndA. Melka, MessungndDarstellungdes Ausklingverhaltenson Klavieren, Das Musikinstrument 2,1049-1064 (1983).nS. W. HongandC. W. Lee, Frequencynd imedomain nalysisflinear systemswith frequencydependent arameters, . Soundib.127(2), 365-378 (1988).G. Weinreieh,Couplediano trings, . Aeoust. oc.Am.62, 1474-1484 (1977).14N. Fletcher nd T. Rossing, he Physicsf Musical nstruments(Springer-Verlag, ew York, 1991).SD.Hall andA. Askenfelt,Piano tring xcitation.: Spectraor realhammersand strings, J. Acoust. Soc. Am. 83, 1627-1638 (1988).6A. AskenfeltndE. Jansson,From ouch o string ibrations---Theinitial courseof the piano tone, Speech ransmission ab. QuarterlyProgress nd StatusReport,Dept. of Speech ommunicationnd Mu-sicAcoustics, oyal Instituteof Technology, tockholm, TL-QPSR 1,31-109 (1988).7A. Askenfelt nd E. Jansson,From ouch o string ibrations.II:Stringmotionand spectra, . Acoust.Soc.Am. 93, 2181-2198 (1993).

    1118 d. Acoust. oc.Am.,VoL95, No. 2, February 994 A. Chaigne ndA. Askenfelt: imulationsf pianostring 1118