Page  00000411 Armadillo: Real Time and Non-Real Time Analysis of Musical Sounds on a Power Macintosh Timothy J. Madden and James W. Beauchamp Computer Music Project c/o James Beauchamp School of Music, 2136 Music Bldg. University of Illinois at Urbana-Champaign 1114 W. Nevada St., Urbana, IL 61801 USA, Abstract The primary objective of Armadillo is to provide a convenient way to quickly analyze musical sounds on an inexpensive computer without the need for specialized hardware. The development of high-speed computers with excellent graphics and high quality audio I/O for the general consumer in the last few years has made this possible. While a number of analysis programs are available on Intel or Macintosh platforms, there are few that are dedicated to the analysis of musical sounds as Armadillo is. 1. Introduction We have developed an Apple Power Macintosh computer program for real time and non-real time analysis of musical sounds. An older program written in the Computer Music Project, SNDAN, for the UNIX platform [Beauchamp] is the precursor to Armadillo. The analysis engine of Armadillo is a phase vocoder utilizing a short time Fourier Transform on Hamming-windowed sound [Allen and Rabiner][Dolson]. Armadillo features monaural and stereo analysis of sounds input from the built in CD-ROM player or sound input port with microphone. Numerous graphic display plots are provided including sonogram, spectrum snapshot, 3-D perspective plot, and waterfall plot. The multitasking architecture of Armadillo allows many simultaneous analyses and graphs to be viewed in real time. Armadillo utilizes real time sample rate conversion to accurately tune the analysis to any specified equal temperament pitch, reducing harmonic errors. Left and right channel stereo analysis allows for the real time measurement of a transfer function between channels. To smooth the analysis, unique noise reduction algorithms are provided. 2. Analysis Technique Armadillo performs real time analysis by capturing segments of sound, windowing with a Hamming function, and performing a Fast Fourier Transform on the windowed sound. In one mode of operation, Armadillo calculates the magnitude spectrum and plots the result. If more accuracy is desired and the sound to be analyzed is a fixed-pitch harmonic tone, phase terms of the spectrum can be used to calculate the exact frequency of each partial. This is done by calculating two successive spectra and finding the phase change between the spectra to calculate the exact frequency. This is the wellknown phase vocoder algorithm used in many programs including SNDAN [Allen and Rabiner][Dolson][Beauchamp][Brown and Puckette]. Armadillo plots the magnitude spectra, and uses the frequency information from the phase vocoder to plot the frequencies. When analyzing harmonic tones, it is advantageous to have the harmonics fall exactly in the center of the FFT bins, to eliminate harmonic errors. To accomplish this, real time sample rate conversion is used to tune the analysis to a given pitch. Sample rate conversion is performed through band-limited interpolation of the sound samples before the Hamming window is applied. Band-limited interpolation is accomplished through a bank of polyphase FIR digital filters to calculate interpolated samples [Smith][Madden]. Once the interpolation is done, the resulting signal is effectively sampled at a new rate. The harmonics of the tone now exactly line up with the FFT bins, thus reducing harmonic amplitude errors. In real time analysis, some of the sound is missed since it takes time for the computer to analyze and plot the graphs. For this reason, a display is provided to tell what percentage of the sound is captured. In non-real time analysis, the sound is stored in an AIFF file, and then analyzed as if it were real time. In this way, an analysis "movie" is created. The accuracy of non-real time analysis is much greater because no sound is missing. Armadillo can perform stereo analysis in real time and non-real time. Since Armadillo is a multitasking program, separate analysis engines can operate simultaneously to perform stereo analysis. When the magnitude spectra of the left and right channels are calculated, one can be divided by the other to produce the transfer function between the two channels To reduce plot noise, the magnitude spectra can be averaged. The number of spectra to be averaged is set by the user. To eliminate the need to store large amounts of spectral data, Armadillo uses an iterative algorithm to do the averaging. Brute force averaging can be thought of as applying a long FIR filter to the data, with all the filter coefficients equal to one. Rather than using a FIR filter, Armadillo uses a one pole IIR ICMC Proceedings 1999 -411 -

