Page  00000001 "Aulos": An RTcmix interfaced software application for modeling cylindrical pipes with tone holes, with emphasis on the simulation of the ancient Greek Auloi Kostas A. Tsahalinas Program of Psychoacoustics, Aristotle University of Thessaloniki tsax @ skiathos.physics.auth.gr ABSTRACT The necessities of a research project on an ancient Greek cylindrical bore wind instrument called "aulos" (pl. auloi) led to the development of the homonymous software application. Using as input data all the geometrical dimensions of a finite cylindrical pipe bearing tone holes, Aulos performs acoustical analysis and modeling of ancient or modern relevant instruments, sound synthesis, and extraction of musical information. The application is written in C and is available on Linux and Irix/SGI platforms. It includes algorithms for sequence generation of simple or fork-fingerings, calculations of the input impedance curve for each fingering, sweeping of acoustical variables, as well as a method for quick and accurate focusing on curve maxima and an algorithm that calculates pipe length and tone hole position, that give a desirable scale on a specific tonality. Aulos can also be used in cooperation with the RTcmix language for real-time sound generation, and Gnuplot for rapid graphical representation of output curves. 1. INTRODUCTION The Aulos software application has been initially designed to cover the necessities of a research project, which aims to the acoustical and musicological analysis of the ancient Greek auloi. These were cylindrical bore wind instruments, bearing tone holes and were most possibly driven by a double reed system. Having all numerical information about the physical dimensions of an instrument in this category, the relevant researcher (engineer, musicologist, archaeologist) will benefit by a flexible computational tool performing acoustical analysis, using as input the former numerical data. In this paper, the architecture as well as the possibilities of Aulos v. 1.6 will be described. 2. BACKGROUND From the aspect of musical acoustics, the input impedance of a wind instrument provides significant information about the tonality and the sound spectrum of the instrument, as about the interaction of the reed with the bore. G. Plitnik - W. Strong (1979) proposed a numerical method for the calculation of the input impedance of the oboe. In particular, this method calculates the input impedance in the frequency domain, Zi(f), of an open-closed (o-c) conical or cylindrical bore wind instrument, bearing tone holes of varied diameter, with/without a reed attached. Due to the vast amount of numerical computations for sweeping the acoustic spectrum, as well as the algorithmic sense of P-S method, the latter is suitable for implementation in a computer software application. This method has been proposed for implementation by Perry Cook and has been integrated in the core of Aulos since now. The relevant mathematical formulas as used in the application can be found in (Tsahalinas, Tzedaki, Cook et al., 1997), where a synopsis of an earlier Aulos version features, as well as assumptions on a specific pair of ancient Greek auloi, known as "the Elgin Auloi", were discussed. 3. DESIGN RATIONALE / ARCHITECTURE Aulos has been designed as a wide range application, including algorithms of generic form, so that research on any ancient or modern wind instrument in this category (cylindrical bore with tone holes) can be feasible. Moreover, facile portability of the code has been considered significant. The application is written in C, with most of the code in ANSI C, while a small subset of the code uses Unix system calls. Aulos can also be used in cooperation with the RTcmix language and Gnuplot application. A full version (graphics and sound) is available on Linux and Irix/SGI platforms, from http://www.paralia.com/tsax. A text-based version can be easily ported to any platform supporting ANSI C. The Aulos software architecture consists of the following parts: - An underlying core, which integrates an implementation of P-S method that calculates the input impedance of the instrument for a specific frequency. - A peripheral shell of routines, that handles the core for extraction of various acoustical and musical information. The shell integrates implementations of general algorithms performing sequence generation of simple or fork-fingerings, calculations of the input impedance curve for each fingering by sweeping the acoustic spectrum frequencies, a method for quick and accurate focusing on curve maxima, as well as the possibility of sweeping acoustical variables. Moreover, a method for calculating pipe length and tone hole position for a desirable scale on a specific tonality is integrated here. - A text-mode I/O user interface. - An interface to the RTcmix language, for real-time sound generation. - An interface to Gnuplot, for rapid graphical representation of output curves.

