Page  393 ï~~TOWARDS A CHAOTIC MUSICAL INSTRUMENT Bruno Degazio Degazio Sound Design 192 Spadina Ave, #512 Toronto, Canada ABSTRACT The goal of this project is to produce a software musical instrument using chaotic processes as a sound synthesis method. Realtime control through MIDI note messages and continuous controllers is required. Early results are described, along with suggestions for continuing work CUBIC OSCILLATOR WORKBENCH The driven oscillator with a cubic term, commonly known as the Duffing oscillator, is defined by the autonomous differential equations: dx =y dy = -Ay-Bx3+G cos(wt) This system can be Cubic considered a simple Spring Damping form of physical, z -E11ii ~~~DrlUing Oscillator Rmpltude.. modelling. The! object modelled is a Orlin scillator Frequency rigid beam or spring..': vibrating in only spin SUfness one mode, driven by Uo e 255 a sinusoidal.: i i {Mi.,.;. exciting force. Parameter A models the damping force, or amount of energy lost to the system,," the cubic term controlled byB. _. models the stiffness 4 of the of the spring, G is the driving". oscillator force and w is the driving oscillator frequency. figure 1 - Cub Realtime access to these parameters is given in the Cubic Oscillator Workbench, a Macintosh program designed for interactive exploration of the parameter space (fig. 1). Graphic sliders for the control parameters appear along the top left of the screen. In addition to damping force, driving oscillator amplitude, driving oscillator frequency, and spring stiffness, sliders are provided for overall amplitude and for overall pitch, which is simply the wavetable playback increment. Numerical display for all parameters is provided in machine units, except for driving oscillator frequency, which is given in cycles per second. A pair of buttons at the top right of the screen start and stop sound output. A "kickstart" button reseeds the dependent variables x and y with reasonable values, which is frequently necessary since many parameter regimes produce runaway output (more technically, there exists an attractor at positive or negative infinity). Another pair of buttons controls display of the orbit graph and the time waveform graph, which occupy the c Oscillator Workbench 8.6899 ~63.1999 1806 hz 0.52315 Pitch 64 (Klckstart Osc Show Orbit Show Woe sic Oscillator Workbench screen bottom half of the screen. The orbit is simply a graph of x versus y for a series of 1000 samples. The various forms of behaviour can be easily distinguished by means of the complexity of the image produced (fig. 2). The time waveform is the actual sample by sample output of the y component, displayed as y versus time. The two dependent variables, x and y, produce two ICMC Proceedings 1993 393 4P.08

Page  394 ï~~correlated output streams which can be used for stereo sound, or for monophonic sound and a correlated control stream. the superposition of multiple periods in a sub-harmonic relationship. It is dearly seen in the series of orbit and waveform displays in figures 2a to 2e. a b / f. 3 t i 1.. TYPES OF BEHAVIOUR The cubic oscillator system exhibits several different behaviours which depend on the settings of the relevant parameters. Single cycle periodic behaviour is the simplest; it corresponds to a continuous periodic waveform in the time domain and to a circle (topologically speaking) in the orbital map (fig. 2a). Periodic behaviour of ordertwo and higher is also possible (fig. 2b-c). Quasi-periodic behaviour results from the super-position of multiple periodic behaviours, which may be incommensurate (i.e. non-rationally related). The waveform representation shows recurring similar features (which may never repeat precisely) while the orbital representation shows several crisscrossing loops ( fig. 2d). Finally, chaotic behaviour (fig. 2e) is represented in the orbital diagram by a complicated mesh of crisscrossing orbits which grows progressively thicker with time, and in the waveform display as a continuous wave without repeating features. The route to chaos from periodic behaviour is often through a period doubling scenario. This results from period doubling progression in the cubic oscillator a) period 1 b) period 2 c) period 4 d) period 8 (quasi periodic) e) chaotic f) impulse-damping behaviour Ueda (1979) has experimentally derived a preliminary map of the behaviour of this system. IMPLEMENTATION In the first implementation of this system it was possible for integration to be performed (using the forward Euler method) at a sample rate of about 16khz on a 25mhz Macintosh Quadra using extended precision floating point numbers, with all parameters retained in registers. Reworking the code for 32 bit fixed point (16 bit integer. 16 bit fraction) provided a remarkable speed improvement, running at about 41 khz, even without parameters being held in registers. When combined with the additional computing overhead for realtime sound output to the DACs and for user interface, this drops to about 22 khz, still adequate for testing. The goal of the project is to perform the integration on a Motorola 56000 DSP co-processor, which should be easily able to 4P.08 394 1CMC Proceedings 1993

