Hmm, or maybe you could try the opposite. Instead of having the envelope be 
added to a source which then passes its own parameters back before playing, 
you could add the source to the envelope class and play it from there 
instead acting as a filter. Something like:

adsr_envelope = procedural.ADSREnvelope(attack=0.05, decay=0.1, 
sustain_amplitude=0.7, release=0.3)
sine_wave = procedural.Sine(duration=1, frequency=220)
adsr_envelope.bind(sine_wave)
adsr_envelope.play()

So if you wanted to change envelopes you could unbind/rebind it to a 
different envelope instance, or change existing parameters, etc.

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to