Page  00000002 4. FEATURES 10. 60 50 40. 1 - -:. "/MHyaphs/in.imp'p.................................... A~l researcher can compare the simulation results with the known ancient Greek modes appearing in surviving documents of ancient Greek music theory. Sweeping an acoustical variable (such as the length of the bore and the reed volume) has been proven very useful for coming to basic conclusions about the acoustic behavior of auloi in the frequent case of a missing or broken part of an ancient instrument. Output data are printed in independent text files and the corresponding curves show how the former intervals and the fundamentals of the scale are detuned as a function of the acoustical variable value. By calling Gnuplot, Aulos can produce a rapid graphical representation of impedance curves in the frequency domain, as well as the interval and fundamental detuning curves. 2051--1 10 0 500 1000 1500 2000 2500 3000 3500 4000 4500 500. Fig. 1: An input impedance curve, as calculated by Aulos for a given fingering, using a constant step of 1 Hz ( h. axis: f (Hz), v. axis: IZil (arbitrary units) ) Acoustical analysis of a given fingering (either manual or computer generated) includes accurate location of the resonance peak frequencies on the input impedance curve and the calculation of their amplitude and frequency ratios to the respective quantity of the fundamental, to be used in alignment testing, as well as for RTcmix scorefile generation (aulos.sco). Sound synthesis and music scale playing take place by calling the RTcmix WAVETABLE routine, which performs real-time additive synthesis of partials for the steady state, based on acoustical analysis data encapsulated in "aulos.sco" scorefile. -==*=*=*=*=0 -== =*=*=*=0 ==*=*=*=o=0 -==*=*=*=o=0 -==-=-o=o=0 -==-=-=o-==0 -==*=o=o=o=0 -==*=*=o=o=0 -==o=o=o=o=0 -==*=o=*=*=0 -==--*=o=o=o=0 -==o=*=*=o=0 -==o=o=o=o=O (a) (b) Fig. 2: Algorithm generated scales: (a) Using "normal" fingerings (b) Inserting "fork" fingerings (*: closed hole, o: open hole, O:bell) Given a sequence of algorithm generated fingerings, Aulos calculates all possible intervals (in cents) between any combination of two fingerings in the sequence, so the 195 190 185 NN NIX /MyGraphs/Ol.ali' %.........................................N.................................. 175 0 1 2 3 4 5 Fig. 3: Graphical representation of an "*.ali" file (h. axis: Additional pipe Length (cm), v. axis: Interval between two given fingerings (cents) ) 5. THE ALGORITHM "quick focus on max" In the Alpha version of Aulos (1997) the input impedance curve (in the frequency domain) was calculated using a constant frequency step of 1 Hz. By that time, this value had been considered optimum by means of speed and accuracy of results. However, it later appeared that this compromise had a minor side effect: When, the possibility of sweeping acoustical variables was added to the program, the curves, presenting fundamental detuning as a function of the variable value, appeared slightly choppy, consisting of many discontinuous, locally flat regions. The cause of this effect was as follows: Due to rounding error (as a discrete

Page  00000003 step of I Hz was used) the first impedance peak appeared in the same integer frequency for a small increase ii 9R..~lliiii~~~iiii~~~iiii~~~.......................................................................................................................... step of 10 Hz and four iterations have been considered optimal. * ---~----- i i i i i i i i ii........ -.......:::*:************::*: * * ** * * * * * * * * * * * * * * * * *.*.* * * * * * * * * * * * * * *..********.........................*..*..*..*..*..*..*....*..*..*..*..*..*..*..*.*..*..*..*..*............................... 260 255 2451 './HMyGraphs/O.alf' x,....................................... ,,..................................................................... ON-........................................... ^-\MW *s...................................................._. I' iN ~r^ ~^ *S^ ~^i..........;... ^. '......... ^SS~ 2551 260 "/MyGraphs/Ol.alf.... 245 240 240................................................... 230 0 O 1 2 3 4 5 Fig. 4: Graphical representation of an "*.alf' file, produced using a constant step of 1 Hz on the input impedance curve. (h. axis: Additional pipe Length (cm), v. axis: Fundamental frequency (Hz) of a given fingering) of the acoustical variable value, then it jumped to the adjacent integer frequency, where it was kept steady for a small increase of the variable value, and so on. This effect could be easily fixed by decreasing the discrete step by one order of magnitude or more, but, on the other hand, the execution time would increase in proportion, which was impractical for fast sound generation. To bypass this dilemma the following algorithm ("quick focus on max") was developed: Let us consider three successive discrete points (x1,y1), (x2,2), (x3,Y3) (where without loss of generality we can assume x1<x2<X3) on a curve that is expected to have an exact maximum (max,ymax) in a known region. When the condition (y1<y2 AND y2>y3) (1) is satisfied, then X1<Xmax<x3. Connecting this observation with practice, we can start sweeping x with a relatively great step. When (1) is satisfied, we can decrease the step by one order of magnitude and start sweeping from x1. When (1) is satisfied again for three new points (x',y1'), (x2,y2'), (x3',3'), then x'<Xmax<X3'. We can decrease again the step by one order of magnitude and start sweeping from x1', and so on. Iterating this process n times, in the end it is l(n) <max<x3(n) and we have trapped xmax in the very small region [xn)Jx3n], obtaining accuracy of as many decimal points we wish. For the specific situation of locating the frequencies of the impedance peaks of pipes about 30-40 cm long, an initial 0 1 2 3 4 5 Fig. 5: Graphical representation of an "*.alf' file, produced using the "quick focus on max" algorithm, with an initial step of 10 Hz and four iterations. (h. axis: Additional pipe Length (cm), v. axis: Fundamental frequency (Hz) of a given fingering) 30... 25... 20... 15 10.... rI' Sl/yGraphs/focus.imp'........................................ g, 200 205 210 215 220 225 230 235 240 245 2 Fig. 6: Points generated by "quick focus on max" algorithm. The initial step is 10 and three iterations have taken place.