Page  395 ï~~handle 44.1 khz, perhaps with multiple sound channels or other synthesis "niceties" such as envelopes or filters. SUBJECTIVE EVALUATION The sounds produced by the system truly earn the name chaotic. Other terms that come to mind are irregular, unpredictable, noisy, uncontrollable, dirty and wild. A particularly interesting feature is that the behaviour for a given set of parameters can be very different depending on the prior state of the system. Technically this is due to the existence of multiple attractors at these parameter values. For a given set of parameters some attractors may be chaotic, while others may be periodic or quasiperiodic. In experimental observation with the Cubic Oscillator Workbench, it has been found that when entering a region of the parameter space with multiple attractors, the system tends to fall to the attractor most similar to its existing behaviour. The addition of a small perturbation, such as added noise or a small transient (added with the "kickstart" button) is usually sufficient for the system to jump to a different attractor. OTHER APPROACHES A less direct approach to the application of chaotic processes to sound generation is represented by the Lorenz attractor interface to CSound's ADSYN generator (fig.3). This software module creates an ADSYN compatible control file, ADSYN.N, with chaotic trajectories for the frequencies and amplitudes of up to 64 partials. The partials need not be harmonically related; utilities are provided to generate frequency tables in harmonic relationship, harmonic with stretched tuning (positive or negative stretching), inverse (sub) harmonic relationship and many others. i- _. LOIINZ RTTRACTOR AOOITIUC SYNTHESIS number at partials to generate: 04 number of breekpoinls: 11000 pitch eulaIton 4bz): 2.0 totel duretion (ms): 50000 lundamantel frequenty (hz): L U4 L..J LORENZ EQUATION PARAMETERS herlnonic stretching: f" J rats (u-101 j A:E Eour.FREQUENCY MAP Cace,:l20.000J EDIT PARTIAL WEIGHTS Creat OSYN ill, )C:2 19 figure 3- Lorenz attractor ADSYN interface FUTURE WORK A number of improvements are projected for the current system. The most important is to offload the burden of numerical integration to a DSP in order to free up the main processor for user interface and MIDI input processing. The DSP should be able to perform the integration on multiple simultaneous channels as well as provide amplitude envelopes. Other enhancements to the basic process include the injection of small amounts of noise into the data stream to perturb the oscillator and induce a noisy transient response. This will reduce its tendency to "lock into" simple periodic regimes. Driving the oscillator with a function other than sin or cos might also have this effect, since the high frequency components in less "smooth" waveforms could also induce noisy transients. OTHER SYSTEMS to investigate include: van der Pol oscillator dx = y dy = (1-x2y)-x double scroll oscillator (Chua's circuit) dx = A(y-h(x)) dy = x-y+z dz = -By forced negative resistance oscillator dx=y dy = a(1-x2)y-x3+Bcos(ft) third order piecewise linear system dx = -A f(y-z) dy = -f(y-x)-z dz = y f(u)=-au+0.5(a+b)( I u+11 - Iu-1 I) An extension of the workbench arrangement developed for the cubic oscillator would facilitate the investigation of these systems. A generic interface for graphic slider and MIDI control, behind which various computational 'engines' corresponding to one of the above systems could be installed, would be ideal both for rapid prototyping and for exploration. REFERENCES Rodet, X. Nonlinear Oscillator Models of Musical Instrument Excitation in Proceedings of the International Computer Music Conference, San Jose, CA, 1992. Ueda, Y. Steady Motions exhibited by Duffing's equation: a picture book of regular and chaotic motions. In New Approaches to Nonlinear Probkems in Dynamics, ed. P.Holmes, pp. 311-22. SIAM, Philadelphia, Pa. (1979) Ueda, Y. and Akamiatsu, N. Chaotically transitional phenomena in the forced negative resistance oscillator. IEEE Trans. CS 28, 217-24 1981) ICMC Proceedings 1993 395 4P.08