2 summary:: Current number of samples in buffer.
3 related:: Classes/BufChannels, Classes/BufDur, Classes/BufFrames, Classes/BufRateScale, Classes/BufSampleRate
4 categories:: UGens>Buffer>Info
8 Returns the current number of allocated samples. A sample is not the same as a frame (compare with link::Classes/BufFrames:: ); a frame includes the samples in each channel of the buffer. Only for a mono buffer are samples the same as frames.
10 samples = frames * numChannels
23 The code::.ir:: method is not the safest choice.
24 Since a buffer can be reallocated at any time, using
25 code::.ir:: will not track the changes.
30 // example; this buffer is mono, so the number of samples matches the number of frames
31 b = Buffer.read(s, Help.dir +/+ "sounds/a11wlk01.wav");
33 // indexing with a phasor
34 { BufRd.ar(1, b, Phasor.ar(0, BufRateScale.kr(b), 0, BufSamples.kr(b))) }.play;
37 { BufRd.ar(1, b, K2A.ar(MouseX.kr(0, BufSamples.kr(b)))) }.play;