You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

384 lines
23 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>LeanAudioOptions</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-23694672-1', 'dentedpixel.com');
ga('send', 'pageview');
</script>
<script src="../assets/js/leantween.js"></script>
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
<script src="http://yui.yahooapis.com/combo?3.8.0pr2/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="doc">
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><a href="http://dentedpixel.com/developer-diary/leantween-speed-comparison-to-itween/"><img src="http://s3.amazonaws.com/dentedpixel.com/LeanTween/leantween-logo.png" title=""></a></h1> <div style="position:absolute; left:146px; top:90px;">- Developed by <a href="http://www.dentedpixel.com">Dented Pixel</a></div>
</div>
<div class="yui3-u-1-4 version">
<em style="margin-top:2px">API Docs for: LeanTween 2.46</em><br>
<table id="support">
<tr>
<td>
<h3 style="margin:7px 0 3px 0; width: 200px;">Support LeanTween!</h3>
<!--<a href="http://www.amazon.com/?tag=carbcutt-20&camp=1&creative=4365&linkCode=ez&ref-refURL=" target="_blank">Click this link</a> before your<br>next Amazon shopping spree!<br>
-->
</td>
<td><!--
<a href="http://www.amazon.com/?tag=carbcutt-20&camp=1&creative=4365&linkCode=ez&ref-refURL=" target="_blank"><img src="http://dentedpixel.com/LeanTweenDocumentation/assets/img/amz.gif" width="148" height="40" title="shop amazon" /></a>-->
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin-top:5px;">
<!--<div style="margin:2px 0px 6px 24px; float:left;">or </div>-->
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="YJPUT3RAK5VL8">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</td>
</tr>
</table>
</div>
<h4 style="position:absolute; top:80px; right:7px; width:500px; letter-spacing:normal; word-spacing:normal; font-size:9pt; text-align:right; font-style: italic;">Maintaining and adding new features takes time, your support is appreciated.</h4>
</div>
<div id="bd" class="yui3-g">
<div class="yui3-u-1-4">
<div id="docs-sidebar" class="sidebar apidocs">
<div id="api-list">
<h2 class="off-left">APIs</h2>
<div id="api-tabview" class="tabview">
<ul class="tabs">
<li><a href="#api-classes">Classes</a></li>
<li><a href="#api-modules">Modules</a></li>
</ul>
<div id="api-tabview-filter">
<input type="search" id="api-filter" placeholder="Type to filter APIs">
</div>
<div id="api-tabview-panel">
<ul id="api-classes" class="apis classes">
<li><a href="../classes/LeanAudio.html">LeanAudio</a></li>
<li><a href="../classes/LeanAudioOptions.html">LeanAudioOptions</a></li>
<li><a href="../classes/LeanTween.html">LeanTween</a></li>
<li><a href="../classes/LeanTweenType.html">LeanTweenType</a></li>
<li><a href="../classes/LTBezierPath.html">LTBezierPath</a></li>
<li><a href="../classes/LTDescr.html">LTDescr</a></li>
<li><a href="../classes/LTEvent.html">LTEvent</a></li>
<li><a href="../classes/LTRect.html">LTRect</a></li>
<li><a href="../classes/LTSeq.html">LTSeq</a></li>
<li><a href="../classes/LTSpline.html">LTSpline</a></li>
</ul>
<ul id="api-modules" class="apis modules">
</ul>
</div>
</div>
</div>
<div id="advertising">
<h2>More From<br><a href="http://www.dentedpixel.com">Dented Pixel</a></h2><br>
<a href="https://www.assetstore.unity3d.com/en/#!/content/9455" target="_blank"><img src="http://dentedpixel.com/assets/LTEditor-doc-icon.jpg" width="175" height="175" /><br>Create tweens with: Visual Editor. Sculpt complex spline paths.</a>
<br>
<a href="https://itunes.apple.com/us/app/monkeyshines/id530998075?mt=8" target="_blank"><img src="http://a1.mzstatic.com/us/r30/Purple3/v4/d4/2b/ce/d42bce69-b3d3-d7f8-88e9-caa92664b5b1/icon350x350.jpeg" width="175" height="175" /><br>RIN - A swinging good time!</a>
<br>
<a href="https://itunes.apple.com/us/app/princess-piano/id445283531?mt=8" target="_blank"><img src="http://a3.mzstatic.com/us/r1000/096/Purple/v4/8c/1e/05/8c1e0590-db82-1d72-2956-2b6470f37ed0/mza_4230031260893485317.175x175-75.jpg" width="175" height="175" /><br>Princess Piano - Learn musical notation<br>in this melodious adventure!</a>
</div>
</div>
</div>
<div class="yui3-u-3-4">
<div id="api-options">
Show:
<label for="api-show-inherited">
<input type="checkbox" id="api-show-inherited" checked>
Inherited
</label>
<label for="api-show-protected">
<input type="checkbox" id="api-show-protected">
Protected
</label>
<label for="api-show-private">
<input type="checkbox" id="api-show-private">
Private
</label>
<label for="api-show-deprecated">
<input type="checkbox" id="api-show-deprecated">
Deprecated
</label>
</div>
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1>LeanAudioOptions Class</h1>
<div class="box meta">
<div class="foundat">
Defined in: <a href="../files/LeanAudio.cs.html#l316"><code>LeanAudio.cs:316</code></a>
</div>
</div>
<div class="box intro">
<p>Pass in options to LeanAudio</p>
</div>
<div class="constructor">
<h2>Constructor</h2>
<div id="method_LeanAudioOptions" class="method item">
<h3 class="name"><code>LeanAudioOptions</code></h3>
<span class="paren">()</span>
<div class="meta">
<p>
Defined in
<a href="../files/LeanAudio.cs.html#l316"><code>LeanAudio.cs:316</code></a>
</p>
</div>
<div class="description">
</div>
</div>
</div>
<div id="classdocs" class="tabview">
<ul class="api-class-tabs">
<li class="api-class-tab index"><a href="#index">Index</a></li>
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
</ul>
<div>
<div id="index" class="api-class-tabpanel index">
<h2 class="off-left">Item Index</h2>
<div class="index-section methods">
<h3>Methods</h3>
<ul class="index-list methods">
<li class="index-item method">
<a href="#method_setFrequency">setFrequency</a>
</li>
<li class="index-item method">
<a href="#method_setVibrato">setVibrato</a>
</li>
</ul>
</div>
</div>
<div id="methods" class="api-class-tabpanel">
<h2 class="off-left">Methods</h2>
<div id="method_setFrequency" class="method item">
<h3 class="name"><code>setFrequency</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>frequencyRate:int</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type"><a href="../classes/LeanAudioOptions.html" class="crosslink">LeanAudioOptions</a></span>
</span>
<div class="meta">
<p>
Defined in
<a href="../files/LeanAudio.cs.html#l343"><code>LeanAudio.cs:343</code></a>
</p>
</div>
<div class="description">
<p>Set the frequency for the audio is encoded. 44100 is CD quality, but you can usually get away with much lower (or use a lower amount to get a more 8-bit sound).</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">frequencyRate:int</code>
<span class="type">Int</span>
<div class="param-description">
<p>of the frequency you wish to encode the AudioClip at</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="../classes/LeanAudioOptions.html" class="crosslink">LeanAudioOptions</a></span>:
<p>LeanAudioOptions describing optional values</p>
</div>
</div>
<div class="example">
<h4>Example:</h4>
<div class="example-content">
<p>AnimationCurve volumeCurve = new AnimationCurve( new Keyframe(0f, 1f, 0f, -1f), new Keyframe(1f, 0f, -1f, 0f));<br>
AnimationCurve frequencyCurve = new AnimationCurve( new Keyframe(0f, 0.003f, 0f, 0f), new Keyframe(1f, 0.003f, 0f, 0f));<br>
AudioClip audioClip = LeanAudio.createAudio(volumeCurve, frequencyCurve, LeanAudio.options().setVibrato( new Vector3[]{ new Vector3(0.32f,0f,0f)} ).setFrequency(12100) );<br></p>
</div>
</div>
</div>
<div id="method_setVibrato" class="method item">
<h3 class="name"><code>setVibrato</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>vibratoArray:Vector3[]</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type"><a href="../classes/LeanAudioOptions.html" class="crosslink">LeanAudioOptions</a></span>
</span>
<div class="meta">
<p>
Defined in
<a href="../files/LeanAudio.cs.html#l359"><code>LeanAudio.cs:359</code></a>
</p>
</div>
<div class="description">
<p>Set details about the shape of the curve by adding vibrato modulations through it (alters the peak values giving it a wah-wah effect). You can add as many as you want to sculpt out more detail in the sound wave.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">vibratoArray:Vector3[]</code>
<span class="type">Vector3</span>
<div class="param-description">
<p>The first value is the period in seconds that you wish to have the vibrato wave fluctuate at. The second value is the minimum height you wish the vibrato wave to dip down to (default is zero). The third is reserved for future effects.</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="../classes/LeanAudioOptions.html" class="crosslink">LeanAudioOptions</a></span>:
<p>LeanAudioOptions describing optional values</p>
</div>
</div>
<div class="example">
<h4>Example:</h4>
<div class="example-content">
<p>AnimationCurve volumeCurve = new AnimationCurve( new Keyframe(0f, 1f, 0f, -1f), new Keyframe(1f, 0f, -1f, 0f));<br>
AnimationCurve frequencyCurve = new AnimationCurve( new Keyframe(0f, 0.003f, 0f, 0f), new Keyframe(1f, 0.003f, 0f, 0f));<br>
AudioClip audioClip = LeanAudio.createAudio(volumeCurve, frequencyCurve, LeanAudio.options().setVibrato( new Vector3[]{ new Vector3(0.32f,0.3f,0f)} ).setFrequency(12100) );<br></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>