Page  335 ï~~GRANULATION AND TIME-SHIFTING OF SAMPLED SOUND IN REALTIME WITH A QUAD DSP AUDIO COMPUTER SYSTEM Timothy Bartoo,t David Murphy,t" Russell Ovans,tt Barry TruaxÂ~ timothy bartoo@mindlink.bc.ca, davidcot@sfu.ca, ovans@sfu.ca, truax@sfu.ca tHarmonic Functions 4344 Albert St. Burnaby, BC V5C 2G1 Canada YDept. of Communication 4Centre for Systems Science Simon Fraser University Burnaby, BC V5A 1S6 Canada ABSTRACT A multiprocessor digital signal processing (DSP) audio computer system (ACS) implementing real-time granulation of sampled sound is presented. The use of granular synthesis as a continuous real-time processing effect inserted directly into the audio chain is emphasized, and applications for its use are suggested. The ACS as a universal platform for audio DSP application development is also discussed. GRANULATION OF SAMPLED SOUND Granulation of sampled sound, or granulation, is a technique recently developed by Barry Truax [Truax, 1988, 1990, 1994b]. Granulation supports time-shifting of sampled sound in real-time. That is, when a sample is granulated (i.e., amplitude modulated with one or more grain streams) it can be slowed down or sped up, in real-time, without changing its pitch. This technique results in a startling effect when the time component of the sample is significantly altered [Truax, 1994a], and has suggested processing as a fruitful application of granular synthesis. In this paper we briefly describe a reimplementation of granulation on a new quad DSP computer music workstation called the audio computer system (ACS). While this new implementation adheres to the original design described in [Truax, 1988] with respect to user controlled parameters, the increase in computing capability offered by the ACS has resulted in significantly novel features and interesting user interface issues. In particular, the ability to perform granulation as a continuous real time effect applied to an input signal and the availability of very large sample windows have added new dimensions to granulation. The original granulation system - PODX [Truax, 1988] - was implemented on a DMX1000 signal processor. Samples were taken from disk and loaded into a 4K window on the DMX. While the granulation process occurred in real-time, it was applied to offline samples; that is, it could not be utilized as a signal processing effect in a mix down environment. Our new ACS implementation allows just that. The processing and triggering of (memory resident) samples does however remain a possibility with this newer implementation. An interesting difficulty in defining a model for granulation as a continuous realtime process is in describing the relationship between real-time (RT) and granulation-time (GT). As long as the two are equal, granulation is an effect that can be indefinitely applied to an input signal. However, once time-stretching is invoked and the processing speed drops below realtime, a sample memory must be used to ICMC Proceedings 1994 335 Audio Signal Processing

Page  336 ï~~buffer the signal. While the RT pointer into the finite sample buffer maintains a constant velocity, the GT pointer is free to decelerate (time-stretch) and accelerate (time-compress). The user controls a virtual "gas pedal" that governs the rate of traversal by the granulation process. A set of axioms governing the relationship between the RT and GT pointers is necessary to prevent, for instance, the GT pointer moving ahead of the RT pointer. (Granulation may be many things, but it is not omniscient.) A virtually transparent processing of the input signal is possible through a specific combination of granulation parameters. A chorus effect is realized as the number of grain streams is increased and a random delay is applied to each. Inner complexities are exposed as GT falls below RT [Truax, 1994a]. By slowly varying these parameter values, a gradual shift from unaltered to modulated signal is achieved. This ability, and its resulting potential for creating sonic morphs from input channel to input channel (or sample to sample), was not possible with the PODX implementation. APPLICATIONS The ability to stretch and compress sounds without changing pitch awards the composer a greater sonic palette. Moreover, granulation as a signal processing effect inserted directly into the audio path increases its utility. By producing a sound at, for example, twice its normal tempo, then stretching it through granulation back down by a factor of two, a sound can be produced at the desired tempo with stretched granular qualities. This is particularly effective when applied to percussion instruments. Because the speed at which a granulated sample is played back can be changed in real-time, a sample's ioop points no longer define its time length. This allows the composer to make any one sample the same length as another, which is very effective for layering many rhythmic samples together. Sounds that have been stretched through granulation evoke images. Practical experience using granulation in film sound design has proven it very effective, adding meaning to scenes by creating complex but subtle textures and undertones. Stretching a sound across a scene change (e.g., a door slam from one scene that is stretched through granulation well into the next) allows an interesting, seamless segueway. THE AUDIO COMPUTER SYSTEM The ACS itself is housed in a 2U rackmount cabinet, with rear panel SCSI, MIDI, eight analog input, and eight analog output connectors. The specific features of the ACS are listed in the Appendix. A Macintosh-based software development environment permits the creation and download of interactive applications via SCSI. "Soft" user interfaces that support an ACS application defined SCSI and/or MIDI protocol are thus created on external control computers. For example, the interactive user interface for the granulation application was realized with MAX on a Macintosh, which sends control information through MIDI to the ACS. Other interfaces and/or control platforms are possible so long as they adhere to the control specification of the ACS application. A large sample window is important for the granulation application in order to support a reasonable amount of time stretching over a continuous input signal. Configured with a full 16 MWords of SIMMs, a stereo sample window of almost three minutes is realized. The ACS is a three layer system: it is made up of a host (Apple Macintosh), a control CPU (Motorola 68020), and signal processing chips (four Motorola 56002s). Lindemann et al [1990] have criticized three layer systems for being unwieldy because of separate development environments for each of the three processors. The Macintosh development environment we have created for the ACS responds to this criticism by providing an integrated set of assemblers, linker/loaders, debug monitors, and SCSI downloaders that alleviate much Audio Signal Processing 336 ICMC Proceedings 1994

