<figure><img src="image_1.png" /></figure>

HAL
open science

# Prediction of trumpet performance descriptors using machine learning

Mimoun Mohamed, Vincent Fréour, Christophe Vergez, Keita Arimoto, Valentin Emiya, Bruno Cochelin

<figure><img src="image_2.png" /></figure>

## To cite this version:

Mimoun Mohamed, Vincent Fréour, Christophe Vergez, Keita Arimoto, Valentin Emiya, et al. Prediction of trumpet performance descriptors using machine learning. Acta Acustica, 2024, 8, pp.65. 10.1051/aacus/2024042. hal-04800851

HAL Id: hal-04800851

https://hal.science/hal-04800851v1

Submitted on 25 Nov 2024

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_3.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Prediction of trumpet performance descriptors using machine learning

Mimoun Mohamed<fnref n="1" />,<fnref n="2" /> ID, Vincent Fréour<fnref n="3" />,<fnref n="4" />*, ID, Christophe Vergez<fnref n="4" /> ID, Keita Arimoto<fnref n="3" />, Valentin Emiya<fnref n="1" /> ID, and Bruno Cochelin<fnref n="4" /> ID

Received 2 April 2024, Accepted 23 July 2024

**Abstract** – Based on a physical model of a trumpet's functioning, the numerical continuation approach is used to construct the model's bifurcation diagram, which depends on the instrument's acoustic characteristics and the musician's parameters. In this article, we first identify 10 descriptors that account for the main characteristics of each bifurcation diagram. It is first shown that these descriptors can be used to classify four professional trumpets with a recognition rate close to 100%. The XGBoost algorithm is used for this purpose. Secondly, we evaluate the ability of different classical machine learning algorithms to predict the values of the 10 descriptors given the acoustic characteristics of a trumpet and the value of the musician's parameters. The best surrogate model is obtained using the LassoLars method, trained on a dataset of 12,000 bifurcation diagrams calculated by numerical continuation. Training takes just 2 min, and real-time predictions are accurate, with an error of approximately 1%. A software interface has been developed to enable trumpet designers to predict the values of the descriptors for a trumpet being designed, without any knowledge of physics or nonlinear dynamics.

**Keywords:** Brass instruments, Bifurcation diagram, Machine learning, Performance descriptors, Trumpet design

## 1 Introduction

Across various engineering domains, physical modeling has become a widely used strategy to simulate and predict the behavior of physical systems. In musical acoustics, physical models of musical instruments have been developed over the last few decades for sound synthesis and to better understand the underlying mechanisms behind the functioning of musical instruments. These models also elucidate the relationships between design and acoustic responses such as intonation, ease of blowing, and timbre. Being able to numerically compute quantitative descriptors associated with the functioning of musical instruments can be crucial for instrument makers, as it enables virtual prototyping as a tool in the development process of new instruments. Another important benefit of virtual prototyping is the potential savings in time and resources typically associated with producing hardware prototypes through traditional trial-and-error procedures. Altogether, providing musical instrument designers with numerical tools based on physical modeling is highly appealing for assisting the development of new instruments.

In musical acoustics, physical models of brass instruments have been proposed using a modal description of the exciter (the lips) and the resonator (the air column), along with a nonlinear flow equation that couples the two linear systems [1]. These models have shown great capability in reproducing the behavior of brass instruments [2–4] and offer a system description with a relatively limited number of equations. They also provide enough precision to compare instruments with slight design changes if modal parameters of the instrument are computed or extracted from measurements with enough accuracy [5–7]. Different outputs can be extracted from these models, depending on the numerical method applied. The bifurcation diagram is an object that represents the evolution of a system’s solution with respect to one or several parameters. The solution branches and their stability provide a global image of the model’s behavior from which performance descriptors of the instrument can be extracted [5]. Numerical continuation is one method to compute the solution branches and the bifurcation diagram of a trumpet. The Asymptotic Numerical Method, associated with the Harmonic Balanced Method and implemented in the software MANLAB, is one method that has been applied to brass instrument models [8, 9]. Another method, based on a prediction-correction algorithm and

<footnote n="1">¹ Aix Marseille Univ, Université de Toulon, CNRS, LIS UMR7020, Campus de Saint Jérôme – Bat. Polytech, 52 Av. Escadrille Normandie Niemen, 13397 Marseille Cedex 20, France</footnote>

<footnote n="2">² Aix Marseille Univ, CNRS, I2M UMR7373, 3 place Victor Hugo Case 19, 13331 Marseille Cedex 3, France</footnote>

<footnote n="3">³Yamaha Corporation, Research and Development Division, 10-1 Nakazawa-cho, Chuo-ku, Hamamatsu, Shizuoka 430-8650, Japan</footnote>

<footnote n="4">⁴ Aix Marseille Univ, CNRS, Centrale Med, LMA UMR7031, Marseille, France</footnote>

<footnote>*Corresponding author: vincent.freour@music.yamaha.com</footnote>
<figure><img src="image_4.png" /><figcaption>**Figure 1.** Goal: replacing the traditional physical approach with a fast and interpretable machine learning approach.</figcaption></figure>

implemented in the software AUTO, has also been recently applied to wind and brass instrument models [10–12].

Although these continuation methods have demonstrated their efficiency in computing bifurcation diagrams of brass instruments for comparing instruments [5], shedding light on phenomena such as the influence of impedance inharmonicity [10], and the production of ghost notes [12], handling these methods requires theoretical and technical knowledge, making them difficult for a novice to use. Furthermore, selecting the parameters for the model, particularly the lip parameters in brass instruments, is critical since the mechanical parameters of the lips are challenging to estimate experimentally and can significantly impact the model’s behavior. To account for the variability and uncertainty in the lip parameter values, computing solutions for a large number of lip parameter values (virtual players) can be a valid option. Nevertheless, it usually induces a high computational cost, which can be a significant limitation, especially when combined with an optimization routine. Given these constraints, transferring this technology into an “easy-to-use” application for use in a designer’s workshop is not straightforward, and solutions must be found to overcome this issue.

