Sign in

Trouble understanding envelopes

  • Ty 1 0
    Message from Tyler on
    I'm trying to create a basic SF2 or SFZ player for my web application, and I'm running into some trouble figuring out how envelopes are supposed to work.

    In the Presets editor in Polyphone, many of the fields are marked with an (x), which seems to mean that the value will be multiplied by any inherited values from the Instrument used for the particular Preset zone. For example, I've imported the "GeneralUser GS MuseScore version 1.442" SoundFont, and looking at preset 49 (Stereo Strings Slow), I see this for the second non-global zone:

    Strings_2 Pan, Velocity range 0-51: attackVolEnv= 1.1.
    The matching instrument has a global setting for attackVolEnv = 0.8.

    In playback and upon export to SFZ, the resulting output for the delay is ~0.88, which is 1.1 * 0.8.

    However, from my reading of the specification at (http://www.synthfont.com/SFSPEC21.PDF), I was expecting these values to be added rather than multiplied. At the bottom of page 57, it states:

    "Generators at the Preset Level are instead considered “relative” and additive to all the default or instrument level generators within the Preset Zone. For example, a value of 2400 timecents for the attackVolEnv generator in a preset zone containing an instrument with two zones, one with the default attackVelEnv and one with an absolute attackVolEnv generator value of 1200 timecents would cause the default zone to actually have a value of -9600 timecents or 4 msec, and the other to have a value of 3600 timecents or 8 seconds attack time."

    I haven't found any mention that any of the values for Presets should act as factors for their Instrument equivalents, so I'm wondering if I'm missing something. Is there a different version of the specification I should be working from?
  • 57 0
    Message from Michael on 1
    Not really a direct to your question, however I've found once an oldskool manual of Vienna - also a soundfont editor which can be used only when you use a Soundblaster soundcard. Also it dates back to 20 years ago.

    However in the article you'll find some usefull information in relation to your questions about programming your own sound libraries:

    http://www.hammersound.net/files/ViennaPdf.zip 

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