{'fraction_non_alphanumeric': 0.02899124979362721, 'fraction_numerical': 0.011094601287766221, 'mean_word_length': 4.742510428517255, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Explicit Mapping of Acoustic Regimes For Wind Instruments

This paper proposes a methodology to map the various acoustic regimes of wind instruments. The maps can be generated in a multi-dimensional space consisting of design, control parameters, and initial conditions. The bound- aries of the maps are obtained explicitly in terms of the parameters using a support vector machine (SVM) classifier as well as a dedicated adaptive sam- pling scheme. The approach is demonstrated on a simplified clarinet model for which several maps are generated based on different criteria. Examples of computation of the probability of occurrence of a specific acoustic regime are also provided. In addition, the approach is demonstrated on a design optimization example for optimal intonation.


INTRODUCTION
Wind instruments (e.g., clarinets, oboes, trumpets) are nonlinear systems characterized by the presence of various acoustic regimes [1,2]. The control of these regimes is typically tedious as exemplified by the difficulty for beginners to successfully produce a sound. In this case, the musician tries to reach the conditions discriminating the two following regimes: the occurrence or the lack of self-sustained oscillations in the instrument's resonator (i.e., a sound is produced or not). Beyond this simplified description, playing an instrument requires the selection of specific regimes (e.g., a given note) among many possible ones [3].
Despite recent improvements in the understanding of the physics and the modeling of wind instruments [4], there are still many open questions related to how the various regimes are reached. More specifically, it is not yet understood how the coupling between design and control parameters of the instrument will trigger a given regime. Such an understanding could help to not only understand the important features of a "good instrument" but also help, in the long term, modify the design of instruments for improved playability.
In order to understand the coupling between the various parameters and the acoustic behavior of the instrument, this paper proposes to generate maps defining the regions where specific acoustic regimes are reached. These maps are generated in a space of parameters that are known to govern the acoustic behavior of the instruments (e.g., mouth pressure and reed channel opening). The ability to construct such maps to associate specific acoustic behaviors with regions of the parameter space is of crucial importance for the analysis and design of wind instruments. In general, such a mapping is non intuitive and cannot be obtained through analytical developments arbitrarily far from the oscillation threshold. Alternative approach consists in performing the numerical continuation of solution branches [5,6,7] but only static or periodic solution branches are tractable [8,9]. More importantly, there are several parameters influencing the acoustic behavior of the instrument thus requiring the construction of a map in a multidimensional space. For this purpose, the most intuitive approach is the construction of maps using a cartesian grid [10,11,12]. However, precisely identifying the boundaries between various regions of the map requires a large amount of simulation calls which increases exponentially as the dimensionality of the parameter space increases. For this reason, a dedicated approach such as the one proposed in this article is needed.
In this work, the map boundaries are constructed using a Support Vector Machine (SVM) [13,14] classifier. SVM is a so-called "machine learning" technique and defines an "optimal" boundary between two sets of data points differentiated by their "classes" (e.g., pass or fail ). That is, an SVM requires an initial training step such as a design of experiments [15,16]. The advan-tage of SVM stems from the construction of a boundary defined explicitly in terms of the parameters. In addition, the boundary generated can be highly nonlinear and defined in a high dimensional space. Because, the initial SVM constructed from a design of experiment might not be accurate, it is subsequently refined using a dedicated adaptive sampling scheme developed by the first author [17].
The flexibility of the approach allows one to study the regimes in a hybrid space including design, control parameters as well as initial conditions. The technique also enables the efficient propagation of uncertainties to estimate the probability of belonging to a specific regime [18]. In addition, because SVM is a classification technique, it is not sensitive to discontinuous behaviors. This is an essential aspect since this type of behavior can occur in wind instruments (e.g., discontinuities in playing frequencies due to changes in register). Another advantage of SVM is the possibility of handling several classification criteria simultaneously (e.g., frequency and amplitude).
The aim of this paper is to demonstrate the flexibility and advantages of the proposed methodology rather than to contribute to the understanding of the physics of a particular instrument. The capabilities of the new mapping approach are demonstrated through various numerical experiments based on the simplified reed instrument model. Two-and three-dimensional maps are presented for various choices of parameters, including initial conditions. In addition, examples of calculation of probability of obtaining a given frequency are provided. Finally, the approach is applied to a simple design optimization example for intonation.
The paper is structured as follows. The first section provides a background on the construction of the maps using SVM. The second section introduces the basic physics of a clarinet as well as the corresponding simplified model. Finally, the last section provides a set of numerical results in order to highlight the capabilities and potential of the methodology when applied to musical acoustics.

Support Vector Machines (SVMs)
In order to build maps, a technique referred to as explicit design space decomposition (EDSD) [17,18], is used. The basic idea is to construct the boundaries of an n-dimensional map using a Support Vector Machine (SVM) [14,19], which provides an explicit expression of the boundary in terms of the chosen parameters.
SVM is a machine learning technique that is widely used for classification. In optimization and reliability assessment, SVMs are used to approximate highly nonlinear constraints and limit-state functions. The most important features of SVMs are their ability to handle multiple criteria using a single classifier, to be insensitive to discontinuities [20], and to be computationally very efficient. The ability of an SVM to handle discontinuities is essential in the case of sudden changes of acoustic regimes (e.g., change of register). A schematic example of an SVM separating configurations with sounds and without sound is depicted in Figure 1. An SVM defines an explicit boundary that separates samples belonging to two classes labeled as +1 and −1. Given a set of N training samples x i in an n-dimensional space and the corresponding class labels y i = ±1, an SVM boundary is given as: where b is a scalar referred to as the bias, λ i are Lagrange multipliers , and K is a kernel function. The Lagrange multipliers and the bias are solved for using a quadratic programming optimization problem. The optimization problem is formulated so as to maximize the margin between samples of both classes [14,19]. The training samples for which the Lagrange multipliers are non-zero are referred to as the support vectors. The predicted class of any arbitrary point x is given by the sign of s(x). The kernel function K in Equation (1) can have several forms, such as polynomial or Gaussian radial basis kernel. The Gaussian kernel (Equation (2)) is used in this article: where σ is the width parameter. An initial approximation of the map is obtained using a design of experiments (DOE) [16,21,22] such as Latin Hypercube Sampling (LHS) or Central Voronoi Tessellation (CVT) [23]. These DOE techniques are tailored so as to provide information over the whole space using a reasonable number of samples in higher dimensions. From an implementation point of view, it is important that the variables be scaled for the construction of the SVM.

Refinement of the SVM boundary. Adaptive sampling.
The initial approximation of the boundary using a DOE might not be accurate and needs to be refined while maintaining a reasonable number of calls to the acoustic model. This refinement is performed using an adaptive sampling scheme that was developed by the first author and his team and is described in [17]. The basis of the scheme is to select a sample in the sparse regions of the space (i.e., as far away as possible from existing sample) and also in the regions of highest probability of misclassification by the SVM. The latter criterion is obtained by locating the samples on the SVM. In order to illustrate the foundation of the algorithm, Figure 2 depicts an SVM constructed from two classes of samples (circles and stars) which is subsequently refined using an adaptive sample located in the most sparse region on the boundary.
Formally, the sample is found by solving the following optimization problem: x 1 x 2 x 1 where x nearest is the closest training sample (i.e., the one with minimum distance). This is a global (non-smooth) "max-min" optimization problem that can either be solved using a global optimizer such as a Genetic Algorithm or using a local optimizer with different starting points. A gradient-based technique such as Sequential Quadratic Programming (SQP) can be used by reformulating the problem into a differentiable one as detailed in [17].

Probability estimates
Once an SVM boundary is constructed, the probability that a configuration belongs to a specific class (e.g., belongs to the region of the space corresponding to self-sustained oscillations) can be obtained through Monte-Carlo simulations [24]. Given the probability density functions of the parameters (e.g., the blowing pressure follows a normal distribution), the probability P f of belonging to the "positive" class is approximated using N M C samples p i : where I s is the indicator function defined as:

CASE STUDY: THE CLARINET
In order to demonstrate the proposed methodology for the mapping of acoustic regimes and provide the reader with the necessary background, this section focuses on clarinets. It is an arbitrary choice and any other musical instrument could have been chosen. An explanation of the physics involved in the production of sound is first provided. A simplified clarinet model is subsequently described.

The physics -Fundamental equations
By blowing air into the instrument through the reed channel ( Figure  3), the player destabilizes the reed from its rest position. The oscillations of the reed modulate the incoming air flowũ(t), thus exciting the acoustic resonances of the air column inside the instrument. The resulting pressure fluctuationsp(t) in the mouthpiece amplify the reed oscillations, thus contributing to an increased modulation of the incoming air flow. Therefore, the instability is amplified through a feedback loop. The self-sustained oscillations are expected to occur at a frequency close to a resonance frequency of the air column. However, the reed is a cane plate and has its own mechanical resonances : undesired squeak sounds may be produced if the instability occurs close to one of these mechanical resonance frequencies (usually the one corresponding to the first flexural mode for the reed). Clarinet players learn to avoid these squeak sounds by properly adjusting two main control parameters : the blowing pressure inside the mouth, and the force applied by the lower lip on the reed (which alters the position of the reed at rest, thus the height of the reed channel).
The model has been detailed and discussed in [25] and only the resulting fundamental equations are given in this section. For the sake of simplicity, the dynamic behavior of the reed has been omitted. Considering as a reference the pressure p M = KH required to close the reed channel in the non-oscillating case (where K is the reed surface stiffness and H is the height of the reed channel at rest), we introduce the following dimensionless quantities for pressure in the mouth and in the mouthpiece, and for volume flow.
where Z c = ρc S is the characteristic impedance for plane waves inside the resonator of cross section S, ρ is the air density and c is the sound velocity. Likewise it is convenient to define a dimensionless reed position : and ζ = Z c W H 2(ρp M ) −1 where W is the width of the reed. The two dimensionless parameters controlled by the player for a given fingering are γ and ζ, the blowing pressure and an embouchure parameter respectively.
The air flow. Mainly based on Hirschberg's considerations [26], an explicit expression for the air flow u is given below: The first equation corresponds to the case of an open reed channel. In that case, the incoming air flow depends only on the pressure drop γ−p(t) between the mouth and the mouthpiece. When the tip of the reed gets in contact with the lay, it completely closes the reed channel, therefore canceling the air flow. This is expressed by the second equation. In this case, it is noteworthy that the effect of the reed dynamics on the air flow is ignored. This approximation is valid at low frequency, i.e. when the frequency of the note played is much lower than the first resonance frequency of the reed.
Continuous time equations.. We consider a cylindrical bore (with length L) for the clarinet. The model is the wave equation inside the tube, with Neumann and Dirichlet boundary conditions at the input and output of the bore respectively, and a source term that accounts for the airflow blown inside the instrument. Modal coordinates p n (t) of the mouthpiece pressure are calculated through the projection on each mode in the time domain. The expansion onto the modes is truncated to the m first modes: . . .
where ω n = (2n − 1) 2πc 4L are the resonance angular frequencies of the air column, and Q n are the quality factors of the resonances. In equation (10), u is calculated using equations (8) and (9) with the pressure p calculated as the sum of its modal components: p(t) = m n=1 p n (t).
Equations (10) corresponds to an input impedance for the clarinet defined as: The quality factors can be derived analytically [4]. Assuming that the radius is small in comparison to the wavelength and the phase velocity is equal to the speed of sound, a good approximation of the quality factors is: where γ n = (2n−1)π 2 , k n = γn L , µ is the viscosity, ρ is the density. α 1 is related to the absorption coefficient and is equal to 1.044 in this work (see [4] for details). Unless otherwise stated, the results presented in the remaining of this paper were obtained with a resonator length equal to L = 1m, an interior radius equal to R = 7mm, a viscosity µ = 1.708 × 10 −5 kg.m −1 s −1 , and a density ρ = 1.29 kg.m −3 .

Numerical Implementation
The system of equations (10) is solved using ode solvers. For this purpose, the second order odes are reformulated into a system of 2m first order odes. As multiple time scales are involved in the problem (duration of blowing pressure transient, bore resonance frequencies, reed resonance frequency and reed-lay contact duration), an ode solver designed for stiff problems, namely ode15s from the Matlab ode Suite was used. Note that in order to obtain consistent and robust pressure time series, the relative and absolute convergence tolerances were tightened to 10 −5 and 10 −7 respectively.

KEY FEATURES OF THE APPROACH IN PRACTICE
In this section, the key features and potential of the approach are presented in the context of musical acoustics. These features are demonstrated through several test cases based on the simplified single reed instruments model described in the previous section.

Efficiency of the adaptive sampling
In order to highlight the efficiency of the adaptive sampling, the first set of results is based on the separation between regimes producing sounds and the soundless ones. We first use a model of clarinet with one mode (Equation (10) with m = 1).
Soundless configurations are obtained if the initial oscillations die down and reach a static regime, as shown in Figure 4. On the other hand a sound is produced if self-sustained auto-oscillations are reached as depicted in Figure 5. In order to differentiate between the two states, a simple tentative criterion is used: the oscillation amplitude is averaged over the last third N 2/3 of the time series. For a large enough time, the average value is compared to an arbitrary value 1 . Formally, the criterion reads: 1 N 2/3 N 2/3 p(t i ) ≤ 1 Static regime (i.e., no sound).
The first boundary is constructed in the (ζ, γ) space (adimensional reed channel opening and mouth pressure). For a given instrument design, these two parameters can be considered as the most influential control parameters. Figure 6 depicts the corresponding boundary constructed using 20 DOE samples and 30 adaptive samples.
The theoretical threshold for the soundless configurations can be derived analytically [4]: where α = π 2 16QL . Q is the quality factor set to 40 for this problem. The corresponding boundary is superimposed to the SVM approximation in Figure 6. In the case a total of 50 samples were used (20 DOE samples and 30 adaptive), there is a small difference between the theoretical and SVM boundary. This difference disappears in the case when 80 adaptive samples are used as showed in Figure 7.  This result reveals an important and well known conclusion: for most of the reed channel opening (represented by ζ), a sound is obtained if the pressure in the mouth (represented by γ) is approximately larger than one third. For small values of ζ, this is no longer valid with a threshold asymptotically increasing.
The example is also used to show the importance of the adaptive sampling scheme. For this purpose, the same boundary was created using a static design of experiments with 50 samples (i.e., no adaptivity), thus leading to a rather inaccurate boundary (Figure 6 b). The advantage of the adaptive sampling scheme was shown to become more pronounced as the dimension increases [17].
The second boundary is constructed in the (ζ, γ, Q) space (Figure 8), which, in this case, is assumed to be freely imposed. The boundary is based on 50 DOE and 100 adaptive samples. As expected, it shows that the lower the quality factor is, the higher the oscillation threshold. This is due to the fact that more losses in the resonator should be compensated by an additional amount of energy (i.e. a larger blowing pressure). Through the two previous simple problems, it appears that the approach proposed in this paper could be used as a new way of studying the oscillation threshold in musical instruments. Note that other approaches in the literature use analytic developments around the static solution [3,27,28], numerical continuation of Hopf points [8] or regular sampling of the design space [11]. The proposed method generalizes these attempts by removing the restriction on the types of models (black-box models can be used) and by providing a sampling strategy more effective than a simple grid approach.

Ability to converge towards complex boundaries
To demonstrate the ability of the method to generate complex boundaries, this set of results provide examples related to the playing frequency. The frequency criterion is based on the difference between the actual frequency of the signal f act and a reference frequency f ref . It is typically expressed in cents. The number of cents N cents is defined as:  Figure 9: Depiction of the frequency criterion. The light green strip represents acceptable playing frequencies with a reference frequency chosen as f 1 . Possible jump from one peak of the frequency response function to another, thus leading to a discontinuity.
The criterion chosen compares N cents to a user defined threshold 2 . The reference frequency can be the frequency of a note (e.g., 440Hz). In our work we have used the natural frequencies of the resonator as reference or notes from the equal-tempered scale. The actual frequency of the signal was obtained using the freely available code Yin [29].
It is noteworthy that the frequency of the produced sound can, for instance, jump from one neighborhood of the resonators frequencies to another. That is, the signal frequencies can be discontinuous, thus requiring specific approaches such as the classification technique proposed for the construction of the maps. Figure (9) depicts the frequency criterion along with possibility of a "jump".
The criterion is applied to the clarinet model with two modes (Equation (10) with m = 2). The quality factors where approximated using analytical expressions available in Equation (12). The criterion aims at separating the configurations within a given number of cents from a specific frequencies (e.g., the resonator's natural frequencies or a given pitch) and the other configurations, including the static regime configurations (i.e., soundless ones). As pointed previously, it is worth insisting on the fact that the use of a classification technique is justified by the fact that the frequencies are discontinuous.
In this experiment, the criterion is used to identify the playing frequencies that are within 5 cents of the first natural frequency of the resonator. The natural angular frequencies of the resonator are: For a resonator of length L = 1m, this leads to a first and second natural frequency of 85.75Hz and 257.25Hz respectively. Figure 10 depicts the corresponding map constructed from a design of experiments with 100 samples and 180 adaptive samples generated with the scheme described in Section 2. It is noteworthy that despite the apparent simplicity of the map, its accurate construction with a reasonable number of samples is highly dependent on the initial design of experiments. Specifically, in the narrow region of the map corresponding to large values of the opening, if no sample is initially present in this area, the adaptive sampling scheme would have difficulty (i.e., would exhibit a poor convergence rate) to construct the boundary. Figure 10 shows that the reed opening ζ partly dictates the ease of play of a given note. If the opening is too large (little support of the reed by the lip, i.e. high values of ζ), the blowing pressure γ must be very precisely controlled to play in tune. On the contrary, when the lip reduces the opening of the reed channel, playing in tune becomes easier for the musician because a lower accuracy is required on the control of the blowing pressure. To the authors' knowledge, this has rarely been addressed in the literature with the exception of a very recent work [30].
The same experiment is repeated for the second register. In order to increase the number of cases reaching the second register (i.e., the second natural frequency of the resonator), the initial condition of the second component of the adimensional pressure in the modal basis was set to 0.9 while the first component was set to 0.09. Figure 11 depicts the region of the (γ, ζ) space where the playing frequency is within 5 cents of the second register. The map was constructed using 50 initial DOE samples and 100 adaptive samples. In order to demonstrate the flexibility of the approach and study the influence of initial conditions, a variable was introduced whose purpose is to weigh differently the initial condition of the first and second components of the pressure in the modal basis. The weight β is chosen so that p 1 (t = 0) = β and p 2 (t = 0) = 1 − β. This represents of course an artificial problem whose only purpose is to demonstrate the various types of parameters that can be involved in the construction of the maps. On a side note, the ability to control the registers to be reached can be useful for sound synthesis.
In a three-dimensional space (β, γ, ζ), we wish to identify the region of the space leading to the second register within 5 cents as in the previous problem. Figure 12 depicts the results obtained with 100 initial DOE samples and 80 adaptive samples. As expected, when the initial condition on p 2 increases (i.e., β decreases), the region of the space within 5 cents of the second register also increases. Figure 12 highlights the strong impact of initial conditions on the behavior of the dynamical system. If β is between 0.4 and 1, it is impossible to play in tune on the second register regardless of the parameter values γ and ζ.

Probability estimates
As explained in Section 2.3, SVM can be used for the calculation of probabilities of belonging to either the "positive" or "negative" region of the space. Given probability density functions for the parameters, the probability of belonging to a region of interest can be efficiently computed using Monte-Carlo simulations with Equation 5.
A probabilistic approach is particularly interesting in the context of analyzing or designing musical instruments since control parameters and design parameters follow statistical distributions and are subjected to uncertainties. For instance, the blowing pressure might be assumed to follow a specific statistical distribution (e.g., normal) or the manufacturing tolerances might introduce uncertainties that with influence the acoustic behavior of the instrument. As an example, consider the map depicted in Figure 13 describing the region where the playing frequency is within 5 cents of the first resonator frequency. We wish to evaluate the probability of satisfying the intonation criterion knowing that the parameter γ and ζ follow normal distributions with identical means and standard deviations: γ ∼ N (0.5, 0.05) and ζ ∼ N (0.5, 0.05). Figure 13 depicts the corresponding joint distribution over the map with 10 5 Monte-Carlo samples. The resulting probability of belonging to the region with an "acceptable frequency" is 6.3%. To the authors knowledge, it is the first time that uncertainty is introduced in the investigation of tuning or playability.

A simple example of optimization for intonation
The ability to generate maps and to assess the probability of belonging to specific regions provides a framework to perform design optimization. As a demonstrative example, we wish to find the optimal length of a resonator so as to maximize the probability of having a playing frequency within 5 cents of the given note from the twelve-tone equal temperament scale. This "design for intonation" is of major practical importance in the world of musical instruments. As an example, consider the closest frequency in the equal temperament scale to the first natural frequency of a 1 m long resonator (85.75Hz). The corresponding frequency is found to be 87.30 Hz (note F2). The objective is to find the optimal length L * of the resonator that will maximize the probability of playing F2 within +/− 5 cents as a function of γ and ζ. Formally, this can be written as: where Ω is the region satisfying the intonation criterion. The region of interest is depicted in Figure 14. It was constructed using 100 DOE samples and 400 adaptive samples. Note that the region is rather thin and would not be easily obtainable without adaptive sampling. For a given value of the length, the probability can be estimated using Monte-Carlo simulations as in Section 2.3. In this work, the optimal value of L is searched within the interval [0.9, 1.10] m. Two cases of probability distributions are used for γ and ζ: normal N (0.5, 0.05) and uniform U (0, 1). The corresponding probabilities as a function of the length are depicted in Figure 15 as well as the corresponding optima. The optimal length is 0.97 m in the normally distributed case and 0.98 m for uniformly distributed variables.
Because this is a one dimensional optimization problem, the optimal length can be obtained by testing an array of cases. For higher dimensional optimization problems (including for instance side hole positions and sections), dedicated optimization techniques should be used.

CONCLUSION
A methodology was proposed to map the acoustic behaviors of wind instruments. A map of the acoustic regimes is accurately constructed using a technique referred to as explicit design space decomposition. This approach, based on an SVM classifier, enables one to accurately define explicit boundaries of the region of interest in terms of the selected parameters (e.g., blowing pressure and reed opening).
The results demonstrate the ability of the proposed approach to provide an understanding of the coupling between the parameters that could not be obtained otherwise. This difficulty stems from the highly nonlinear nature of the sound production in wind instruments. The maps produced for the two criteria are representative of the complexity of the phenomenon and the strong coupling between the parameters. In addition, these examples also demonstrate the potential high sensitivity of the acoustic behavior to small perturbations and uncertainties that the proposed technique is able to propagate. Finally, beyond analysis, this paper has demonstrated that the proposed mapping can be used as a tool for design. To the authors knowledge, this represents the first attempt to generate such maps.
The next steps of the research will include studies in higher dimensional spaces with more accurate models. In addition, the approach will also be tested to generate maps obtained experimentally with an artificial mouth [31,32] using a reasonable number of measurements. Finally, the mapping technique will be used to attempt instrument design optimization.

ACKNOWLEDGMENTS
This study was performed during a visit of the first author to the CNRS in Marseille, France. This work was performed within the framework of the Labex MEC (ANR-11-LABX-0092) and has received support from the french National Research Agency (project AMidex (ANR-11-IDEX-0001-02), and project CAGIMA (ANR-11-BS09-0022)). The support of the National Science Foundation for the explicit design space decomposition part (grant