linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / BufRateScale.schelp
blob54172c81c845bcbe4f6582cf012040222e923946
1 class:: BufRateScale
2 summary:: Buffer rate scaling in respect to server samplerate.
3 related:: Classes/BufChannels, Classes/BufDur, Classes/BufFrames, Classes/BufSampleRate, Classes/BufSamples
4 categories::  UGens>Buffer>Info
7 Description::
8 Returns a ratio by which the playback of a soundfile is to be scaled.
10 classmethods::
12 method::kr, ir
14 argument::bufnum
15 Buffer index.
17 Returns:: a ratio by which the playback of a soundfile is to be scaled.
19 discussion::
20 warning::
21 The  code::.ir::  method is not the safest choice.
22 Since a buffer can be reallocated at any time, using
23 code::.ir::  will not track the changes.
26 Examples::
28 code::
29 b = Buffer.read(s, Help.dir +/+ "sounds/a11wlk01.wav");
32 x = { arg rate=1;
33         BufRd.ar(1, b, Phasor.ar(0, BufRateScale.kr(b) * rate, 0, BufFrames.kr(b)))
34 }.play;