One strategy explored in previous work involves training a machine learning model (surrogate model) to compute solutions at a much lower computational cost than numerical integration or continuation methods. This approach was applied to trumpet bore optimization [7, 14], and in an initial attempt to predict descriptors associated with trumpet bifurcation diagrams [13]. This methodology, which combines physical modeling with artificial intelligence and data-driven methods, has also been applied to other instruments, such as the violin for predicting eigenfrequencies of the violin body [15], and the piano for sensitivity analysis of the dynamic behavior of the soundboard [16].

As depicted in Figure 1, our goal is to precisely compute the outputs of numerical continuation – specifically the bifurcation diagram and its associated descriptors – using a “black box” model that does not require any knowledge of continuation methods and requires very little computa-

tional time. The benefits of this approach are straightforward: 1) the model can be encapsulated into an “easy-to-use” software application that can be used autonomously by a designer, and 2) calculations can be performed for several virtual players to account for uncertainties in lip parameters, providing a richer analysis of an instrument.

In this study, we followed this approach to develop a numerical tool for trumpet designers that allows several descriptors associated with the bifurcation diagram to be computed using machine learning. The article is organized as follows: Section 2 provides an overview of the physical model and bifurcation diagram of a trumpet. Section 3 discusses the generation of the dataset. Section 4 details the application of machine learning models. Finally, Section 5 presents the proposed tool, followed by the conclusions.

# 2 Trumpet bifurcation diagrams

## 2.1 Physical model of a trumpet and bifurcation diagram

We consider here a classical model based on three equations that assumes linear propagation in the resonator. It includes a mechanical equation for the lips, represented by a one-degree-of-freedom damped oscillator, an equation for the resonator, represented by a series of complex modes, and a Bernoulli-like flow equation. Note that lip models with two degrees of freedom can also be considered [17], but we prefer to keep the model simple enough to work with a limited number of parameters for the lips.

Denoting $y$ the vertical lip position, $y_0$ is the lip position at rest, $\omega_b$, $Q_b$, $\mu_b$ and $b$ the lip mechanical parameters (resonance angular frequency, quality factor, mass per surface area, and lip opening width respectively), $s_k$ and $C_k$ with $k \in [1, N]$ the modal parameters (poles and residues respectively) of the $N$ resonances of the acoustic impedance of the instrument, $Z_c$ the characteristic impedance, $u$ the volume flow, $p$ the downstream pressure at the input of the instrument (in the mouthpiece), and $p_0$ the upstream (mouth) static pressure, the model is written as follows:
$$ egin{cases} 
\ddot{y}(t) + \frac{\omega_l}{Q_l} \dot{y}(t) + \omega_l^2(y(t) - y_0) = \frac{1}{\mu_l}(p_0 - p(t)) \\ 
\dot{p}_k(t) = Z_c C_k u(t) + s_k p_k(t), \forall k \in [1, N] \\ 
u = \sqrt{\frac{2|p_0 - p|}{\rho}} b \cdot \text{sign}(p_0 - p) \cdot \theta(y), 
\end{cases} 
\quad (1) $$

with $\theta(y) = \frac{|y|+y}{2}$, $\rho$ the air density, and the mouthpiece pressure $p$ obtained from $p(t) = 2\sum_{k=1}^{N} \Re(p_k(t))$.

This model can be written in a dimensionless form with quadratic nonlinearity, making it easy to analyze using the Asymptotic Numerical Method (ANM) [5]. Bifurcation diagrams, such as the one for a Bb4 (fundamental frequency $f_0 \approx 470$ Hz) shown in Figure 2, can then be computed using the software MANLAB. This bifurcation diagram was obtained with eleven acoustic modes ($N = 11$) enabling an accurate fit on the measured input impedance, and with the following lip parameter values taken from [5] and determined based on values provided in the literature, considering constraints on the blowing pressure levels to generate sound: $Q_l = 3$, $\mu_l = 2$ kg·m⁻², $y_0 = 0.1$ mm, $b = 8$ mm. The natural frequency of the lips $f_l = 382.18$ Hz is obtained by Linear Stability Analysis (LSA) in order to locally minimize the threshold mouth pressure [2].

Note that the bifurcation diagram in Figure 2 reveals an inverse bifurcation. Indeed, measurements of crescendo-decrescendo maneuvers on artificial player systems and musicians usually reveal some hysteresis around the oscillation thresholds [18]. This observation aligns more closely with an inverse bifurcation, although direct bifurcations are likely to occur in real trumpet playing. With the physical model used in this study, direct bifurcations can be obtained, for instance, by reducing the lip position at rest $y_0$, or increasing the value of $Q_l$.

## 2.2 Landmarks of the bifurcation diagram – performance descriptors

A number of specific values can be extracted from the bifurcation diagram, particularly from the $|p|$ and $f_0$ traces. These quantities describe the main features of the solution branches constituting the bifurcation diagram and are closely related to the performance of the instrument with a given set of lip parameters. Therefore, we choose to refer to these values as “performance descriptors”, and we extract 10 of them from the bifurcation diagram, as illustrated in Figure 2. The definitions of these descriptors are provided in Table 1.

It can be considered that for each {player – instrument} pair, these 10 descriptors constitute a quantitative performance evaluation that facilitates comparisons between instruments. Furthermore, using these descriptors, it is possible to reconstruct the skeleton or the outlines of the associated bifurcation diagram.

The final goal of this study is to predict these descriptors using a machine learning model, thereby replacing numerical continuation. Note first that from Figure 2, it appears that $P_{min1}$ and $P_{f0min}$ are almost identical ($P_{f0min}$ is slightly larger than $P_{min1}$), although we are not aware of any theoretical

<figure><img src="image_5.png" /><figcaption>Figure 2. Descriptors associated with the bifurcation diagram of a Bb trumpet for a Bb4. The thin lines represent the unstable branches, while the bold lines represent the stable branches. Detailed definitions of these descriptors are provided in Table 1.</figcaption></figure>

