[chuck-users] interpolated step? (equivalent to max's line)

Jordan Orelli jordanorelli at gmail.com
Fri Jul 13 14:57:29 EDT 2012


there's no way to use this to ramp an arbitrary variable, like the frequency of a SinOsc, for example, is there?  Cause I do stuff like this and find it kinda annoying: 

SinOsc s => dac;
110 => float initial => s.freq;

fun void ramp() {
    880 => float final;
    1::ms => dur res;
    500::ms => dur width;
    (final - initial) / (width / res) => float delta;
    now => time start;
    while(now < start + width) {
        res => now;
        s.freq() + delta => s.freq;
    }
}
spork ~ ramp();

1::second => now; 




On Friday, July 13, 2012 at 2:43 PM, Kassen wrote:

> On 13 July 2012 20:17, George Locke <george.locke.maxmsp at gmail.com (mailto:george.locke.maxmsp at gmail.com)> wrote:
> > sweet. guess i might've figured that one out on my own...
> 
> 
> I understand the problem.
> Like this I have been using it for quite a while, but the need for the
> extra Step, unless it sets some sort of variable scaling, feels a bit
> counter-intuitive. I seem to remember it was Perry who first proposed
> that Envelope without any input should assume a input of 1. That would
> bring it more closely in line with similar objects in other systems.
> 
> There is also no problem with asking questions if you looked around a
> bit; the documentation is a bit scattered.
> 
> Happy ChucKing,
> Kas.
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu (mailto:chuck-users at lists.cs.princeton.edu)
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20120713/50d41c53/attachment.htm>


More information about the chuck-users mailing list