Page  00000001 Examples of Using Amplitude Control Systems in Music Synthesis Timothy Stilson (stilti~ccrma. stanf ord. edu) Harvey Thornburg (harv2 3 c crma. st anf ord. edu) Center for Computer Research in Music and Acoustics Music Department, Stanford University 660 Lomita, Stanford, CA, 94305 Abstract Feedback control systems have been used in the past to keep physical models in tune; similarly, other variables can be controlled, such as amplitude, which is explored in this paper. There can be various interesting behaviors; affecting, for example, stability and attack transient characteristics. Examples are shown for a simple waveguide model. The nonlinearity introduced by amplitude control can also approximate various characteristics of popular nonlinearities, such as saturation. In one example, a control system is applied to a linear Moog-style filter to emulate some saturation effects of the analog filter under high-amplitude conditions. 1 Introduction Certain parameters in physical models can be difficult to control, as they are in the physical instruments they are intended to model. Such parameters can be tuning, loudness, timbre, etc. In traditional music performance, the performer must often be continually adjusting their performance to overcome variations in the instrument over time, temperature, and various playing ranges. In trying to model these instruments for simple controls, such as MIDI, the algorithm designer must either try to remove these variations by adjusting the model according to a priori knowledge of how the instrument will deviate from desired performance (via derived formulae for varying certain parameters across the problematic variations, or by experimental tweaking, placed in a multitude of lookup tables), or they may try to build a dynamic system designed to react to the variations in a way similar to an actual performer. These systems are feedback control systems, and share much in common with more traditional control systems, such as flight control systems, and temperature control systems. The use of a feedback control system to improve a physical model's performance with respect to difficult-to control parameters has been done previously by Perry Cook to control the intonation (among other parameters) in a brass physical [Cook, 1995]. In this paper, we will explore the control of a model's amplitude. This idea can be traced at least back to Michael McNabb, in an unpublished clarinet model [McNabb, 1994]. The control of amplitude can help simplify the algorithm designer's job, because not only can it reduce stability problems inherent in cost-reduced models, but it can assist in the implementation of a more realistic attack phase of the instrument's notes. The amplitude control system is also explored in conjunction with a digital VCF model. Adding correct nonlineaLr behaviors to a digital VCF is difficult without resorting to gross oversampling. This paper describes some experiments done in an attempt to add some effects observed in overdriven analog filters to linear filters, without the bandwidth expansion (and thus aliasing) typically associated with saturation. Possible behaviors that can be modeled include stable self-oscillation and reduced effective gain at resonance, which in analog filters are by-products of a saturation nonlinearity. Since the measurement of a signal's amplitude is a nonlinear operation, the complete system will be nonlinear, even if the underlying controlled system is linear. Furthermore, amplitude control is implemented by varying some coefficient in the controlled system (typically a simple gain), rather than by summing a control signal into

Page  00000002 the input, which would also make the complete system nonlinear. However, since amplitude measurement is usually a slow process (occurring over at least one period of oscillation), the control signal moves slowly, thereby allowing the system to be loosely thought of as locally linear. This allows the system to be understood a little more easily than most nonlinear systems. 2 Waveguide Systems Amplitude control is of particular interest when one tries to produce extremely efficient nonlinear physical models, where absolute physical accuracy has been sacrificed in favor of cheaper computation. A typical problem encountered in working with these models is instability. The mechanisms that self-regulated a model's amplitude can be easily broken while reducing the model's complexity. Additionally, the models were often intentionally made temporarily unstable in attempts to speed up the attacks of the notes, but the instability was not well controlled. Early models often used simple numerical saturation to limit the effects of instability. This worked acceptably only in models which already produced a waveform that was harmonically similar to a clipped signal, such as the clarinet. A side effect was that many models ended up sounding like clarinets after simplification. The work presented here is intended to remove the need for numerical saturation in the handling of unstable models, which should better preserve the timbre of the model. The basic implementation [Stilson, 1996] is to set up a servo system whereby the amplitude of the system is servoed to a desired amplitude level. The control was chosen to be the loop gain (see figure), with which the controller could affect the system's amplitude via control of its stability. Desired Controller Amplitude Env Follow Int Cd Desired -0 Actuator - K z-a loop Measured Figure 1: Diagram of amplitude control of a typical model, along with a typical controller The controller shown is based on the standard PI (Proportional + Integral) controller [Franklin 1994]. The pole a is typically at 1.0, though using smaller values is sometimes useful. This controller has worked in practice, though it is not exactly suited for this system. See [Stilson 1996] for a short discussion of an alternative controller. Figure 2: Example envelopes from an amplitude-controlled waveguide model. As with all control-system design, care must be taken with the controller gain. Setting the gain too high will cause the whole system to become unstable. This usually manifests as a violent amplitude modulation. Thus in the design, one must trade off response speed against amplitude instability. Also note that the regions near instability are sonically interesting, as the amplitude response will 'ring' a bit before settling down, which gives the envelope a brass-like 'blip'.

