2 summary:: Three variable wavetable oscillators.
3 related:: Classes/COsc, Classes/Osc, Classes/OscN, Classes/VOsc
4 categories:: UGens>Generators>Deterministic
9 A wavetable lookup oscillator which can be swept smoothly across
10 wavetables. All the wavetables must be allocated to the same size.
11 Fractional values of table will interpolate between two adjacent tables.
12 This unit generator contains three oscillators at different frequencies,
16 This oscillator requires at least two buffers to be filled with a
17 wavetable format signal. This preprocesses the Signal into a form which
18 can be used efficiently by the Oscillator. The buffer size must be a
22 This can be achieved by creating a link::Classes/Buffer:: object and sending it one of
23 the "b_gen" messages ( sine1, sine2, sine3 ) with the wavetable flag set to true.
26 This can also be achieved by creating a link::Classes/Signal:: object and sending it
27 the link::Overviews/Methods#asWavetable#asWavetable:: message, saving it to disk, and having the server load
31 If you use Buffer objects to manage buffer numbers, you can use the
32 [*allocConsecutive] method to allocate a continuous block of buffers.
33 See the link::Classes/Buffer:: helpfile for details.
38 VOsc3 requires the b_gen sine1 wavetable flag to be ON.
48 Buffer index. Can be swept continuously among adjacent wavetable
49 buffers of the same size.
54 Frequency in Hertz of the 1st oscillator.
59 Frequency in Hertz of the 2nd oscillator.
64 Frequency in Hertz of the 3rd oscillator.
69 Output will be multiplied by this value.
74 This value will be added to the output.
83 // allocate and fill tables 0 to 7
87 s.sendMsg(\b_alloc, i, 1024);
88 // generate array of harmonic amplitudes
90 a = Array.fill(n, { arg j; ((n-j)/n).squared.round(0.001) });
92 s.performList(\sendMsg, \b_gen, i, \sine1, 7, a);
97 SynthDef("help-VOsc",{ arg out=0, bufoffset=0, freq=240;
99 // mouse x controls the wavetable position
102 VOsc3.ar(bufoffset+x, freq+[0,1],freq+[0.37,1.1],freq+[0.43, -0.29], 0.3)
104 }).play(s,[\out, 0, \bufoffset, 0]);
110 s.sendMsg(\b_alloc, i, 1024); // allocate table
111 // generate array of harmonic amplitudes
112 a = Array.fill(i, 0) ++ [0.5, 1, 0.5];
114 s.performList(\sendMsg, \b_gen, i, \sine1, 7, a);
121 s.sendMsg(\b_alloc, i, 1024); // allocate table
122 // generate array of harmonic amplitudes
125 (n>>1).do({ arg i; a.put(n.rand, 1) });
127 s.performList(\sendMsg, \b_gen, i, \sine1, 7, a);
134 s.sendMsg(\b_alloc, i, 1024); // allocate table
135 // generate array of harmonic amplitudes
137 a = Array.fill(n, { arg j; 1.0.rand2 });
139 s.performList(\sendMsg, \b_gen, i, \sine1, 7, a);
145 a = Array.fill(64, { arg j; 1.0.rand2 });
147 s.sendMsg(\b_alloc, i, 1024); // allocate table
148 // generate array of harmonic amplitudes
151 s.performList(\sendMsg, \b_gen, i, \sine1, 7, a.extend(n.asInteger));
157 a = Array.fill(64, { arg j; 1/(j+1) });
159 s.sendMsg(\b_alloc, i, 1024); // allocate table
160 // generate array of harmonic amplitudes
163 s.performList(\sendMsg, \b_gen, i, \sine1, 7, a.extend(n.asInteger));