Such a class could use the GraphicsInterpolatorEditItem to provide a GUI for the ADSR envelope. It could also have more then 4 phases.
The envelope class would now three phases:
PRESUSTAIN; this would be represented by an interpolator (linear or logarithmic) with variable number of control points (for more than the typical ATTACK and DECAY phases). After the end of this phase, the envelope would proceed to the next phase, the
SUSTAIN; this would be a constant value, until the key is released, at which point the envelope would proceed to the next phase, the
POSTSUSTAIN/RELEASE; this would also be a linear or logarithmic interpolator. It could have more than one segment, though the typical ADSR envelope (with one segment in this phase) would of course still be possible
Such a class could use the GraphicsInterpolatorEditItem to provide a GUI for the ADSR envelope. It could also have more then 4 phases.
The envelope class would now three phases: