Sound simulations by physical model are interesting to transcribe the physics underlying the functioning of a musical instrument. These simulations make it possible to create virtual sounds with a mode of operation representative of the interaction musician/instrument (driving a sound by the causes that create it). The work consists in studying the contribution of machine learning (ML) methods in the optimization of a musical instrument. The application concerns the brass instruments (trumpets). From a training set of virtual instruments, ML methods are trained to model the intonation (represented by the equivalent fundamental pitch) and the ease of emission (represented by the threshold pressure obtained by linear stability analysis) of sounds, according to the modal parameters of the input impedance. With the ML models, an optimization with genetic algorithms is next carried out to improve the intonation and the ease of emission. The last stage of the approach consists in the optimization of the bore of the instrument (optimization of the shape of the leadpipe). The results show that the approach gives promising results: optimal instruments are actually efficient when re-simulated with the physical model. The manufacturing of an optimal instrument is in progress to confirm the validity of the approach