A UGen that reports the server's current (audio) sample rate. This is
equivalent to the reciprocal of SampleDur
Examples
// print the sample rate
play { SampleRate.ir.poll(0) }
// use a fraction as oscillator frequency
play {
val div = MouseX.kr(512, 2, 1, 0).roundTo(1)
val change = HPZ1.kr(div).abs
val freq = SampleRate.ir / div
freq.poll(change, label = "freq")
SinOsc.ar(freq) * 0.1
}
A UGen that reports the server's current (audio) sample rate. This is equivalent to the reciprocal of
SampleDur
Examples
RadiansPerSample
ControlRate
SampleDur