Any solutions for audio synthesis for clarinette

Bonjour,
Avez-vous des solutions pour faire une synthèse audio réaliste d’une Clarinnette avec le teensy 4.1
J’ai déjà essayé des codes, mais j’ai jamais quelque chose de concluant.
 
Bonjour,
Avez-vous des solutions pour faire une synthèse audio réaliste d’une Clarinnette avec le teensy 4.1
J’ai déjà essayé des codes, mais j’ai jamais quelque chose de concluant.

TRANSLATION (by translate.google.com):

Hello,
Do you have any solutions for making a realistic audio synthesis of a Clarinet with the teensy 4.1
I've already tried codes, but I never got anything conclusive.

@clement_vrd:

I have created a saved config for a simulated clarinet with the following waveforms/mixes in my TeensyMIDIPolySynth (TMPS) . . . maybe this will give you a good starting point:

Code:
AudioSynthWaveform SINE
AudioSynthWaveform SQUARE
AudioSynthWaveform TRIANGLE
AudioSynthWaveform SAWTOOTH

AudioMixer4 with the following characteristics:
   Input 0 (sine) at gain -1.00
   Input 1 (square) at gain -0.50
   Input 2 (triangle) at gain 0.50
   Input 3 (sawtooth) at gain -0.60

AudioEffectEnvelope with the following characteristics:
   Delay: 0 msec
   Attack: 88 msec
   Hold: 0 msec
   Decay: 750 msec
   Sustain: 0.50 (level)
   Release: 250 msec

NOTES:
- a negative gain setting on a mixer input effectively results in an inverted waveform at the given waveform amplitude * gain
- In the TMPS, I am actually using AudioSynthWaveformModulated objects, but the clarinet recipe does not include any modulation, so AudioSynthWaveform can be used to simplify
- these four waveform generators are fed into a 4-way mixer, and the output from the 4-way mixer is fed into an envelope generator
- in response to a MIDI noteOn(), the waveform generators themselves are initiated at an amplitude set by the individual note velocity (loudness), and the envelope generator is initiated with a noteOn() to start the attack phase
- in response to a MIDI noteOff(), the waveform envelope is initiated with a noteOff() to start the release phase

Here's the (simplified) design diagram:

1767228768444.png


Hope that helps . . .

Feel free to ask more questions !!

Mark J Culross
KD5RXT

EDITED: for clarification of noteOn() & noteOff() behavior
 
Last edited:
Merci pour votre réponse, j'ai essayé votre programme, ça fait déjà un bon son. Cependant le son reste nasillard et pas encore très réaliste, il manque aussi l'aspect soufflé de la note. Et aussi avez vous des thèses de physicien sur la synthèse sonore de la clarinette pour vous aider à faire ces programmes ? ou sinon d'où viennent ces idées de compiler les signaux triangles, carrés etc...
 
It's easy to translate into English with Google Translate.
Thank you for your response, I tried your program, it already sounds good. However the sound remains nasal and not yet very realistic, it also lacks the blown aspect of the note. And also do you have any physicist theses on the sound synthesis of the clarinet to help you create these programs? or else where do these ideas come from to compile the signals triangles, squares etc...
 
@clement_vrd:

For the "blown aspect of the note", you could try mixing in some white and/or pink noise (you would very likely need to both filter the generated noise & apply an envelope generator to it to get the desired "air sound" in the right place, with the right spectral components). You can easily cascade another 4-way mixer to add this additional component.

As for how I arrived at this sound, the short answer is "I tinkered with it on my TMPS until I got the sound that I was looking for". I did not make use of any technical references in that activity. I designed & implemented my TMPS as a generic synthesizer, which ultimately grew to include over 600 different audio objects (modulated waveform generators, filters, modulators, strings, white & pink noise, envelope generators, ladder filter, reverb etc.) which are all routed thru a series of mixers, providing a completely independent/configurable sound processing system that implements a 14-poly 3-voice synthesizer.

Each of the three voices in my TMPS are independent & each includes configurable VFOs (signal level, tuning, etc.) generating the following waveforms: sine, square (with controllable duty cycle), triangle, & sawtooth, where each voice is also able to be modulated by LFOs generating the following waveforms: sine, square (50% duty cycle), pulse (with controllable duty cycle), triangle, sawtooth, sample/hold, white/pink noise, where the modulation can be FM (frequency) or PM (phase), and each LFO can also have its own independent envelope applied as well. The resulting complex waveform can be independently filtered (unfiltered, LP, BP, HP, notch, all with controllable transition frequency, bandwidth, & resonance), where the transition frequency of the filter can also be independently modulated by its own LFO. Each voice can also be configured for its own octave (+/- 3), with an additonal DC offset in the mix, as well as a strings generator.

The capabilities of the Audio Library are absolutely amazing . . . the credit goes to @PaulStoffregen for his implementation . . . I just made use of what he provides !!

Mark J Culross
KD5RXT

TRANSLATION TO FRENCH (using translate.google.com):

@clement_vrd:

Pour l'« aspect soufflé de la note », vous pourriez essayer de mélanger du bruit blanc et/ou rose (il vous faudrait probablement filtrer le bruit généré et lui appliquer un générateur d'enveloppe pour obtenir le son d'air souhaité, avec les bonnes composantes spectrales). Vous pouvez facilement ajouter un autre mélangeur à quatre voies pour ajouter cette composante supplémentaire.

Quant à la façon dont j'ai obtenu ce son, la réponse courte est : « J'ai expérimenté sur mon TMPS jusqu'à obtenir le son que je recherchais ». Je n'ai utilisé aucune référence technique pour cela. J'ai conçu et implémenté mon TMPS comme un synthétiseur générique, qui a finalement évolué pour inclure plus de 600 objets audio différents (générateurs de formes d'onde modulées, filtres, modulateurs, cordes, bruit blanc et rose, générateurs d'enveloppe, filtre en échelle, réverbération, etc.), tous acheminés à travers une série de mélangeurs, offrant un système de traitement du son entièrement indépendant et configurable, implémentant un synthétiseur à 14 voix de polyphonie et 3 voix.

Chacune des trois voix de mon TMPS est indépendante et comprend des oscillateurs configurables (niveau du signal, accord, etc.) générant les formes d'onde suivantes : sinus, carré (avec rapport cyclique contrôlable), triangle et dents de scie. Chaque voix peut également être modulée par des LFO générant les formes d'onde suivantes : sinus, carré (rapport cyclique de 50 %), impulsion (avec rapport cyclique contrôlable), triangle, dents de scie, échantillonnage/maintien, bruit blanc/rose, où la modulation peut être FM (fréquence) ou PM (phase), et chaque LFO peut également avoir sa propre enveloppe indépendante. La forme d'onde complexe résultante peut être filtrée indépendamment (sans filtre, passe-bas, passe-bande, passe-haut, coupe-bande, tous avec fréquence de transition, bande passante et résonance contrôlables), la fréquence de transition du filtre pouvant également être modulée indépendamment par son propre LFO. Chaque voix peut également être configurée pour sa propre octave (+/- 3), avec un décalage CC supplémentaire dans le mixage, ainsi qu'un générateur de cordes.

Les capacités de la bibliothèque audio sont absolument incroyables… le mérite en revient à @PaulStoffregen pour son implémentation… j'ai simplement utilisé ce qu'il propose !

Mark J Culross
KD5RXT
 
Back
Top