retical reason justifying the observation of the minimum value of $f_0$ on the stable branch nearly at the Hopf bifurcation mouth pressure. Additionally, other descriptors that potentially carry significance for players in terms of instrument performance can be deduced from the 10 descriptors in Table 1: the “hysteresis amplitude” $H = P_{min1} - P_{min2}$, the “dynamic range” $D = p_{max} - p_{min}$, or the “pitch stability” $\Delta f_0 = f_{0max} - f_{0min}$.

## 2.3 Relevance of the descriptors

Initially, we propose to assess the ability of the descriptors to classify high-end trumpets. It is indeed valuable to confirm the relevance of the descriptors extracted from the bifurcation diagram in distinguishing between existing instruments within the same product range (specifically professional instruments).

We consider four real trumpets labeled as B, S, V, and W, along with 800 virtual players to construct a dataset consisting of 3200 bifurcation diagrams. The set of 800 virtual players is generated using uniform sampling of $Q_l$, $\mu_l$, and $y_0$, within boundaries corresponding to ±10% of the parameter values given in Section 2.1. Initially, we classify the trumpets using the 10 performance descriptors
<table><caption>**Table 1.** Definition of the performance descriptors extracted from the bifurcation diagrams.</caption><thead><tr><th>Performance descriptor</th><th>Definition</th></tr></thead><tbody><tr><td>P<sub>min1</sub></td><td>p<sub>0</sub> value at the Hopf bifurcation</td></tr><tr><td>P<sub>min2</sub></td><td>p<sub>0</sub> value at the fold bifurcation</td></tr><tr><td>p<sub>min</sub></td><td>Peak-to-peak amplitude of p at the fold bifurcation</td></tr><tr><td>p<sub>max</sub></td><td>Peak-to-peak amplitude of p at p<sub>0</sub> = P<sub>min2</sub> + 3 kPa</td></tr><tr><td>Slope</td><td>Slope coefficient of a linear fit on the stable branch of the |p| diagram, between abscissa P<sub>min2</sub> and P<sub>min2</sub> + 3 kPa</td></tr><tr><td>f<sub>0min</sub></td><td>Minimum value of f<sub>0</sub> over the stable branch between abscissa P<sub>min2</sub> and P<sub>min2</sub> + 3 kPa</td></tr><tr><td>f<sub>0max</sub></td><td>Maximum value of f<sub>0</sub> over the stable branch between abscissa P<sub>min2</sub> and P<sub>min2</sub> + 3 kPa</td></tr><tr><td>Pf<sub>0min</sub></td><td>p<sub>0</sub> value at f<sub>0min</sub></td></tr><tr><td>f<sub>0</sub> fold</td><td>f<sub>0</sub> at the fold bifurcation</td></tr><tr><td>f<sub>0H</sub></td><td>f<sub>0</sub> at the Hopf bifurcation</td></tr></tbody></table>

<figure><img src="image_6.png" /><figcaption>**Figure 3.** Complete 5-fold stratified cross-validation procedure for hyperparameter search. (1) The dataset is randomly split into a training set and a testing set while maintaining equal proportions of each trumpet in both sets. (2) The training set is randomly split into 5 subsets (or folds) ensuring each trumpet's proportion is preserved across folds. (3) The model is trained on 4 folds and performances are evaluated (validated) on the remaining fold. This process repeats 5 times, resulting in 5 trained models with associated validation performances. (4) The accuracy is computed and averaged over the 5 validation set. (5) Steps (3) and (4) are repeated with different hyperparameter sets, iterating this process 100 times. (6) The hyperparameter set yielding the highest average accuracy is selected. The final model is trained on the entire training set (from step 1) using these hyperparameters. The performance of the final model is evaluated on the testing set to assess its generalization ability.</figcaption></figure>

extracted from these bifurcation diagrams. Subsequently, we interpret the classification results by analyzing the feature importance of the machine learning model.

### 2.3.1 Trumpet classification

Now, we aim to demonstrate that the descriptors extracted from the bifurcation diagrams can effectively classify different trumpets. We utilize the XGBoost algorithm [19], a popular machine learning algorithm for classification tasks based on decision trees. We follow a standard procedure to train the XGBoost classifier. The dataset is split into a training set (75% of the dataset) and a test set (25% of the dataset) while maintaining the same proportion

of each trumpet in each set. To optimize the performance of the XGBoost classifier, we employ a stratified 5-fold cross-validation [20] on the training set to fine-tune its hyperparameters, as illustrated in Figure 3. Adjusting these hyperparameters alters how decision trees are constructed from the training data.

We use the mean accuracy, denoted as ACC<sub>mean</sub>, to evaluate the classification performance. ACC<sub>mean</sub> is computed as the number of correct classifications divided by the total number of classifications. Additionally, we replicate the experiment using descriptors represented in the principal components space. This is achieved by applying Principal Component Analysis (PCA) [21] to the normalized descriptors of the training set before training the
<figure><img src="image_7.png" /><figcaption>**Figure 4.** Confusion matrix for instrument prediction based on descriptors using the XGBoost. Left: features are raw descriptors, ACC<sub>mean</sub> = 81.12%. Right: features are descriptors represented in principal components space, ACC<sub>mean</sub> = 99.50%.</figcaption></figure>

XGBoost classifier. PCA is a statistical method that transforms descriptors into a new coordinate system, emphasizing the variance in the data.

Figure 4 displays the confusion matrices of the classification outcomes using raw descriptors and descriptors represented in the principal components space. Reviewing the confusion matrices reveals that classifying trumpets based on raw descriptors achieve a mean accuracy of 81.12%. However, preprocessing the descriptors using PCA significantly enhances the classification performance, yielding a mean accuracy of 99.50%. In summary, these results underscore the relevance of the performance descriptors in effectively distinguishing between the four instruments.