Page  337 ï~~of the agony involved in audio DSP development. In particular, controller applications are written in C, compiled using a Macintosh compiler, then linked to run on the ACS during the download operation. It is our belief that the ACS meets Daniel Brandt's [1990] four requirements of DSP performance systems: availability,1 portability, flexibility, and interactivity. We also believe that because of the strength of its development environment, the ACS is of great pedagogical value. REFERENCES [Brandt, 1990] Daniel Brandt. "A Modular DSP Performance System for the Composer/Programmer." Proceedings of the 1990 International Computer Music Conference, pp. 376-378. [Lindemann et al, 1990] Eric Lindemann, Michel Starkier, and Francois Dechelle. "The IRCAM Musical Workstation: Hardware Overview and Signal Processing Features." Proceedings of the 1990 International Computer Music Conference, pp. 132-135. [Truax, 1988] Barry Truax. "Real-Time Granular Synthesis with a Digital Signal Processor." Computer Music Journal, 12 (2), pp. 14-26. [Truax, 1990] Barry Truax. "Time-Shifting of Sampled Sound with a Real-Time Granulation Technique." Proceedings of the 1990 International Computer Music Conference, pp. 104-107. [Truax, 1994a] Barry Truax. "Sound Sheet Examples." Computer Music Journal, 18 (1), p. 107. [Truax, 1994b] Barry Truax. "Discovering Inner Complexity: Time-Shifting and Transposition with a Real-Time Granulation Technique." Computer Music Journal, 18 (2), to appear. 1 Contact the second author for information. APPENDIX: ACS FEATURES PROCESSING CAPABILITY: " Quad Motorola DSP56002 DSPs running at 40MHz for a total of 80 MIPS of DSP processing power. " 25MHz Motorola 68EC020 microprocessor with 128K bytes of fast RAM for control I/O handling and DSP control. " 256K to 16M 16-bit words of audio sample memory, based on standard SIMMs, providing 5.4 seconds to 5.8 minutes of audio storage at a sampling rate of 48 kHz. INPUT / OUTPUT: " Eight channels of analog input and output. " 16 or 18 bit sigma-delta converters using 64x oversampling for 90+ dB of signal to noise plus distortion S/(N+D). " Digital control interfaces: SCSI, MIDI IN and OUT. OPERATING SYSTEM: " Cooperative multi-tasking kernel. " Integrated task scheduler with millisecond resolution. " High level DSP host command interface. DEVELOPMENT ENVIRONMENT: " Apple Macintosh based. " DSP, 68020, and kernel monitors. " Live memory display windows. " Live memory change capability. " Breakpoints and single stepping of DSPs and 68020. " Integrated DSP and 68020 assemblers. " Linker/loader for C applications compiled on the Macintosh. " SCSI downloaders for kernel, 68020, and DSP object files. ICMC Proceedings 1994 337 Audio Signal Processing