«PWM crossfade» by Jonatan Liljedahl

on 16 Aug'11 15:06 in pwmtransitioncrossfade

A demonstration of transitioning between notes in a sequence, by pulsewidth modulation.

1
2
3
4
5
6
7
play {
    var notes = [ 400, 500, 450, 376, 600 ];
    var dur = 1/20;
    var freq = Demand.kr(Impulse.kr(dur, [0,0.5]), 0, Dseq(notes, inf));
    freq = LFPulse.kr(8, 0, LFTri.kr(dur, 1).range(0, 1)).range(*freq).max(376);
    LPF.ar(Saw.ar(freq * [1,0.99],0.5),8000);
}
descendants
«Raditya» by anonymous (private)
«sclwofgilkf» by anonymous (private)
«bzogdkiouof» by anonymous (private)
full graph
raw 279 chars (focus & ctrl+a+c to copy)
comments
vividsnow user 17 Aug'11 00:09

*freq - what does "*" mean?

rukano user 17 Aug'11 00:26

unpack the array as arguments

rukano user 17 Aug'11 00:28

like a = [1,2,3]; "% % % \n".postf(*a)

vividsnow user 17 Aug'11 01:22

now i remember sc book - thank you )