Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Force-Pulse Filter Design

The design of the filters whose impulse response approximates a correct force pulse will be addressed in this section.

Assume we are given a desired hammer-string interaction force for each key and for each key velocity which looks qualitatively as in Fig. 5.1. Such a curve can be computed, for example, using a nonlinear model of the hammer-string interaction [493].

There are two basic types of filter design problem we consider: (1) Design a single filter whose input is a series of interaction impulses (three of them in the example figure) and whose output is the desired force curve, or (2) somehow separate the individual force pulses in the force curve and design a separate filter whose impulse response gives each desired pulse shape.

Consider the dual of this problem. That is, suppose the desired force curve were a desired spectrum rather than a desired time trace. In that case, the ``interaction impulses'' would be sinusoidal peaks, and their parameters would be amplitude and frequency instead of amplitude and arrival time. The ``spreading'' of peaks in spectrum analysis is caused by some kind of modulation which causes it to deviate from a pure sinusoid. Examples include (1) a window function (tapering) in the time domain, and (2) exponential decay of each sinusoid. The window function in case (1) can be obtained by performing an inverse fast-Fourier transform (FFT) and computing the amplitude envelope of the result. This assumes the same window was applied to each sinusoid. In case (2), separate time-constants of decay can be computed for each sinusoidal component using Prony's method, the matrix pencil method, or any of the many methods proposed for estimating the parameters of a superposition of exponentially decaying sinusoids. Such methods provide peak amplitudes and frequencies as well as the bandwidth (decay time) of each peak.

Coming back to the original problem, we have obtained candidate solutions to the two filter design problems posed: (1) Perform an FFT on the desired force curve and use the spectral-magnitude envelope of the result as the desired amplitude-response of a single, shared filter, or (2) find the peaks, arrival times, and ``roll-offs'' using any method for estimating sums of decaying sinusoids, but applied to the desired force curve in place of a spectrum.

Since the peaks in the force curve are better resolved at high hammer velocities, the filters designed for the higher impact velocities can be used as a starting point for the design of the filters at the lower impact velocities. In fact, it may suffice to merely optimize a gain and damping parameter at each new lower velocity, since the peak locations should not move very much as hammer velocity is reduced at a given piano key.

Another technique for designing a single, shared filter is (1) locating the peaks of this curve and assigning impulses to each one, and (2) using a system identification technique [268,157,404] to identify a single filter which minimizes some measure of error, such as the sum of squared errors at each time sample.

Another approach to designing separate filters is to separate the overlapping force pulses into non-overlapping pulses which add together to produce the desired result.

An optimal approach to designing separate filters is to optimize the coefficients of all the filters at the same time, driving the optimization with the difference between the total desired force curve and the sum of the filter outputs in response to their input impulses (which may be located in time and amplitude as in the previous case, or the amplitudes and locations of the interaction impulses can be optimized also). This approach apparently requires custom filter design software to be written.

After all filters have been designed for all keys and all velocities, suppose each filter coefficient has been recorded in a $ 88$ by $ 127$ table of value versus key number and MIDI velocity. It should be observed that there is little variation in the filter coefficients as a function of either key number or velocity. This implies the possibility of storing only a few values for each coefficient and linearly interpolating in between.


Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[How to cite and copy this work] 
``Physical Audio Signal Processing for Virtual Musical Instruments and Digital Audio Effects'', by Julius O. Smith III, (December 2005 Edition).
Copyright © 2006-07-01 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]