adds missing Qt support for viewExtensions (.horz .vert .comp .flow .deepDo .asFlowView)
[supercollider.git] / SCClassLibrary / backwards_compatibility / PMOsc.sc
blob7675f384c09c57edc932c9974ea0b72e88b23578
1 // these pseudo ugens replicate some SC2 ugens
2 // still useful as shorthands
4 PMOsc  {
6         *ar { arg carfreq,modfreq,pmindex=0.0,modphase=0.0,mul=1.0,add=0.0;
7                 ^SinOsc.ar(carfreq, SinOsc.ar(modfreq, modphase, pmindex),mul,add)
8         }
10         *kr { arg carfreq,modfreq,pmindex=0.0,modphase=0.0,mul=1.0,add=0.0;
11                 ^SinOsc.kr(carfreq, SinOsc.kr(modfreq, modphase, pmindex),mul,add)
12         }
17 MultiTap  {
19         *ar { arg timesArray, levelsArray, in = 0.0, mul = 1.0, add = 0.0,bufnum;
21                 var sampleRate;
22                 timesArray = timesArray.dereference;
23                 levelsArray = levelsArray.dereference;
24                 RecordBuf.ar(in,bufnum,0.0, run: -1.0);
25                 sampleRate = BufSampleRate.kr(bufnum);
27                 ^Mix.arFill(timesArray.size,{ arg i;
28                         PlayBuf.ar(in.numChannels,
29                                         bufnum, -1.0,1.0,
30                                         timesArray.at(i) * sampleRate,
31                                         loop: 1)
32                                 .madd(levelsArray.at(i) ? 1.0)
33                 }).madd(mul,add);
34         }
39 GrainTap {
41         // overlap determines density
42         *ar { arg bufnum, grainDur = 0.2, pchRatio = 1.0,
43                         pchDispersion = 0.0, timeDispersion = 0.0, overlap = 2.0, mul = 1.0, add = 0.0;
45                 var sampleRate;
46                 sampleRate = BufSampleRate.kr(bufnum);
47                 pchRatio = pchRatio * BufRateScale.kr(bufnum);
50                 ^Mix.arFill( howMany ? ,{ arg i;
51                         PlayBuf.ar(buf.numChannels,
52                                         bufnum,1.0,1.0,
53                                         loop: 1)
54                 }).madd(mul,add);
56         }