oneShot: free the responder before running user func (avoid error)
[supercollider.git] / HelpSource / Classes / BufFrames.schelp
blob48141a020293ec915f7556e5f39a5337d6af888f
1 class:: BufFrames
2 summary:: Current number of frames allocated in the buffer.
3 related:: Classes/BufChannels, Classes/BufDur, Classes/BufRateScale, Classes/BufSampleRate, Classes/BufSamples
4 categories::  UGens>Buffer>Info
6 Description::
7 Get the current number of allocated frames.
9 classmethods::
11 method::kr, ir
13 argument::bufnum
14 Buffer index.
16 returns:: the current number of allocated frames.
18 discussion::
19 warning::
20 The  code::.ir::  method is not the safest choice.
21 Since a buffer can be reallocated at any time, using
22 code::.ir::  will not track the changes.
25 Examples::
27 code::
29 s.sendMsg("/b_allocRead", 0, "sounds/a11wlk01.wav");
31 // indexing with a phasor
32 { BufRd.ar(1, 0, Phasor.ar(0, BufRateScale.kr(0), 0, BufFrames.kr(0))) }.play;
35 // indexing by hand
36 { BufRd.ar(1, 0, K2A.ar(MouseX.kr(0, BufFrames.kr(0)))) }.play;