### 2.3.2 Interpretability of the classification results

To interpret the classification results, we analyze the feature importance using XGBoost. As the XGBoost classifier is based on decision trees, we measure the importance of each feature in the classification by calculating the gain of each feature. Gain quantifies how much each feature contributes to improving the model's accuracy when it makes decisions. Figure 5 illustrates the gain of each feature in both cases: using descriptors represented in the original descriptor space and in the principal components space. Higher gain values indicate that a feature contributes more significantly to the classification process. In essence, features with higher gain values are more important because they lead to greater improvements in the model's accuracy when utilized for decision-making.

In the descriptor space, no descriptor appears to be useless for classification. The most important descriptors are $f_{0\text{fold}}$, slope and $f_{0\text{max}}$. This highlights that the bounds of the $f_0$ trace are crucial performance descriptors for distinguishing trumpets in this space. However, relying solely on these descriptors is insufficient, as two trumpets with different virtual players can yield the same $f_0$ bounds.

Looking at the descriptors in the principal components space, it is notable that the most important axes for the classification do not necessarily correspond to those with the highest explained variance ratio. Instead, the second, and then the ninth axes demonstrate larger importance.

Examining the biplot of these axes in Figure 6, we observe that they primarily differentiate between trumpets. Even though the variance ratio on the ninth axis is almost negligible, these results are stable across all the validation splits of the cross-validation scheme. The robust classification performance of the XGBoost classifier using descriptors represented in the principal components space arises from its effective ability to distinguish between trumpets through decision trees in this transformed space. This study demonstrates that the selected set of performance descriptors can identify trumpets with minimal error. Therefore, we can try to generate these descriptors without solving the classical physical model. This approach would enable the creation of a fast and easy-to-use tool for trumpet designers.

## 3 Prediction of performance descriptors

In this section, we outline the machine learning models utilized to predict the performance descriptors extracted from trumpet bifurcation diagrams. Firstly, we define the problem statement and discuss the virtual instruments and players employed to generate the training set. Following this, we present the results of a benchmark that compares the effectiveness of different machine learning algorithms in predicting the descriptors of bifurcation diagrams, providing insights into the most effective algorithm. Finally, we elaborate on the machine learning model chosen to predict the performance descriptors of the bifurcation diagrams.

### 3.1 Virtual instruments and virtual players

As explained in Section 2.1, the primary objective of this work is to replace numerical continuation calculations with a machine learning model capable of predicting the 10 descriptors outlined in Table 1 for a specific trumpet identified by its input impedance. Our goal is to replace each of the $n_p$ virtual players, characterized by their lip parameters, with a machine learning model that can predict the 10 descriptors of the bifurcation diagram based on a given input impedance. To achieve this, it is crucial to generate
<figure><img src="image_8.png" /><figcaption>**Figure 5.** Gain – improvement in accuracy – of each feature in the XGBoost classifier. Left: features are raw descriptors. Right: features are descriptors represented in principal components space.</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>**Figure 6.** Biplots of the principal component analysis axes with the highest gain in XGBoost classifier. The explained variance ratio of the axes is in parentheses. Arrows in the biplot represent descriptors. The direction of each arrow indicates increasing values for that descriptor, while the arrow's length represents the descriptor's contribution to overall variation in the dataset.</figcaption></figure>

a dataset that includes performance descriptors for a suffi-
ciently large number of virtual instruments defined by their
input impedance, specifically by their modal parameters.
Moreover, we stress the importance of the model's accuracy
and reliability, especially within the design space – the
range of modal parameters that encompasses various
instruments. Therefore, the training set must be representa-
tive of the modal parameter space of real instruments,
ensuring that the model performs accurately across this
space.

To ensure coverage of the virtual trumpets' conditions,
modal parameters from impedance measurements of nine
commercial trumpets from different makers are extracted
using the high-resolution ESPRIT method [22]. These
modal parameters set boundary values for each of the 11
modes defining the input impedance of the instruments.

The input impedance, decomposed into complex modes
characterized by their complex poles $s_k$ and residues $C_k$,
defines a design space of dimension $n_d = 44$. Subsequently,
a total of $n_t = 200$ virtual trumpets are generated by ran-
domly sampling these 44 parameters from a uniform distri-
bution within the bounds provided by the measurements of
the nine professional trumpets.

Figure 7 depicts the corresponding impedances of the
200 virtual trumpets. For this study, focus is placed on

the note B♭4 (with $f_0 \approx 470$ Hz), whose fundamental fre-
quency lies between the fourth and fifth impedance peaks.
To provide a detailed examination of the impedances of
the virtual instruments around this fundamental frequency,
a zoom around the fourth and fifth peaks is presented in
Figure 8.

As previously mentioned, a significant advantage of
machine learning is its low computational cost, allowing
consideration of various virtual players for each instrument.
Each virtual player is defined by four parameters ($Q_b$, $\mu_b$, $y_0$,
and $b$), with the lip natural frequency $f_l$ calculated by LSA
for each {player – instrument} pair. A set of $n_p = 60$ virtual
players is generated using Latin hypercube sampling of
$Q_b$, $\mu_b$, and $y_0$, constrained within boundaries corresponding
to ±10% of the parameter values outlined in Section 2.1
(Fig. 9). It's worth noting that these boundaries in the vir-
tual player space are somewhat arbitrary; we assume ±10%
variations represent reasonable expectations for differences
among human players or variations within a group of play-
ers of similar playing level.

Overall, the training set comprises a total of 12,000
bifurcation diagrams for the note B♭4, each yielding a set
of 10 descriptors. These diagrams are computed using an
automated Matlab routine and the MANLAB source
code. Given that it takes approximately 3 min to compute
<figure><img src="image_10.png" /><figcaption>**Figure 7.** Normalized amplitude and phase angle of the impedances of the 200 virtual instruments generated to train the machine learning models.</figcaption></figure>

one bifurcation diagram on the computer used for calculations, generating the entire training set required approximately 600 h (equivalent to 25 days) of computational time.

