fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[fluid-dev] SoundFont Preset generator interpretation


From: Garth Hjelte
Subject: [fluid-dev] SoundFont Preset generator interpretation
Date: Sun, 21 Jun 2020 09:51:02 -0500

How does FS interpret SoundFont Preset generators, specifically the VolEnv and 
ModEnv?

In the SoundFont spec, it seems - and at times explicitly states - that the 
Preset values are ADDED to the Instrument Values, and are interpreted as Units 
specified in the spec. From page 45 (2.01 sepc):

"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 attackVolEnv 
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."

However, in both the Vienna and Viena editors, it doesn't work that way. 
Instead, for example, a attackVolEnv in the Preset (PGEN) serves as a 
MULTIPLIER and does not represent the Unit (in this case TimeCents).

As an example, there is a SoundFont called CHORIUM and when opened in Viena, 
you see the Preset's Global Zone has a value of 30 in attackVolEnv, and the 
Instrument zones mostly don't have a value listed, so you get 30ms as the 
audible value, since 30 x 1ms (the default value) = 30ms. I looked inside the 
Chorium file and sure enough, the value is 0x1739, decimal 5945, and when 
processed through the TimeCents formula, comes out to 30.999 (that is, 31).

In Viena (which is NOT the spec but it should follow the spec) the listing 
doesn't say "sec" but "X", and certainly in the above example the attack time 
is NOT 31sec when I play it back. So for some reason Viena (and Vienna) 
interprets the Preset values as MULTIPLIERS and aren't even in the Units the 
spec defines, which is TimeCents (absolute time values).

So, my questions are - how does FS do it, why does it do it (in view of the 
spec violation), and also why is this so against the spec? Is the spec "wrong"? 
How can a spec be "wrong"?

Garth Hjelte
Sampler User




reply via email to

[Prev in Thread] Current Thread [Next in Thread]