DESIGN OF TIMBRE WITH CELLULAR AUTOMATA AND B-SPLINE INTERPOLATION Matthew Klassen DigiPen Institute of Technology, Redmond, WA mattjklassen@gmail.com Paul Lanthier Institut polytechnique Unilasalle Mont Saint Aignan, France planthier76@outlook.fr ABSTRACT The origin of this paper comes from the collaboration of the authors on the UPISketch software project (see [1]), which is a creation of the Iannis Xenakis Center and a de- scendant of the UPIC project of Xenakis. The software, created in 2017, allows the user to draw curves which can be interpreted as musical gestures, acting on elements such as pitch, time, and timbre. Two fundamental mathematical tools used in this process are splines, to model graphical gestures, and cellular automata, to generate musical ges- tures such as pitch sequences. In this paper we apply both of these techniques on the “micro-level” to the timbre of waveforms, using the approach of cycle interpolation.A waveform is modeled as a sequence of cycles, and each cy- cle is modeled as a cubic spline curve. The B-spline coef- ficients of each cycle form a discrete representation, which can be manipulated through the use of cellular automata. In this way, key cycles can be generated, and can be in- terpolated with B-splines to form new and interesting tim- bres. We illustrate this generation and design of waveforms in our own software implementation with JUCE, which in turn will become part of UPISketch. 1. UPISKETCH AND OUR MOTIVATION In the UPISketch software, sound events are considered as sequences of musical elements such as: time duration, loudness or amplitude, pitch or fundamental frequency, and timbre or waveform. The space of configurations is thus a set of sequences over an alphabet inspired by those param- eters. It is straight-forward to give numerical values to the first two parameters, duration and loudness. The pitch can also be represented in discrete segments, such as note val- ues where the pitch is constant, or as continuous curves representing a glissando or other pitch variation. The no- tion of timbre, however, is recognized as being much more complicated. Perception of timbre can be modeled as mul- tidimensional (see [2] and [3]), and its analysis can be approached in both time and frequency. In [2] the global time-envelope as well as spectral parameters such as spec- tral centroid are described in detail. We will consider some of these when we discuss our models involving splines and Copyright: c 2022 Matthew Klassen et al. This is an open-access article distributed under the terms of the Creative Commons Attribution 3.0 Unported License , which permits unre- stricted use, distribution, and reproduction in any medium, provided the original author and source are credited. cellular automata. One approach to timbre, employed in many music software systems, is to assign a discrete col- lection of instrument sounds as available timbres. Another approach is to use synthesis methods, such as frequency modulation, to allow timbres to change continuously ac- cording to various parameters. Our approach to timbre is both discrete and continuous. We model approximately periodic waveforms in terms of cycles, where each cycle is given a discrete representation as a set of cubic B-spline coefficients. If a sound is to have a timbre which is somewhat similar to an acoustic instru- ment, then this should be achievable by a gradual change in time of the shape of cycles, as can be observed in digital in- strument sample recordings. A sequence of cycles can be extracted from a recorded sound, or can be generated by artificial means. The method of generation we consider in this paper uses cellular automata, allowing for discrete lo- cal changes in the B-spline basis coefficients which in turn can be smoothed, or interpolated, to create more gradual changes. 2. SPLINE INTERPOLATION It is worth noting that the choice of modeling signals with cubic splines, or piecewise polynomials, has a basic effect on the timbre due to their inherent spectrum. In fact, in- terpolation with cubic splines can be thought of as a type of additive synthesis of periodic waveforms which are de- rived from the square wave. It is well known that the square wave has Fourier series with harmonic spectral decay 1/n, and its integral the triangle wave, has spectral decay 1/n 2 . (See for example [4] chapter 7.) Repeating this process we obtain quadratic and cubic periodic waves, with spec- tral decays 1/n 3 and 1/n 4 . Approximation of an audio signal with interpolating cubic splines inherits this type of spectrum, in addition to the modeling of lower frequencies, such as the fundamental, through the shaping of cycles. We model short samples of an audio waveform at the level of one cycle, or period, although we do not impose the condition that our waveforms are strictly periodic. Further, we choose to represent each cycle as a C 2 interpolating cubic spline on the interval [0,1] given in terms of a B- spline basis. Each cycle will be represented by a spline function f (t ) with values in the interval [−1,1]. We will also assume that the interval [0,1] is evenly partitioned into k subintervals and that f is a cubic polynomial on each subintervals. For simplicity, each cycle will be assumed to Proceedings of the 19th Sound and Music Computing Conference, June 5-12th, 2022, Saint-Étienne (France) 479