## 3.2 Comparative study of machine learning algorithms

We conducted a comparative analysis of various machine learning algorithms to predict the descriptors of bifurcation diagrams using the dataset generated in Section 3.1. Due to the relatively small size of the dataset, we focused on machine learning algorithms known for their performance on small datasets. The problem at hand is a regression task, where the objective is to predict each descriptor from the trumpet's impedance for each {musician – descriptor} pair. We considered several machine learning algorithms for regression, including linear approaches such as Linear Regression, LassoLars [24], and Ridge Regression [25], as well as Support Vector Machine for Regression (SVR) [26] with various kernels, and Nearest Neighbors [27] approaches. Additionally, we included a baseline algorithm that predicts a constant value for each descriptor, set to the mean of the descriptor in the training set.

We follow a common approach to train the machine learning models (one for each musician-descriptor pair). First, we normalize the dataset by subtracting the mean and dividing it by the standard deviation of each modal parameter. Then, we split the dataset into a training set (75% of the dataset) and a test set (25% of the dataset).

For each algorithm, we employ a 5-fold cross-validation procedure to fine-tune its hyperparameters and evaluate its performance, as illustrated in Figure 3. The chosen performance metric is the Mean Absolute Percentage Error (MAPE), calculated as the mean of the absolute differences between the predicted and true descriptor values, divided by the true descriptor value. Table 2 summarizes these results. Despite its relative simplicity, the LassoLars approach exhibits superior performance compared to other methods in predicting the descriptors values of the bifurcation diagrams, displaying the lowest MAPE for each descriptor. Notably, for frequency descriptors ($f_{0min}$, $f_{0max}$, $f_{0fold}$ and $f_{0H}$), the prediction errors range between 0.5 and 0.7 cents.

## 3.3 Focus on the LassoLars algorithm

In this section, we describe the LassoLars algorithm, which outperforms other algorithms in predicting the descriptors of the bifurcation diagrams.

Consider one of the descriptors obtained from the bifurcation diagram. The question we are exploring is whether, for a given musician, it is possible to predict the value of this descriptor using a linear combination of the $n_d = 44$ modal coefficients and a bias (or intercept). If we consider a single trumpet, the answer is positive, and there are even an infinite number of possible combinations since the problem is linear and underdetermined ($n_d + 1 = 45$ unknowns for a single equation). As we include more trumpets in the training set, the number of equations increases while the number of unknowns remains constant. However, when all $n_t = 200$ trumpets are considered, it is highly unlikely that an exact solution to this overdetermined system exists (200 linear equations for 45 unknowns). Therefore, we seek the best solution that minimizes in the least squares sense, the difference between the 200 predicted descriptor values for the $n_t = 200$ trumpets and the exact descriptor values obtained from their respective bifurcation diagrams. Thus, we aim to solve the following optimization problem for each descriptor $d$ and each musician $m$:

$$ \begin{array}{ll} \min_{w_{m,d} \in \mathbb{R}^{n_d}, w_{m,d}^0 \in \mathbb{R}} & \left\| y_{m,d} - Xw_{m,d} - w_{m,d}^0 \right\|_2^2 \\ \text{with } y_{m,d} \in \mathbb{R}^{n_t}, X \in \mathbb{R}^{n_t \times n_d}. & (2) \end{array} $$

Here, the $i$th coordinate of $y_{m,d}$ represents the descriptor $d$ of the bifurcation diagram of the $m$th musician and the $i$th trumpet. The $i$th row of the matrix $X$ contains the $n_d = 44$ modal coefficients of the $i$th trumpet with $I \in [1, n_d]$. Meanwhile, $w_{m,d}$ is the vector of coefficients of the linear model for the $m$th musician and the descriptor $d$.

However, to make the solution more interpretable, we complete this minimization problem by adding a constraint promoting the sparsest possible solution, i.e., with a maximum number of zero terms among the $n_d = 44$ components of the solution vector $X$. This way, the modal coefficients that contribute most to predicting the value of the descriptor are easily identified. The LASSO method addresses
<figure><img src="image_11.png" /><figcaption>Figure 8. Zoom around the fourth (left) and fifth (right) peaks of the impedances of the 200 virtual instruments.</figcaption></figure>

this problem by incorporating $l_1$ norm regularization into equation (2):

$$ \{\tilde{w}_{m,d}, \tilde{w}_{m,d}^0\} = \arg \min_{w_{m,d} \in \mathbb{R}^{n_d}, w_{m,d}^0 \in \mathbb{R}} \|y_{m,d} - Xw_{m,d} - w_{m,d}^0\|_2^2 + \lambda \|w_{m,d}\|_1 \quad \text{with } \lambda \in \mathbb{R}^+. \quad (3) $$

Here, $\lambda$ serves as a regularization parameter that controls the sparsity of the solution. This optimization problem is known as the Lasso problem [23]. To solve this Lasso problem efficiently, we employ the Lars algorithm [24], a least-angle regression algorithm solving (3) efficiently for a set of well-chosen $\lambda$ values.

Figure 10 represents the bifurcation diagram skeletons generated using the machine learning (LassoLars) approach in solid lines, and using the physical model (continuation method) in dashed lines, for 3 players and 2 trumpets that the model has not encountered during its training. For the $|p|$ diagram, it can be seen that the LassoLars algorithm accurately predicts the bifurcation diagrams of the trumpets it has not encountered during its training, with an error significantly lower than the inter-instrument and inter-player variability. For the $f_0$ diagram, although the overlap between the prediction and continuation results is not as striking as in $|p|$ diagram, the relative difference between the different curves is relatively well respected, and the slightly higher pitch for one trumpet (blue lines)

<figure><img src="image_12.png" /><figcaption>Figure 9. Lip parameters associated to the 60 virtual players. The red dot represents the baseline virtual player ($Q_l = 3$, $\mu_l = 2$ kg/m$^2$, $y_0 = 0.1$ mm).</figcaption></figure>

