[chuck-users] getting ADSR::XTime()

Ge Wang ge at ccrma.Stanford.EDU
Tue Jul 8 03:11:22 EDT 2008


Greetings!

This is now fixed, I think.

The updated code is in CVS and will be released in 1.2.1.2.

Thanks Eduard for the report!

Best,
Ge!

On Mon, 4 Feb 2008, eduard wrote:

> Hi list,
>
> I'm afraid there is a bug on  the getters side  of the ADSR UGen. One
> can set adsr::attackTime( 10::ms ) and gets adsr::attackTime()  as
> 0.010::samp, instead of (0.010*SR)::samp.
> So, to be able to use
>
> adsr::attackTime() => now
>
> correctly, one should do:
>
> adsr::attackTime()*sr => now
>
> Which I don't think is the way one would expect. Could anyone confirm
> the same behaviour, so I can add it to the wiki-bug-list?
>
>
> eduard
>
>
>
>
> SinOsc s => ADSR env => Gain g => dac;
> env.attackTime( 10::ms );
> env.decayTime( 5::ms );
> env.releaseTime( 1000::ms );
> <<<"env_region", "\tstate()", "\tcur time[ms]", "\ttime[samp]",
> "\ttime[ms]">>>;
> <<<"--------------------------------------------------------------------
> -------","\n">>>;
> while( true )
> {
>
>     env.keyOn();
>     <<< "start of att", "\t", env.state(), "\t",  now/ms , "\t",
>     env.attackTime()/samp, "\t", env.attackTime()/ms>>>;
>     env.attackTime() => now;
>     <<< "end of att", "\t",  env.state(), "\t",  now/ms >>>;
>     <<< "start of dcy", "\t",  env.state(), "\t",  now/ms, "\t",
> env.decayTime()/samp,
>     "\t", env.decayTime()/ms >>>;
>     env.decayTime() => now;
>     <<< "end of dcy", "\t",  env.state(), "\t",  now/ms >>>;
>     env.keyOff();
>     <<< "start release", "\t",  env.state(), "\t",  now/ms, "\t",
>     env.releaseTime()/samp, "\t", env.releaseTime()/ms >>>;
>     env.releaseTime() => now;
>     <<<"end release", "\t",   env.state(), "\t",  now/ms >>>;
>     1::second => now;
>     <<< "\n","******************\n">>>;
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>


More information about the chuck-users mailing list