58 lines
No EOL
4.6 KiB
HTML
58 lines
No EOL
4.6 KiB
HTML
<html><head><title>BufRateScale</title>
|
|
<link rel='stylesheet' href='./../scdoc.css' type='text/css' />
|
|
<link rel='stylesheet' href='./../frontend.css' type='text/css' />
|
|
<link rel='stylesheet' href='./../custom.css' type='text/css' />
|
|
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
|
|
<script src='./../scdoc.js' type='text/javascript'></script>
|
|
<script src='./../docmap.js' type='text/javascript'></script>
|
|
<script src='./../prettify.js' type='text/javascript'></script>
|
|
<script src='./../lang-sc.js' type='text/javascript'></script>
|
|
<script type='text/javascript'>var helpRoot='./..';</script>
|
|
</head>
|
|
<ul id='menubar'></ul>
|
|
<body onload='fixTOC();prettyPrint()'>
|
|
<div class='contents'>
|
|
<div class='header'>
|
|
<div id='label'>SuperCollider CLASSES</div>
|
|
<div id='categories'><a href='./../Browse.html#UGens>Buffer>Info'>UGens>Buffer>Info</a></div>
|
|
<h1>BufRateScale</h1>
|
|
<div id='summary'>Buffer rate scaling in respect to server samplerate.</div>
|
|
</div>
|
|
<div class='subheader'>
|
|
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/InfoUGens.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/InfoUGens.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/BufInfoUGenBase.html">BufInfoUGenBase</a> : <a href="../Classes/UGen.html">UGen</a> : <a href="../Classes/AbstractFunction.html">AbstractFunction</a> : <a href="../Classes/Object.html">Object</a></div>
|
|
<div id='related'>See also: <a href="./../Classes/BufChannels.html">BufChannels</a>, <a href="./../Classes/BufDur.html">BufDur</a>, <a href="./../Classes/BufFrames.html">BufFrames</a>, <a href="./../Classes/BufSampleRate.html">BufSampleRate</a>, <a href="./../Classes/BufSamples.html">BufSamples</a></div>
|
|
</div>
|
|
<div id='toc'>
|
|
<ul class='toc'><li class='toc1'><a href='#description'>Description</a></li>
|
|
<ul class='toc'></ul><li class='toc1'><a href='#classmethods'>Class methods</a></li>
|
|
<ul class='toc'><li class='toc3'><a href='#*kr'>kr</a> <a href='#*ir'>ir</a> </li>
|
|
<li class='toc2'><a href='#Inherited%20class%20methods'>Inherited class methods</a></li>
|
|
</ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
|
|
<ul class='toc'><li class='toc2'><a href='#Inherited%20instance%20methods'>Inherited instance methods</a></li>
|
|
</ul><li class='toc1'><a href='#examples'>Examples</a></li>
|
|
<ul class='toc'></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
|
|
|
|
<p>Returns a ratio by which the playback of a soundfile is to be scaled.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
|
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*kr' href='./../Overviews/Methods.html#kr'>kr</a> (<span class='argstr'>bufnum</span>)</h3>
|
|
<div class='supmethod'>From superclass: <a href='./../Classes/BufInfoUGenBase.html'>BufInfoUGenBase</a></div>
|
|
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*ir' href='./../Overviews/Methods.html#ir'>ir</a> (<span class='argstr'>bufnum</span>)</h3>
|
|
<div class='supmethod'>From superclass: <a href='./../Classes/BufInfoUGenBase.html'>BufInfoUGenBase</a></div>
|
|
<div class='method'>
|
|
<p><h4>Arguments:</h4>
|
|
<table class='arguments'>
|
|
<tr><td class='argumentname'>bufnum<td class='argumentdesc'>
|
|
<p>Buffer index.</table><h4>Returns:</h4>
|
|
<div class='returnvalue'>
|
|
<p>a ratio by which the playback of a soundfile is to be scaled.</div><h4>Discussion:</h4>
|
|
<div class='warning'><span class='warninglabel'>WARNING:</span> The <code class='code prettyprint lang-sc'>.ir</code> method is not the safest choice. Since a buffer can be reallocated at any time, using <code class='code prettyprint lang-sc'>.ir</code> will not track the changes.</div></div><h3><a class='anchor' name='Inherited%20class%20methods'>Inherited class methods</a></h3>
|
|
<div id='inheritedclassmets'></div><h2><a class='anchor' name='instancemethods'>Instance Methods</a></h2>
|
|
<h3><a class='anchor' name='Inherited%20instance%20methods'>Inherited instance methods</a></h3>
|
|
<div id='inheritedinstmets'></div><h2><a class='anchor' name='examples'>Examples</a></h2>
|
|
<pre class='code prettyprint lang-sc'>b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
|
|
|
|
(
|
|
x = { arg rate=1;
|
|
BufRd.ar(1, b, Phasor.ar(0, BufRateScale.kr(b) * rate, 0, BufFrames.kr(b)))
|
|
}.play;
|
|
)</pre>
|
|
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/BufRateScale.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/BufRateScale.schelp</a><br>link::Classes/BufRateScale::<br>sc version: 3.8.0</div></div></body></html> |