Ejemplo n.º 1
0
 public EasedEnvelopePhase(EasedEnvelopePhase other)
 {
     duration = other.duration;
     target   = other.target;
     easeIn   = other.easeIn;
     easeOut  = other.easeOut;
 }
Ejemplo n.º 2
0
        public ADSREnvelope()
        {
            EasedEnvelopePhase A = new EasedEnvelopePhase(); /* Attack */
            EasedEnvelopePhase D = new EasedEnvelopePhase(); /* Decay */
            FlatEnvelopePhase  S = new FlatEnvelopePhase();  /* Sustain */
            EasedEnvelopePhase R = new EasedEnvelopePhase(); /* Release */

            A.target  = 1.0;
            A.easeIn  = EasingType.Cubic;
            A.easeOut = EasingType.Cubic;

            D.target = 0.9;
            R.target = 0.0;

            _phases = new List <EnvelopePhase>(new EnvelopePhase[]
            {
                A, D, S, R
            });
        }