Page  00000412 filter to do the averaging. In this way, thousands of spectra can be averaged without the need of large amounts of memory. 3. User Interface The Armadillo GUI features windows for real time sampling, analysis, tuning, and a variety of plots. In Figure 1 four Armadillo spectral graphs are shown. The top graphs show a real time analysis of a recording of a jazz band. The two bottom graphs show a real time analysis of the principle author of Armadillo singing the syllables, "ooo," gradually to "eee," and back to "ooo," in the pitch of C3. The top graphs were produced with untuned analysis, while the bottom graphs used tuned analysis. Windows provided for real time sampling and analysis have been designed for ease of use while supplying many features. To convenience, Armadillo gives default settings useful for basic analysis. Also, for tuned analysis, a tuning window with equal temperament pitches laid out like a piano keyboard is provided. More advanced features not of interest to most users such as noise averaging are put on separate windows to avoid cluttering the user interface. In this way, musicians without a technical background can use Armadillo for quick analysis, while researchers can take advantage of advanced features. For non-real time analysis, the sound can be recorded to an AIFF file and analyzed as if it were in real time, creating an "analysis movie." For analyzing sound files, the analysis window features buttons for frame by frame analysis. The sampling, analysis, and tuning windows are shown in Figure 2. Armadillo has the feature of background analysis, which allows Armadillo to store analysis data to a file for later viewing. Also, Armadillo has some limited sound file editing capabilities for recorded sounds. Armadillo has an amplitudeversus-time plot for displaying a sound wave in real time. In addition, the left channel may be plotted versus the right channel similar to an X-Y plot on an oscilloscope. When tuning is used, the wave form plot can be used as a strobe tuner for tuning an instrument. 4. Conclusion Armadillo is an easy-to-use analysis program for musical sounds, designed to be used by musicians for practicing their instruments, and teachers for giving classroom demonstrations. Also, it is useful for sound analysis in a recording studio. Researchers can use its advanced graphics for studying the structure of musical sounds. Also, the real time aspect of the program allows a user to develop an intuition about frequency analysis since the sound can be heard as the spectrum is displayed. References [Allen and Rabiner] J. Allen and L. Rabiner, "A Unified Approach to Short-time Fourier Analysis and Synthesis," Proc. of the IEEE, vol. 65, no. 11, pp. 1558-1564, 1977. [Beauchamp] J. W. Beauchamp, "UNIX workstation software for analysis, graphics, modification and synthesis of musical sounds," A ESPreprint 3479(L-1-7), 1993, URL: sndan.html. [Brown and Puckette] J. Brown and M. Puckette, "A high resolution fundamental frequency determination based on phase change of the Fourier Transform," J. Acoust. Soc. Am., vol. 94, pp. 662-667, 1993. [Dolson] M. Dolson, "The phase vocoder: a tutorial," Computer Music J., vol.. 10, no. 4, pp. 14-27, 1986. [Madden] T. Madden and D. Rosenthal, "Sample Rate Converter," U. S. Patent 5,512,895, April 30, 1996. [Puckette and Brown] M. Puckette and J. Brown, "Accuracy of frequency estimation using a phase vocoder," IEEE Trans. on Speech and Audio Processing, vol. 6, pp. 166-176, 1998. [Smith] J. Smith, "Bandlimited Interpolation: Introduction and Algorithm," URL:, 1998. -412 - ICMC Proceedings 1999

Page  00000413 oil 0A 0E1L~~n* IDiXb ''' Figure 1. (a) Real time spectral snapshot of a jazz band. (b) Real time sonogram of a jazz band. (c) Real time waterfall plot of a voice singing "" at a pitch of C3. (d) Real time 3-D perspective plot of a voice singing "" at a pitch of C3. (0) (c) Figure 2. (a) Real time sampling window. (b) Analyzer window. (c) Tuning window ICMC Proceedings 1999 -413 -