2 summary:: Variable wavetable oscillator.
3 related:: Classes/COsc, Classes/Osc, Classes/OscN, Classes/VOsc3
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.
14 This oscillator requires at least two buffers to be filled with a
15 wavetable format signal. This preprocesses the Signal into a form which
16 can be used efficiently by the Oscillator. The buffer size must be a
20 This can be achieved by creating a link::Classes/Buffer:: object and sending it one of
21 the "b_gen" messages ( sine1, sine2, sine3 ) with the wavetable flag set to true.
24 This can also be achieved by creating a link::Classes/Signal:: object and sending it
25 the link::Overviews/Methods#asWavetable#asWavetable:: message, saving it to disk, and having the server load
29 If you use Buffer objects to manage buffer numbers, you can use the
30 [*allocConsecutive] method to allocate a continuous block of buffers.
31 See the link::Classes/Buffer:: helpfile for details.
36 VOsc requires the b_gen sine1 wavetable flag to be ON.
46 Buffer index. Can be swept continuously among adjacent wavetable
47 buffers of the same size.
57 Phase offset or modulator in radians.
62 Output will be multiplied by this value.
67 This value will be added to the output.
76 // allocate and fill tables 0 to 7
80 s.sendMsg(\b_alloc, i, 1024);
81 // generate array of harmonic amplitudes
83 a = Array.fill(n, { arg j; ((n-j)/n).squared.round(0.001) });
85 s.performList(\sendMsg, \b_gen, i, \sine1, 7, a);
90 SynthDef("help-VOsc",{ arg out=0, bufoffset=0;
92 // mouse x controls the wavetable position
95 VOsc.ar(bufoffset+x, [120,121], 0, 0.3)
97 }).play(s,[\out, 0, \bufoffset, 0]);
103 s.sendMsg(\b_alloc, i, 1024); // allocate table
104 // generate array of harmonic amplitudes
105 a = Array.fill(i, 0) ++ [0.5, 1, 0.5];
107 s.performList(\sendMsg, \b_gen, i, \sine1, 7, a);
114 s.sendMsg(\b_alloc, i, 1024); // allocate table
115 // generate array of harmonic amplitudes
116 a = Array.fill(32,0);
117 12.do({ arg i; a.put(32.rand, 1) });
119 s.performList(\sendMsg, \b_gen, i, \sine1, 7, a);
126 s.sendMsg(\b_alloc, i, 1024); // allocate table
127 // generate array of harmonic amplitudes
129 a = Array.fill(n, { arg j; 1.0.rand2 });
131 s.performList(\sendMsg, \b_gen, i, \sine1, 7, a);