Hi,

Someone helped me once to make this random LFO, similar to
supercollider's LFNoise1:

line (value, time) = state~(_,_):!,_
        with {
                state (t, c) = nt, if (nt <= 0, value, c+(value - c) / nt)
                with {
                        nt = if( value != value', samples, t-1);
                        samples = time*SR/1000.0;
                };
        };
reduc(n) = compute ~ (_,_,_) : (!,!,_)
      with {
          compute (acc, count, val) =
              if(count<n, noise, 0),             // new acc
              if(count<n, count+1, 1),         // new count
              if(count<n, val, acc);          // new val
          if (c, then, else) = select2(c, else, then);
      };
lfnoise(freq) = reduc(samps), time_ms : line with {
    samps = SR/freq;
    time_ms = 1000/freq;
};

Now I would like to try to use cosine instead of linear interpolation,
and I have this:

cosint (y1,y2,mu) = y1*(1-mu2)+y2*mu2 with {
   mu2 = (1-cos(mu*PI))/2;
};

I just can't figure out how to insert it so that it gets both the
original (old) and target (new) value for the line. Anyone feels up to
helping me out?

-- 
/Jonatan
http://kymatica.com

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to