Page  00000004 6. THE INVERSE ISSUE: "Calculating pipe length and tone hole position to get a desirable scale on a specific tonality" The choice of the appropriate pipe length, as well as the knowledge of where one should open the tone holes along the pipe, in order to get a desirable scale on a specific tonality, are crucial for wind instrument designers and constructors. Most of this knowledge (especially regarding traditional music wind instrument constructors) is currently empirical. The Aulos application includes an algorithm that calculates pipe length and tone hole position along the bore, having as input data the radius of the pipe, the number of tone holes that will be created, the radius of each one, the hole depth (pipe thickness), the frequency of the fundamental mode of the (o-c) pipe fdes in case all tone holes are closed, and the desirable intervals I1,I2,.. In between two successive normal fingerings of the scale. The algorithm implements a continuous-improvement iterative method that works as follows: Starting with a pipe of a very small length L, (without any tone holes), the frequency of the fundamental mode fp, as well as the interval between f, and the desirable frequency fdes are calculated. This process is iterated, where in each step L, is increased, until the condition [interval(fp,fdes) 1 cent] is satisfied. Having found the pipe length value, the first tone hole is created in a very small distance L1 (section length) from bell and the frequency fp, as well as the frequency of the fundamental mode fi (when the tone hole is opened) are calculated. The process is iterated and in each step L1 is increased, until the condition [interval(fl,fp) - I1 (cents)] is satisfied. Thus, the first-section length value has been found. A similar logic is followed in order to calculate successively the positions of the other tone holes. In each calculation all formerly created tone holes are taken into account and, also, the frequency f, is printed, in order to determine the deviation from fes, as fp is slightly affected by successive tone hole creation. 7. CONCLUSIONS The Aulos software application performs acoustical analysis and modeling of ancient/modern cylindrical bore (o-c) wind instruments, sound synthesis and scale playing (interfaced to RTcmix language), graphical representation of output curves (interfaced to Gnuplot), and extraction of musical information, using as input data all geometrical dimensions of a finite cylindrical pipe bearing tone holes. Emphasis is given to analysis of the ancient Greek auloi, by calculating all possible intervals between any combination of two fingerings in the scale, as well as by integrating the possibility of sweeping acoustical variables, to cover the frequent case of a missing or broken part of an ancient instrument. (This application has already been the basic computer simulation tool for research on three surviving pairs of ancient Greek auloi). Moreover, the ability of calculating pipe length and tone hole position along the bore, that give a desirable scale on a specific tonality, can be useful for the design and construction of new wind instruments. Currently, the core of this application is an implementation of the P-S method for cylindrical bores. However, on future versions the possibility of handling conical-bore instruments, as well as other models either with respect to tone holes (such as the model proposed by (Keefe, 1990)) or describing reed's behaviour can be integrated in software's core. 8. ACKNOWLEDGEMENTS The author would like to express his gratitude to Dr. T. Golnas for his valuable feedback on a draft of this paper. He would also like to thank Pr. X. Spyridis for providing inspiration to the author to implement "the inverse issue" in this application. 9. REFERENCES [1] Plitnik, G., and W. Strong. 1979. "Numerical Method for Calculating Input Impedances of the oboe." Journal of the Acoustical Society of America 65(3):816-825. [2] Tsahalinas, K., K. Tzedaki, P. R. Cook, et al. 1997. "Physical Modeling Simulation of the ancient Greek Elgin Auloi". Proceedings of the 1997 International Computer Music Conference, pp. 454-457. Thessaloniki. [3] Keefe, D. H. 1990. "Woodwind air column models." Journal of the Acoustical Society of America 88(1):35-51. [4] Scavone, G. P. 1997. An Acoustic Analysis of SingleReed Woodwind Instruments with an emphasis on Design and Performance Issues and Digital Waveguide Modeling Techniques. Ph.D. thesis, Music Dept., Stanford University. [5] Rossing, T. D., and N. H. Fletcher. 1995. Principles of Vibration and Sound. New York: Springer-Verlag. [6] Beranek, L. L. 1954. Acoustics. New York: McGrawHill Book Company. [7] Benade, A. H. 1976. Fundamentals of Musical Acoustics. New York: Oxford University Press. [8] Pain, H. J. 1983. The Physics of Vibrations and Waves. John Wiley and Sons, Ltd. [9] Kernighan, B. W., and D. M. Ritchie. 1988. The C Programming Language. Prentice Hall Inc. [10] Love, T. 1993. ANSI C for Programmers on UNIX Systems. Cambridge: Cambridge University Engineering Department. [11] Garton, B., and D. Topper. 1997. "RTcmix - Using CMIX in Real Time". Proceedings of the 1997 International Computer Music Conference, pp. 399-402. Thessaloniki. [12] The CMIX Home Page, http://www.music.princeton.edu/winham/cmix.html