2 summary:: Noninterpolating wavetable oscillator.
3 related:: Classes/COsc, Classes/Osc, Classes/VOsc, Classes/VOsc3
4 categories:: UGens>Generators>Deterministic
9 Noninterpolating wavetable lookup oscillator with frequency and phase
10 modulation inputs. It is usually better to use the interpolating
11 oscillator link::Classes/Osc:: .
19 Buffer index. the buffer size must be a power of 2.
20 The buffer should NOT be filled using Wavetable format (b_gen
21 commands should set wavetable flag to false. Raw signals (not
22 converted with asWavetable) can be saved to disk and loaded
30 Phase offset or modulator in radians.
33 Output will be multiplied by this value.
36 This value will be added to the output.
42 // compare examples below with interpolating Osc examples.
46 b = Buffer.alloc(s,512,1);
47 b.sine1(1.0/[1,2,3,4,5,6],true,false,true);
49 SynthDef("help-OscN",{ arg out=0,bufnum=0;
51 OscN.ar(bufnum, 500, 0, 0.5)
53 }).play(s,[0,0,1,b.bufnum]);
61 // noninterpolating - there are noticeable artifacts
65 b = Buffer.alloc(s,512,1);
66 b.sine1(1.0/[1,2,3,4,5,6].squared,true,false,true);
68 SynthDef("help-OscN",{ arg out=0,bufnum=0;
70 OscN.ar(bufnum, XLine.kr(2000,200), 0, 0.5)
72 }).play(s,[\out,0,\bufnum,b.bufnum]);
78 // sounds very different than the Osc example
80 b = Buffer.alloc(s, 512, 1);
81 b.sine1([1.0], true, true, true);
83 SynthDef("help-OscN",{ arg out=0,bufnum=0;
94 }).play(s,[\out, 0, \bufnum, b.bufnum]);
102 b = Buffer.alloc(s, 512, 1);
103 b.sine1([1.0], true, true, true);
105 SynthDef("help-OscN",{ arg out=0,bufnum=0;
110 XLine.kr(20,8000,10),
115 }).play(s,[\out, 0, \bufnum, b.bufnum]);
121 // change the buffer while its playing
123 b = Buffer.alloc(s, 4096, 1);
124 b.sine1(1.0/[1,2,3,4,5,6], true, true, true);
126 SynthDef("help-OscN",{ arg out=0,bufnum=0;
128 OscN.ar(bufnum, [80,80.2], 0, 0.2)
130 }).play(s,[\out, 0, \bufnum, b.bufnum]);
137 b.sine1(Array.rand(n,0,1).cubed, true, true, true);