ucsb-cs56-projects / cs56-music-basic-synthesis-demo

-
0 stars 5 forks source link

Refactor ADSREnvelope from ADSREnvelopedContinuousSound into a separate class. #3

Closed pconrad closed 11 years ago

pconrad commented 11 years ago

Refactor ADSREnvelopedContinuousSound by factoring "ADSREnvelope" into a separate class.

The ADRSEnvelope class should encapsulate these parameters of the current constructor for ADSREnvelopedContinuousSound

     double attackTime,
                  double decayTime,
                  double sustainAmplitude,
                  double sustainTime,
                  double releaseTime,

Replace all of those with just one parameter:

ADSREnvelope adsr

Then just have a getADSREnvelope setADSREnvelope method for ADSREnvelopedContinuousSound. The main in ADSREnvelopedContinuousSound should then create the envelope separately from creating the ADSREnvelopedContinuousSound.

pconrad commented 11 years ago

@bronhuston do you want this one? Or should I leave it for @RapidRage too?

~estimated 120

bronhuston commented 11 years ago

~claimed @bronhuston ~moderator @leifdreizler