is well predicted by the machine learning model. Note that the maximum difference in $f_0$ value (along the stable branches) between the two instruments is quite low (about 7 cents), which contributes to explaining why the machine learning prediction may look less accurate in this figure despite the very good performances of the prediction reported in Table 2.
<table><caption>**Table 2.** Mean Absolute Percentage Error (MAPE) and Standard deviation of the Absolute Percentage Error (StdAPE) in predicting descriptor values using various machine learning algorithms on the test set. The best performance for each descriptor is highlighted in bold.</caption><thead><tr><th></th><th>P<sub>min1</sub> (%)</th><th>P<sub>min2</sub> (%)</th><th>p<sub>min</sub> (%)</th><th>p<sub>max</sub> (%)</th><th>Slope (%)</th></tr></thead><tbody><tr><td>Baseline</td><td>5.75 ± 0.01</td><td>4.75 ± 0.01</td><td>4.24 ± 0.01</td><td>1.56 ± 0.01</td><td>1.38 ± 0.01</td></tr><tr><td>LassoLars</td><td><strong>0.57 ± 0.02</strong></td><td><strong>0.41 ± 0.03</strong></td><td><strong>0.76 ± 0.03</strong></td><td><strong>0.48 ± 0.02</strong></td><td><strong>0.8 ± 0.05</strong></td></tr><tr><td>Linear regression</td><td>0.72 ± 0.06</td><td>0.67 ± 0.07</td><td>1.09 ± 0.07</td><td>0.66 ± 0.05</td><td>1.04 ± 0.07</td></tr><tr><td>SVR (linear)</td><td>0.71 ± 0.07</td><td>0.65 ± 0.05</td><td>1.1 ± 0.08</td><td>0.67 ± 0.05</td><td>1.06 ± 0.07</td></tr><tr><td>Ridge regression</td><td>0.72 ± 0.06</td><td>0.67 ± 0.07</td><td>1.08 ± 0.07</td><td>0.66 ± 0.05</td><td>1.04 ± 0.07</td></tr><tr><td>SVR (nonlinear)</td><td>1.21 ± 0.08</td><td>1.17 ± 0.06</td><td>1.43 ± 0.07</td><td>0.7 ± 0.04</td><td>0.98 ± 0.04</td></tr><tr><td>Nearest neighbours</td><td>4.62 ± 0.15</td><td>3.71 ± 0.12</td><td>3.49 ± 0.12</td><td>1.29 ± 0.04</td><td>1.13 ± 0.04</td></tr><tr><td></td><td><u>f<sub>0min</sub> (%)</u></td><td><u>f<sub>0max</sub> (%)</u></td><td><u>P<sub>f0min</sub></u></td><td><u>f<sub>0 fold</sub> (%)</u></td><td><u>f<sub>0H</sub> (%)</u></td></tr><tr><td>Baseline</td><td>0.26 ± 0.001</td><td>0.27 ± 0.001</td><td>3.81 ± 0.01</td><td>0.26 ± 0.001</td><td>0.25 ± 0.001</td></tr><tr><td>LassoLars</td><td><strong>0.04 ± 0.002</strong></td><td><strong>0.04 ± 0.003</strong></td><td><strong>0.59 ± 0.03</strong></td><td><strong>0.03 ± 0.002</strong></td><td><strong>0.04 ± 0.002</strong></td></tr><tr><td>Linear regression</td><td>0.05 ± 0.003</td><td>0.05 ± 0.004</td><td>0.85 ± 0.06</td><td>0.05 ± 0.003</td><td>0.06 ± 0.01</td></tr><tr><td>SVR (linear)</td><td>0.05 ± 0.005</td><td>0.06 ± 0.005</td><td>0.86 ± 0.06</td><td>0.05 ± 0.004</td><td>0.06 ± 0.01</td></tr><tr><td>Ridge regression</td><td>0.05 ± 0.003</td><td>0.05 ± 0.004</td><td>0.84 ± 0.06</td><td>0.05 ± 0.003</td><td>0.06 ± 0.01</td></tr><tr><td>SVR (nonlinear)</td><td>0.05 ± 0.003</td><td>0.06 ± 0.004</td><td>1.1 ± 0.06</td><td>0.05 ± 0.003</td><td>0.07 ± 0.01</td></tr><tr><td>Nearest neighbours</td><td>0.2 ± 0.01</td><td>0.2 ± 0.01</td><td>3.12 ± 0.1</td><td>0.2 ± 0.01</td><td>0.19 ± 0.01</td></tr></tbody></table>

<figure><img src="image_13.png" /></figure>

<figure><img src="image_14.png" /><figcaption>**Figure 10.** Bifurcation diagram skeletons generated using the machine learning (LassoLars) model (solid line) and the continuation method (dashed line) for 2 trumpets (blue and purple) the model has not encountered during its training, considering 3 players.</figcaption></figure>

We can conclude that the LassoLars algorithm is a reliable and robust model for predicting the descriptor values of bifurcation diagrams. Moreover, as detailed in the next section, the embedded sparsity constraint allows an insight-

ful interpretation of the influence of modal coefficients on the descriptors of the bifurcation diagrams.

## 3.4 Interpretability of the LassoLars algorithm

We proceed to interpret the influence of modal coefficients on the descriptors of the bifurcation diagrams using the LassoLars algorithm by looking at the amplitude of $\tilde{w}_{m,d}$ coefficients. Each coefficient of $\tilde{w}_{m,d}$ represents the impact of the corresponding modal coefficient on the target descriptor/musician pair. Due to its inclination towards sparse solutions, we can discern the impact of modal coefficients on descriptors by examining the non-zero coefficients of the linear model.

Figure 11 illustrates the normalized importance of modal coefficients in predicting $P_{min1}$, averaged over all virtual players. We compute this importance by obtaining

