BufSampleRate:
Filter:
Description
Class methods
kr
ir
Inherited class methods
Instance methods
Inherited instance methods
Examples
Classes
|
UGens
>
Buffer
>
Info
BufSampleRate
:
BufInfoUGenBase
:
UGen
:
AbstractFunction
:
Object
Buffer sample rate.
Source:
InfoUGens.sc
See also:
BufChannels
,
BufDur
,
BufFrames
,
BufRateScale
,
BufSamples
Description
Returns the buffer's current sample rate.
Class Methods
BufSampleRate.
kr
(
bufnum
)
From superclass:
BufInfoUGenBase
BufSampleRate.
ir
(
bufnum
)
From superclass:
BufInfoUGenBase
Arguments:
bufnum
Buffer index.
Returns:
the buffer's current sample rate.
Discussion:
WARNING:
The
.ir
method is not the safest choice. Since a buffer can be reallocated at any time, using
.ir
will not track the changes.
Inherited class methods
Instance Methods
Inherited instance methods
Examples
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav"); // compares a 1102.5 Hz sine tone (11025 * 0.1, left) with a 1100 Hz tone (right) // the apollo sample has a sample rate of 11.025 kHz ( { var freq; freq = [ BufSampleRate.kr(b) * 0.1, 1100]; SinOsc.ar(freq, 0, 0.1) }.play; ) b.free;
helpfile source:
/usr/local/share/SuperCollider/HelpSource/Classes/BufSampleRate.schelp
link::Classes/BufSampleRate::