Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi
  • Page :
  • 1
  • 2

SUJET : Clipping occurs when using soundfonts...

Clipping occurs when using soundfonts... il y a 9 mois 1 semaine #7

  • Michael
  • Portrait de Michael
  • Hors Ligne
  • New Member
  • Messages : 17
  • Remerciements reçus 5
Thank you for your reply!

Though I don't quite understand what you mean with: "The Attenuation is knit into the soundfont"

You can create headroom as well by adjusting the samples themselves, but then you make those changes permanent. The attenuation gives command the sample cannot be played louder than the specified value, but it doesn't change the sample itself. Or am I wrong.

How does it actually work on keyboards and wavetable-synths? When I play lots of keys together I don't hear clipping. Is that because the audio engine works on a different way then with software sound libraries? Or is there some kind of soft limiter involved: the maximum volume from each invididual tone decreases when you play more than 5 keys simultaneously or something?

Pfff maybe I should stop breaking my head about such things B)
L'administrateur a désactivé l'accès en écriture pour le public.

Clipping occurs when using soundfonts... il y a 9 mois 1 semaine #8

  • ziyametedemircan
  • Portrait de ziyametedemircan
  • Hors Ligne
  • Senior Member
  • Messages : 77
  • Remerciements reçus 20
I can give you some sort of semi-theoretical(!) informations about this:

if per voice at 127 velocity at 0db:

realdB: with: same note, same frequency, same instrument, full volume:
opt1: same instrument, different notes, full volume.
opt2: different instruments, different volumes.
------+---+----+------+------++-----+------+-----+
      |   |    |      |      || real| att. |att. | 
#     | x |    |  (.6)|+(2/3)|| att.| opt*1|opt*2|
of    |fac|real| opt*1| opt*2|| in  |  in  | in  |
voices|tor| dB | dB   | dB   || sf2 | sf2  |sf2  |*3
------+---+----+------+------++-----+------+-----+
    1 |  0|  0 |  n/a |  n/a || n/a |  n/a | n/a |
    2 |  1|  6 |  3.6 |  2.4 ||  15 |    9 |   6 |
    4 |  2| 12 |  7.2 |  4.8 ||  30 |   18 |  12 |
    8 |  3| 18 | 10.8 |  7.2 ||  45 |   27 |  18 |
   16 |  4| 24 | 14.4 |  9.6 ||  60 |   36 |  24 |
   32 |  5| 30 | 18.0 | 12.0 ||  75 |   45 |  30 |
   64 |  6| 36 | 21.6 | 14.4 ||  90 |   54 |  36 |
  128 |  7| 42 | 25.2 | 16.8 || 105 |   63 |  42 |
  256 |  8| 48 | 28.8 | 19.2 || 120 |   72 |  48 |
  512 |  9| 54 | 32.4 | 21.6 || 135 |   81 |  54 |
 1024 | 10| 60 | 36.0 | 24.0 || 150 |   90 |  60 |
 2048 | 11| 66 | 39.6 | 26.4 || 165 |   99 |  66 |
 4096 | 12| 72 | 43.2 | 28.8 || 180 |  108 |  72 |
 8192 | 13| 78 | 46.8 | 31.2 || 195 |  117 |  78 |
16384 | 14| 84 | 50.4 | 33.6 || 210 |  126 |  84 |
32768 | 15| 90 | 54.0 | 36.0 || 225 |  135 |  90 |
65536 | 16| 96 | 57.6 | 38.4 || 240 |  144 |  96 | *4
------+---+----+------+------++-----+------+-----+
opt*1 Also you use the formula *0.6 as not all voices will play simultaneously same note continuously at 0dB (127 velocity) volume. 
opt*2 and add the formula 2/3 for volume factor optimisation 
*3: same as "non optimised real dB value" (surprise!)
*4: 144att. (and up) is useless=> total zero
Example: for 64 voice polyphony: real 36dB * 0.6 = (opt.dB1) 21.6dB => 54att.(sf2 optimized*1) and 54*2/3= 36att.(sf2 optimized*2) // same as realdB
This gives you an advanced-secure output for 1 to 64 voices.
It is better to use these attenuation values in the global part of the preset level.
According to the polyphony limit you set, this value must be the same for each preset:
example: for 64 voices: patch1 : Attenuation 36, patch2 : Attenuation 36, ...and so on ..., patch128: attenuation 36..

and now your sf2-audio-output is optimized for 64 voices. (note.: this operation is causes to an low output volume) Adjust the gain of your DAW for more volume. (increase amplification.)

This is why the companies that produce syhthesizers, used limited-polyphony.
because: they have to adjust the output gain correctly. For an audio-module/keyboard with 64 polyphony, this value will be ~ -21.6dB or ~ -14.4dB for attenuation.

Attention: Almost all of the information here is based on my own experience and calculations. The actual information may be completely different from what is written here. If you follow the information here, I certainly would not take responsibility for bad results.. But I reserved the right to "thank you" for the good results you get. :)
Dernière édition: il y a 9 mois 6 jours par ziyametedemircan. Raison: correction or more confusion :)
L'administrateur a désactivé l'accès en écriture pour le public.
Cet utilisateur a été remercié pour son message par: Michael, Wanda Fish

Clipping occurs when using soundfonts... il y a 9 mois 6 jours #9

  • Wanda Fish
  • Portrait de Wanda Fish
  • Hors Ligne
  • New Member
  • Messages : 8
  • Remerciements reçus 3
I think ziyametedemircan's table looks quite reasonable.
Giving several presets, per number of polyphonic voices, seems a good solution to me.
Btw and nevertheless- it still is a solution that relies on an external gain knob.

You kind of lost me on the example where it says "attenuation 36" over and over, though....

@Michael: Indeed, creating headroom by permanently adjusting the samples would
be a (for a second I was going to say "crime") waste of resolution.
Dernière édition: il y a 9 mois 1 jour par Wanda Fish.
L'administrateur a désactivé l'accès en écriture pour le public.
Cet utilisateur a été remercié pour son message par: Michael

Clipping occurs when using soundfonts... il y a 3 semaines 5 jours #10

  • Michael
  • Portrait de Michael
  • Hors Ligne
  • New Member
  • Messages : 17
  • Remerciements reçus 5
Sorry for the huge delay to reply. But everybody thank you! :D
L'administrateur a désactivé l'accès en écriture pour le public.
  • Page :
  • 1
  • 2
Temps de génération de la page : 0.052 secondes