Question about ADSR Sustain Fields #295
Replies: 2 comments 2 replies
-
I was able to find this reference material, which may offer SF2 compliant alternatives to ADSR, but I'm not sure. http://www.synthfont.com/SFSPEC21.PDF |
Beta Was this translation helpful? Give feedback.
-
I don't have much knowledge about DLS or PSXSPU implementations, but can comment on a few from my experience implementing ADSR conversions for SF2 and SNES. The SNES S-DSP has two volume decreasing envelopes, Decay and Sustain (there is also Release, but I won't go into that here). These decrease the volume at different rates. Envelope curves are almost always exponential, with a few exceptions. Therefore, when converting to SoundFont, ADSR has to be expressed as an approximation (except in the case of SL=7). The method I finally adopted was to implement an emulation of the ADSR unit and calculate an approximation based on the hints from it.
Initially, I was thinking of a strategy to focus on either Decay or Sustain depending on how fast Decay is, but I gave up because I thought it would be difficult to set a threshold that would work for all cases. This method seems to have worked because the SNES Decay, Sustain, and SoundFont Decay were all (almost) exponentially decreasing. If I remember correctly, the PSXSPU has two types of sustain and the volume curve can be selected between linear and exponential envelopes, so I think it is more difficult. |
Beta Was this translation helpful? Give feedback.
-
In PSXSPU.h there are comments to the effect that Sustain is not used, because SF2 and DLS do not support it.
I believe I've run into a few bugs which seem to indicate people noticing that the sound doesn't quite have the right amount of sustain (#138 , #123)
From what I've found on the internet, there seems to be agreement that SF2 and DLS don't support this feature, but there are workarounds... however I'm pretty unfamiliar with a lot of this stuff... and maybe it's already using some work arounds.
What's the status of ADSR support currently? Is this something that needs to be brought up to modern times, or is this still unfixable?
Beta Was this translation helpful? Give feedback.
All reactions