the mean $\tilde{w}_{mean,P_{min1}}$ where $\tilde{w}_{mean,P_{min1}}^i = \frac{1}{n_p} \sum_{m=1}^{n_p} \frac{|\tilde{v}_{m,P_{min1}}^i|}{||\tilde{v}_{m,P_{min1}}||_1}$,

$i \in [1, n_d]$ and examining the modal coefficient associated with its highest coefficients. Notably, the 4th and 5th acoustic modes contribute to over 60% of the importance in predicting $P_{min1}$. This is quite coherent with the underlying physics of sound production. Indeed, due to the nonlinear coupling between the lips and the instrument, the fundamental frequency of the Bb4 lies between the 4th and 5th impedance peaks. In other words, the impedance “seen” by the instrument at the fundamental frequency strongly depends on these two resonances. Therefore, this is consistent with the expectation that the modal parameters of the 4th and 5th modes will have a significant effect on the dynamics of the system, especially concerning threshold blowing pressures.

## 4 Tool for trumpet designers

To make this technology easily used by trumpet designers, a software tool was developed, enabling the 10 descriptors to be computed for the 60 virtual musicians from given
<figure><img src="image_15.png" /><figcaption>**Figure 11.** Mean and standard deviation of the normalized importance of the top 25 modal coefficients in predicting the $P_{min1}$ descriptor. $\Re(s_k)$ and $\Im(s_k)$ are the real and imaginary parts of the kth resonance pole of the acoustic impedance of the instrument. $\Re(C_k)$ and $\Im(C_k)$ are the real and imaginary parts of the kth resonance residue of the acoustic impedance of the instrument.</figcaption></figure>

<figure><img src="image_16.png" /><figcaption>**Figure 12.** Box plot of descriptors prediction for the 60 virtual players on 3 test instruments (unseen during the model training).</figcaption></figure>

modal parameters as an input and automatically displayed in a convenient and readable way.

In practice, users can input modal parameters for one or multiple trumpets, and the tool returns predicted descriptor values for all virtual players in the form of Figure 12. In this example, the descriptors are calculated for three trumpets that fall within the training space (they respect the boundaries of the modal parameters) but were not used to train the machine learning model. Figure 12 then provides an overview of the characteristics of the three instruments concerning the descriptors. The boxplot representation allows us to observe differences in the medians. For instance, there are differences in intonation (playing frequencies). We also observe a smaller value of the descriptor *slope* (that could also be associated with the dynamic range of the instrument) for trumpet 3 compared to the others. Moreover, it also sheds light on the dispersion around the median, which

we may interpret as the sensitivity of the instrument to the virtual musicians. For instance, trumpet 1 appears less sensitive to the player parameters in terms of the threshold pressure $P_{min1}$ than trumpets 2 and 3. This last aspect is particularly interesting for the comparison of instruments and for predicting the perceived quality, and a benefit of the machine learning model that allows very fast computation of the descriptors for several virtual musicians.

