Fix a regression from when the ADSR envelopes became AHDSR envelopes, plus
refactor the code to use #define macro values instead of hard-coded values
to prevent these shenanigans from happening again...