public EasedEnvelopePhase(EasedEnvelopePhase other) { duration = other.duration; target = other.target; easeIn = other.easeIn; easeOut = other.easeOut; }
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 }); }