Sound Envelope

Hey all,
I was wondering if anyone could point me in the right direction with a challenge I’m encountering at the moment in a design.
I’m currently teaching myself the ins and outs of Actionscript, and I’ve begun a small project to simulate a synthesizer inside Flash,
Sure, most functions will not cross over, but this has all been worked out.
My problem is with making a sound envelope which I can apply to a sample. I’m avoiding using the inbuilt timeline effects, because I want the user to be able to input data into variables which sets the values in the sound envelope for the sample.

the required variables would go something along the times of:
time1 and volume1, time2 and volume2 etc etc.
( Simulating how it would look on a grid. )

I was just wondering about the best procedure for building an envelope in actionscript, my first guess is using the tween class, but I have little experience there, so I thought i’d ask here first.
Hope i’ve explained myself well enough.
Thanks.