[chuck-users] newbie questions

dan trueman dtrueman at princeton.edu
Thu Jun 22 00:22:50 EDT 2006


> Looking at source, i think what's happening is that the Chuck duration 
> (
> floating point, in samples) is being implicitly cast to the floating
> point argument ( .attackTime is registered as such ) that STK needs, 
> but
> ASDR is expecting seconds.

maybe i'm misunderstanding, but it actually doesn't run at all. with 
this line:

>> 400::ms => dur t => e.attackTime;

i get an error when i try to run it:

"argument type(s) do not match:
... for function 'ADSR.attackTime(...)' ...

so i don't think there is any casting happening.

> durs can always be converted to the float units your function expects
> through division  ( t / 1::second ) but we should be performing this
> automagically by adding a properly typed function.
>
>      func = make_new_mfun( "float", "attackTime", ADSR_ctrl_attackTime
> ); //! attack time
>      func->add_arg( "float", "value" );
>      if( !type_engine_import_mfun( env, func ) ) goto error;

yeah, that would be nifty.

dt


>
>
>
> Daniel L Trueman (dtrueman at Princeton.EDU) wrote:
>> ok, newbie chucker here, with dumb questions:
>>
>> 1. is it true that the archives for this list are not searchable? i 
>> would be most delighted to avoid asking dumb questions by
>> searching the archives first.
>>
>> 2. confused is me trying to set some STK time parameters. for 
>> instance:
>>
>> //
>> noise n => ADSR e => dac;
>> 400::ms => dur t => e.attackTime;
>> //
>>
>> doesn't work, which is ok since i know:
>>
>> //
>> .4 => e.attackTime;
>> //
>>
>> does work, but it would make more sense to me to be able to send durs 
>> around consistently, especially when i see something
>> like this:
>>
>> //
>> noise n => Envelope e => dac;
>> std.rand2f(10,500)::ms => dur t => e.duration;
>> //
>>
>> that works. now, things become more mysterious when i find that 
>> "duration" is not documented online as part of Envelope,
>> which makes me wonder if i'm missing something, and also wonder what 
>> other interesting things remain undocumented. is it
>> just that some of the STK ugens have been extended to take durs, but 
>> not all?
>>
>> most joyfully attempting to chuck,
>> dan
>> _______________________________________________
>> chuck-users mailing list
>> chuck-users at lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
> _______________________________________________
> 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