2 summary:: Buffer read demand ugen
3 categories:: UGens>Buffer, UGens>Demand
4 related:: Classes/Dbufwr
10 buffer number to read from
14 when phase exceeds number of frames in buffer, loops when set to 1 (default :1)
16 all inputs can be either demand ugen or any other ugen.
20 b = Buffer.alloc(s, 24, 1);
21 b.setn(0, { exprand(200, 500) } ! b.numFrames);
22 b.getn(0, b.numFrames, {|x| x.postln })
26 indexPattern = Dseq([Dseq([0, 3, 5, 0, 3, 7, 0, 5, 9], 3), Dbrown(0, 23, 1, 5)], inf);
28 Demand.kr(Dust.kr(10), 0, Dbufrd(b, indexPattern))
33 // buffer as a time pattern
35 c = Buffer.alloc(s, 24, 1);
36 c.setn(0, { [1, 0.5, 0.25].choose } ! c.numFrames);
37 c.getn(0, c.numFrames, {|x| x.postln })
41 indexPattern = Dseq([Dseq([0, 3, 5, 0, 3, 7, 0, 5, 9], 3), Dbrown(0, 23, 1, 5)], inf);
44 Dbufrd(c, Dseries(0, 1, inf)) * 0.5,
46 Dbufrd(b, indexPattern)