Sign in

Some Problems with Technical Values in a SoundFont

  • 2 0
    Message from Prof. Spock on
    Hello everyone,

    first of all thank you for that brilliant tool that helps to still popularize SoundFonts for music production!
    I am currently working on tools for analyzing and converting SoundFonts and I am therefore intensively delving into their inner details.
    For that I have been looking at the SoundFont files produced by Polyphone.  Granted my observations are very picky, but I have found several things I do not understand:
    • For a "decayVolEnv" of 0.001 for an instrument zone the file contains a value of 0xd120 (= -12000) which according to the SoundFont spec translates to 2-12000/1200 = 2-10 = 1/1024; the correct natural value is 1200*log2(0.001) = -11959 = 0xd149. This - of course - also applies to other timecent values.
    • A similar problem occurs for the frequency transformation. A value of 0.001 for "freqVibLFO" is stored by Polyphone as 0xc310 (= -15600) which is 2^{-15600/1200}*8.176 = 2^{-13}*8.176 = 0.009980Hz; the correct natural value in my opinion is 1200*log2(0.001/8.176) = -15597 = 0xc313.

      In both cases these are tiny differences, but there is no reason, why the optimal value shall not be used.


    • Out of range values for loop positions in samples are not corrected even when the file is saved by Polyphone (although correct ranges are shown in its sample editor).  They are only adjusted when some manual change has happened to that erroneous loop value.
    • The same holds for the attributes "libraryIndex", "genreIndex" and "morphologyIndex" for a preset header (reserved by the specification with so far unclear usage).  The Polyphone editor does not show them - understood -, but keeps their values unchanged.
    Can someone enlighten me here?

    Best regards,
    Prof. Spock
  • 341 14
    Message from bottrop on
    values like 0,001 in a soundfont you can consider as no setting.
    regards bottrop
  • 2 0
    Message from Prof. Spock on
    Hello  bottrop,
    you wrote:
    values like 0,001 in a soundfont you can consider as no setting.
    One can argue that 1ms and 1mHz might be the minimal useful values also according the SoundFont specification in section 8.1.3 "Generator Summary".  But anyways in my opinion even those small values should be correctly represented in a technical system.
    But what I did not realize is that there is a subtle problem with Polyphone here: the real value in the underlying SoundFont seems to be 9.9805*10-4, but it is rounded in the editor to three digits precision, i.e. to 0.001, which explains the difference in the external representation.
    There is already a feature request #257 for Polyphone in Github that one can somehow see the "correct value" in the editor instead of the rounded value.  But I personally would prefer a real value displayed instead of the natural technical value mentioned there.
    Best regards,
    Prof. Spock

Sign in or register to take part in discussions.

Polyphone needs you!

Polyphone is free but there are costs associated with its website and development. A small donation will help a lot.

Donate
Learn the basics Try a tutorial
Scroll to
top