Finally, users can also train a new model by providing a new dataset of modal parameters and descriptors. Regarding computation time, the tool is built with Python programming language, Scikit-learn [28] and Streamlit (https://docs.streamlit.io/get-started), and provides almost real-time computation, with training taking only 2 min and prediction less than 1 s on a regular laptop. A video demonstration of the tool is available under the reference [29].
# 5 Conclusions

In this article, we have proposed an approach to enable trumpet designers to access the results of non-linear dynamics calculations. More precisely, using a machine-learning approach, we have shown that the use of a surrogate model enables the value of 10 descriptors characteristic of the detailed bifurcation diagram to be predicted in less than a second. This result is obtained directly without the need for the user to have any expertise in non-linear dynamics.

Following a benchmark between several classic solutions in the machine learning literature, the article shows that the most accurate model for carrying out this task is obtained by the LassoLars method. To achieve a large enough training set, we showed in the article how to take advantage of the experience acquired in recent years in analyzing the non-linear dynamics of physical trumpet models using numerical continuation. This approach allows constructing detailed bifurcation diagrams that take account of the acoustic characteristics of the instrument (via its input impedance) and the way it is played (via the values of the musician's parameters). The training set was made up of around 12,000 bifurcation diagrams from which the values of 10 descriptors were extracted for each one. Building the training set is the longest stage in our approach since it involves both the physical model and complex analyses of how it works. It corresponds to around 600 h of computation.

From a practical point of view, the solution proposed in the article of a software interface for querying the surrogate model in an instrument-making context responds to two difficulties: firstly, calculation codes in non-linear dynamics require know-how and scientific knowledge that not all musical instrument designers have. Secondly, a database of bifurcation diagrams, even a large one, is by its very nature incomplete, since instrument designers are conceiving instruments that do not yet exist. The solution presented in the article therefore allows musical instrument designers to be autonomous in their exploration of the performance of different trumpets. Even for a model they are currently designing, they can instantly compare it with other trumpets, for different types of musicians.

We defer the analysis of multiple musical notes for further study. That investigation could provide a more comprehensive understanding of trumpet dynamics across its entire range. This would entail examining how different notes influence the instrument's behavior and its interaction with players. Moreover, delving deeper into the modeling of the virtual player could yield valuable insights into the nuanced requirements for trumpet design. This could involve learning to predict the descriptors of the bifurcation diagram from both the virtual player's parameters and the modal parameters of the trumpet using models such as Physics-Informed Neural Networks (PINNs). However, this step towards a more comprehensive surrogate model was beyond the scope of this paper. Regarding the trumpets themselves, the approach proposed in this article could be extended to instruments with modal parameters outside the bounds of the commercial instruments used in this study. Such an

extension would enable trumpet designers to explore instrument behavior beyond the traditional range of modal parameters and compare them with existing instruments.

# Conflicts of interest

We have no conflicts of interest to disclose. All authors declare that they have no conflicts of interest.

# Data availability statement

The audio files are publicly available from GitHub under the reference [29].

# References

1. M. Campbell, J. Gilbert, A. Myers: The science of brass instruments, Springer International Publishing, New York City, USA, 2021.

2. J.S. Cullen, J. Gilbert, D.M. Campbell: Brass instruments: linear stability analysis and experiments with an artificial mouth, Acta Acustica 86 (2000) 704–724.

3. L. Velut, C. Vergez, J. Gilbert, M. Djahanbani: How well can linear stability analysis predict the behaviour of an outward-striking valve brass instrument model? Acta Acustica united with Acustica 103 (2017) 132–148.

4. T. Kaburagi, C. Kuroki, S. Hidaka, S. Ishikawa: Numerical method for analyzing steady-state oscillation in trumpets, Acoustical Science and Technology 44, 3 (2023) 269–280.

5. V. Fréour, L. Guillot, H. Masuda, S. Usa, E. Tominaga, Y. Tohgi, C. Vergez, B. Cochelin: Numerical continuation of a physical model of brass instruments: application to trumpet comparisons, Journal of the Acoustical Society of America 148, 2 (2020) 748–758.

6. V. Fréour, H. Masuda, B. Cochelin, C. Vergez: Identification of lip parameters associated to different trumpets using constrained continuation. in Proceedings of Forum Acusticum 2023, Turin, Italy, 11–15 September, 2023.

7. J.F. Petiot, M. Roatta, V. Fréour, K. Arimoto, Contribution of machine learning and physic-based sound simulations for the characterization of brass instruments, in: Proceedings of Forum Acusticum 2023, Turin, Italy, 11–15 September, 2023.

8. B. Cochelin: A path following technique via an asymptotic-numerical method, Computers and Structures 53, 5 (1994) 1181–1192.

9. B. Cochelin, C. Vergez: A high order purely frequency-based harmonic balance formulation for continuation of periodic solutions, Journal of Sound and Vibration 324 (2009) 242–262.

10. J. Gilbert, S. Maugeais, C. Vergez: Minimal blowing pressure allowing periodic oscillations in a simplified reed musical instrument model: Bouasse-Benade prescription assessed through numerical continuation, Acta Acustica 4 (2020) 27.

11. R. Matteoli, J. Gilbert, C. Vergez, J.-P. Dalmont, S. Maugeais, S. Terrien, F. Ablitzer: Minimal blowing pressure allowing periodic oscillations in a model of bass brass instruments, Acta Acustica 5 (2021) 57.

12. R. Matteoli, J. Gilbert, S. Terrien, J.-P. Dalmont, C. Vergez: Diversity of ghost notes in tubas, euphoniums and saxhorns, Acta Acustica 6 (2021) 32.

13. V. Fréour, M. Mohamed, K. Arimoto, V. Emiya, B. Cochelin, C. Vergez: Machine learning applied to the prediction of trumpet bifurcation diagrams: towards a tool for trumpet designers, in: Proceedings of Forum Acusticum 2023, Turin, Italy, 11–15 September, 2023.

14. R. Tournemenne, J.F. Petiot, B. Talgorn, M. Kokkolaras, J. Gilbert: Brass instruments design using physics-based sound
simulation models and surrogate-assisted derivative-free optimization, Journal of Mechanical Design 139 (2017) 0141401-1-011401-9.

15. S. Gonzales, D. Salvi, D. Baeza, F. Antonacci, A. Sarti: A data-driven approach to violin making, Scientific Reports 11 (2021) 9455.

16. F. Mokdad, S. Missoum: A fully parametrized finite element model of a grand piano soundboard for sensitivity analysis of the dynamic behavior, in: Proceedings of the ASME 2013, Portland, Oregon, USA, August 4-7, 2013.

17. S. Adachi, M.A. Sato: Trumpet sound simulation using a two-dimensional lip vibration model, Journal of the Acoustical Society of America 99, 2 (1996) 1200-1209.

18. V. Fréour, L. Guillot, H. Masuda, C. Vergez, B. Cochelin: Parameter identification of a physical model of brass instruments by constrained continuation, Acta Acustica 6 (2022) 9.

19. T. Chen, C. Guestrin: Xgboost: a scalable tree boosting system, in: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13-17 August, Association for Computing Machinery, 2016, pp. 785-794.

20. D. Berrar: Cross-validation, Encyclopedia of Bioinformatics and Computational Biology 1 (2019) 542-545.

21. H. Hotelling: Analysis of a complex of statistical variables into principal components, Journal of Educational Psychology 24, 6 (1933) 417.

22. R. Roy, T. Kailath: Esprit: estimation of signal parameters via rotational invariance techniques, IEEE Transactions on Acoustics, Speech, and Signal Processing 37, 7 (1989) 984-995.

23. R. Tibshirani: Regression shrinkage and selection via the Lasso, Journal of the Royal Statistical Society: Series B (Methodological) 58, 1 (1996) 267-288.

24. B. Efron, T. Hastie, I. Johnstone, R. Tibshirani: Least angle regression, Annals of Statistics 32, 2 (2004) 407-451.

25. A.E. Hoerl, R.W. Kennard: Ridge regression: biased estimation for nonorthogonal problems, Technometrics 12, 1 (1970) 55-67.

26. V. Vapnik: The nature of statistical learning theory Chapter 5-6, Springer Science & Business Media, Berlin, Germany, 2013.

27. N.S. Altman: An introduction to kernel and nearest-neighbor nonparametric regression, American Statistician 46, 3 (1992) 175-185.

28. F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas: Scikit-learn: machine learning in Python, Journal of Machine Learning Research 12 (2011) 2825-2830.

29. M. Mohamed: A machine learning tool for the prediction of trumpet bifurcation diagrams – Supplementary materials, GitHub, 2024. Available at https://github.com/mimoun-mohamed-lab/Prediction-of-trumpet-descriptors.

**Cite this article as:** Mohamed M. Fréour V. Vergez C. Arimoto K. Emiya V, et al. 2024. Prediction of trumpet performance descriptors using machine learning. Acta Acustica, **8**, 65. https://doi.org/10.1051/aacus/2024042.