Connexion
Ce forum permet à des personnes du monde entier de communiquer, c′est pourquoi les messages échangés sont en anglais.

How does Polyphone handle sample volumes

  • BA 43 0
    Message de batata004 le
    Hi,

    I have an instrument with 3 samples for each note (there are only 60 notes). One set of samples is for the velocity range 0-40, the other to 41-100 and third to 101-127.

    All the samples were recorded from an old Yamaha keyboard and I recorded those samples this way: I sent a command to the keyboard to record all first set of notes at velocity 40. Then I normalized the entire audio (to make the loudest note at 0db and all the others kept their relative volume) and exported each note sound to a specific file. Then I did the same for the velocity 100 and then with the velocity 127. At last, I recorded all notes for 3 sets of velocities.

    Then I imported it to Polyphone and I took a look at the default modulator that changes the volume based on the velocity. So I am wondering: how does SoundFont protocol make it work? I mean, I normalized all the 3 velocity ranges to make the loudest note of each velocity range go to 0db (always keeping the other notes at their relative volume, I didnt normalized every single note individually otherwise they would all sound at the maximum volume).

    So I am wondering: how does polyphone make the transition of volume between the velocity range. I Googled this a lot, I found other people with the same question on other forums and there was no explanation. Since there is a modulator, I think the volume varies linearly according to the velocity, right? But this assumes that the samples are at which volume? I dont want to mess with "Attenuation (db)" for each note/velocity range because I already recorded all the sample at the same exacly velocity so their relative volume is perfect (exactly as sounded in the old yamaha keyboard). Or do you have a better method for me to sample this instrument at 3 velocities?

    Thanks a lot! This software is AWESOME! I use it every month to improve my learning into music.
  • BO 308 14
    Message de bottrop le 1
    the soundfont protocol mimics velocity by manipulating Attack, Volume and Filtering, just like your Yamaha synth does.
    attachment; same sample played at different velocities
    regards bottrop
  • BA 43 0
    Message de batata004 le
    @bottrop thank you for your reply. You kindly said the soundfont protocol mimics velocity by manipulating Attack, Volume and Filtering and you kindly attached an image that shows that (I can clearly see the attack is different at all 3 velocity ranges - great!). But can I disable this? You see, when I recorded my Yamaha sounds, the keyboard itself already affected the attack/volume and filtering when outputing the sound. So my recorded sound for each note/velocity already got affected by attack/volume and filtering. If I import these audios to polyphone and play them later, and if the sounfont protocol will again affect attack/volume and filtering, then I will have these 3 "effects" applied twice! 

    That's why I disabled the default modulator of NOTEON VELOCITY -> FILTER CUTOFF because my Yahama keyboard certainly already procesed the audio with this "effect" when I pressed the keys on the keyboard itself and recorded the audio (I know my yamaha does not use sounfont protocol but certainly it already processed the sound with some similar logic). So, disabling this default modulator (inside polyphone), I make sure it will not affect again the notes when I press them.

    Thank you a lot and I really hope people find this answer on Google because it will help people understand how they should sample their instruments with different velocities, avoiding the soundfont protocol to add again the same "effects" that were already added by the keyboard itself, used in the first place.
  • BO 308 14
    Message de bottrop le
    in the Global column of the Instrument you can try Fixed Velocity.
    regards
  • BA 43 0
    Message de batata004 le
    But if I try Fixed Velocity in an instrument with only 3 velocity ranges, when I play this instrument I will only have available 3 velocities, losing lots of dynamics.

    If it's hard to accomplish what I need, how would you recomment me to sample an instrumento from my yamaha keyboard in 3 velocities? Should I normalize the sound at the end of all notes together? How do I guarantee a smooth transition of volume between velocity ranges?
  • BO 308 14
    Message de bottrop le
    of course you lose the smoothness when you set fixed velocities, but you will hear the dynamics of your samples. you could map your piano, mezzoforte and forte samplesets in different instruments and map all these instruments in 1 Preset(set velocity range in the preset)

    i would record the yamaha keyboard at velocity 100 and rely on the soundfont protocol for that velocity effect.
    i guess the yamaha uses only one sample for all velocities too

    regards
  • ZI 195 0
    Soundfont technology does not calculate the recorded velocity value of the sample and reset it according to the velocity range to be played. This means: if you set your samples recorded for 40 velocity to play at 0-40 velocity, you will get a much lower volume value than you expected.

    The simplest method: You can apply the same normalization (try with 80%) to all samples. But first make a backup of the originals, because this is not an irreversible process (after saving and closing).
    So if you apply the same normalization to samples recorded for different velocity values (in your case: 40, 100 and 127), you will get a result close to what you expect.

    You may also want to turn off the default modulator #2 (in the instrument section), which increases the filtering effect as the velocity decreases (Note-on-velocity>FilterCutoff). Although its effect and value are not much, it can be evaluated depending on the situation.

    There may be different operations that can be done with modulators, but it is more difficult and may have different results.
  • BA 43 0
    Message de batata004 le
    @ziyametedemircan THANKS A LOT! What you said is very close to what I am doing, but I think my method is a little better than yours: you said to normalize all samples to 80%, but in my opinion I decided to normalize together all samples of the same velocity, this way I maintain the relative loudness between all samples in the same velocity. For example: let's suppose I only sampled 3 notes at each velocity. Let's suppose in the first velocity my first note peak loudness is at -30db, the second note at -20db and the third note is at -15db. Then I normalize all these 3 notes together to 100%, which will make the first note peak loudness to -15dB, the second note to -5dB and the third note to 0db. 

    This way I can keep the relationship of loudness of each note which is intended in the instrument I am recording. If I normalize all samples individually to 100% (or 80% as you suggested), I will lose all these "information" (the relation between loudness of the sampled notes).

    Dont you agree? I really dont want to be rude, I am really asking if my approach is better than yours. If yours is better please correct me so I can give it a try but I think with your suggestoin I will completely lose the relative loudness between notes at the same velocity.
  • ZI 195 0
    There are a few points I want to mention (this will be a long post so that everyone who reads it can understand):

    1) Normalization applied in Polyphone means setting the existing dB of that sample to a percentage value from the highest value of 0dB. So if you normalize all your samples to a percentage, regardless of what dB they were at before, all your samples' peak values will be set to the same dB value (so far, I think we agree).

    This is exactly what is intended to be done in sf2 for a set of instrument samples recorded at different velocities. The different timbre (spectrum) and response (Attack and Decay) of the instrument at those velocities are preserved.

    This leads to the second explanation.

    2) SF player (or synthesizer) will apply the following to any sample, regardless of its recorded dB value (the values are approximate and may vary depending on the SF player's calculation system and sample bit values (such as 16, 24)):
    ~20.1dB attenuation for 40 velocity
    ~4.15dB attenuation for 100 velocity
    ~0db attenuation for 127 velocity (as you might guess).

    This means the following. If you use these samples with certain velocity values as they are, the result you will get is:
    -20.1 + -20.1 = -40.2dB attenuation for 40 velocity
    -4.15 + -4.15 = -8.30dB attenuation for 100 velocity

    So when your keyboard sends the command to the sf2 player "Play this note at 40 velocity", the Polyphone or other sf2 player also understands this as: "Lower the decibel by this much, apply this much Frequency-Filter."
    Your sample recorded at 40 velocity, which is already at a low decibel, has to be reduced in decibels and filtered again. In order to avoid this double attenuation and filtering -in sf2 technology- we have to bring all these samples recorded at different velocities to the same level -in dB (as if they were played at 127 velocity). What we want to preserve here is not the recorded dB level (or loudness) but the spectrum and response (Attack/Decay).

    I have explained one way to do this (normalization).

    Another way that can be applied without touching the samples is to reduce the others (as a parameter in the Instrument section) according to the lowest attenuation. Although this is not a very desirable situation, I can explain it as follows (a reverse process):
    Samples recorded for 127 vel: 20.1dB attenuation
    Samples recorded for 100 vel: 15.85dB attenuation (= 20 - 4.15)
    Samples recorded for 40 vel: 0 attenuation.
    In this way, you will have set all the samples to play at approximately the volume they should be without changing them. But the final volume you will get will be -20dB lower than the normal instrument volume. And with this method, you should be able to calculate how much dB is reduced at which velocity.

    A third way is to try to adjust the velocity-response by using different modulator settings for different velocity fields, but this is a very complicated process and you will need to constantly check if you get the desired result. Also, not all sf players apply the same modulator response in the same way (experienced). If it were easy and reliable, maybe we could apply a kind of crossfade operation for more than two sample fields in sf2.

    As a result, normalization process becomes the safest, easiest to apply and most desirable situation here.

    3) I recommend that you avoid 100% normalization (or 1 amplitude if we consider 0-1 amplitude) in Polyphone (or any other software). But you can try up to 95%, provided that you check the samples thoroughly and one by one.

    Reason:
    a) To avoid dropout.
    b) To avoid exceeding the threshold.
    c) To avoid clipping.
    As a result: options a, b and c can be considered in double combinations or as a single option depending on the situation.

    Values according to me:
    80%: Extremely safe, 85%: Averagely safe, 90%: On the border between safe and dangerous, 95% Slightly dangerous, 100% Very dangerous (especially with the risk of being a dropout). You can think of these as amplitude: 0.80, 0.85, 0.90, 0.95, 1.00.

Connectez-vous ou inscrivez-vous pour participer à la discussion.

Polyphone a besoin de vous !

Polyphone est gratuit mais il y a des coûts associés à son site web et à son développement. Un petit coup de pouce aidera beaucoup.

Faire un don
Apprenez les bases Voir le tutoriel
Haut de
page