Page  00000003 3 Pseudo-Nonlinear VCF One of the more audible effects of saturation in resonant filters is the reduction of the effective resonant peak gain during resonance, due to the limited range of the filter states; therefore, a frequency-swept harmonically rich signal will pass through the filter with significantly reduced amplitude variations. We can set about to recreate this particular effect by implementing some sort of automatic gain control. In one method, we may take the amplitude of the filter and run it through a compressor. In another method, we may use an amplitude control system. There are two choices of control variable: filter gain and filter Q. If we choose filter gain, we have simply implemented a type of compressor, but if we choose the Q control, we get a more interesting system. Qlimit Controller - Des-cntrler I DesController Q FollowerFollowerl VCF I I VCF Figure 3: Various amplitude controls applied to a linear VCF These amplitude-controlled filters reduce the extreme amplitude variations of the linear filter, while retaining the long impulse response of the filter for impulsive inputs, as happens in some nonlinear filters. In a linear filter, it is not possible to have both a long impulse response and a "non-peaky" frequency response in the same filter. Furthermore, a nonlinear filter can self-oscillate, due to state saturation. The amplitude control system, when using Q control, can easily cause a linear system to stably self-oscillate, and to do so without significantly adding harmonics to the signal, thereby reducing the chance of aliasing. Amplitude of frequency sweep, high-Q VCF, no amplitude control 0.5 0 --0.5 Amplitude offrequency sweep, high-Q VCF, gain amplitude control 1 0.5 --0.5 Amplitude offrequency sweep, high-Q VCF, Q-based amplitude control Figure 4: Sawtooth frequency sweeps through (top to bottom): VCF, gain-controlled VCF, Q-controlled VCF

Page  00000004 In Figure 4, the gain-controlled and Q-controlled systems look rather similar, but if we study Figure 5, we see that the gain control acts by attenuating the whole signal (visible in the figure by the high frequncies disappearing), whereas the Q control just reduces the peak gain, leaving the rest of the filter realtively untouched, so that the spectral variations are less visible in the figure. 5000 4000 0 r 3000 ~ 2000 1000 0 5000 4000 0X S3000 ~ 2000 1000 Spectrum and amplitude offrequency sweep, hzigh-Q~ VCF, gain-based amplitude control I II:jjjjj ~:~::::::::::::::::::: Time Spectrum and amplitude offrequency, sweep, high-Q VCF, Q-based amzplitu;de control Time Figure 5: Comparison of spectral effects of Q control vs. gain control. 4 Summary Amplitude control systems are an interesting addition to the pallete of tools with which algorithm designers can create instruments. They can be used to bridge the gap between purely linear systems and strongly nonlinear systems, by creating a "slowly nonlinear" system, which can be easier to understand in some cases. They can also be used to help bridge between physically correct physical models and cheap, Machiavellian models. Finally, these systems open up a range of new directions for exploration in synthesis algorithms. 5 References [Cook, 1995] Perry Cook, "A Hierarchical System for Controlling Synthesis by Physical Modeling", International Computer Music Conference, Banff, Sept. 1995. [Franklin 1994] Franklin, Powell, Emami-Naeini. Feedback Control of Dynamic Systemns, Thzird Edition, Addison-Wesley, 1994. [McNabb, 1994] Michael McNabb. Unpublished clarinet model, 1994. [Stilson, 1996] Timothy Stilson, "Use of a Simple Control System for the Improvement of Simplified Physical-Modeling Synthesis Algorithms." Presented at the 1996 Acoustical Society of America Conference, Waikiki, Hawaii, 1996. Annotated viewgraphs of this talk are available at http: //www-ccrma. stanford. edu/Thtilti/papr/tllkulpd