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.

333 lines
20 KiB

4 years ago
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>LeanAudio</title>
  6. <link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
  7. <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
  8. <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
  9. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
  10. <script>
  11. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  12. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  13. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  14. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  15. ga('create', 'UA-23694672-1', 'dentedpixel.com');
  16. ga('send', 'pageview');
  17. </script>
  18. <script src="../assets/js/leantween.js"></script>
  19. <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
  20. <script src="http://yui.yahooapis.com/combo?3.8.0pr2/build/yui/yui-min.js"></script>
  21. </head>
  22. <body class="yui3-skin-sam">
  23. <div id="doc">
  24. <div id="hd" class="yui3-g header">
  25. <div class="yui3-u-3-4">
  26. <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>
  27. </div>
  28. <div class="yui3-u-1-4 version">
  29. <em style="margin-top:2px">API Docs for: LeanTween 2.46</em><br>
  30. <table id="support">
  31. <tr>
  32. <td>
  33. <h3 style="margin:7px 0 3px 0; width: 200px;">Support LeanTween!</h3>
  34. <!--<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>
  35. -->
  36. </td>
  37. <td><!--
  38. <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>-->
  39. <form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin-top:5px;">
  40. <!--<div style="margin:2px 0px 6px 24px; float:left;">or </div>-->
  41. <input type="hidden" name="cmd" value="_s-xclick">
  42. <input type="hidden" name="hosted_button_id" value="YJPUT3RAK5VL8">
  43. <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!">
  44. <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
  45. </form>
  46. </td>
  47. </tr>
  48. </table>
  49. </div>
  50. <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>
  51. </div>
  52. <div id="bd" class="yui3-g">
  53. <div class="yui3-u-1-4">
  54. <div id="docs-sidebar" class="sidebar apidocs">
  55. <div id="api-list">
  56. <h2 class="off-left">APIs</h2>
  57. <div id="api-tabview" class="tabview">
  58. <ul class="tabs">
  59. <li><a href="#api-classes">Classes</a></li>
  60. <li><a href="#api-modules">Modules</a></li>
  61. </ul>
  62. <div id="api-tabview-filter">
  63. <input type="search" id="api-filter" placeholder="Type to filter APIs">
  64. </div>
  65. <div id="api-tabview-panel">
  66. <ul id="api-classes" class="apis classes">
  67. <li><a href="../classes/LeanAudio.html">LeanAudio</a></li>
  68. <li><a href="../classes/LeanAudioOptions.html">LeanAudioOptions</a></li>
  69. <li><a href="../classes/LeanTween.html">LeanTween</a></li>
  70. <li><a href="../classes/LeanTweenType.html">LeanTweenType</a></li>
  71. <li><a href="../classes/LTBezierPath.html">LTBezierPath</a></li>
  72. <li><a href="../classes/LTDescr.html">LTDescr</a></li>
  73. <li><a href="../classes/LTEvent.html">LTEvent</a></li>
  74. <li><a href="../classes/LTRect.html">LTRect</a></li>
  75. <li><a href="../classes/LTSeq.html">LTSeq</a></li>
  76. <li><a href="../classes/LTSpline.html">LTSpline</a></li>
  77. </ul>
  78. <ul id="api-modules" class="apis modules">
  79. </ul>
  80. </div>
  81. </div>
  82. </div>
  83. <div id="advertising">
  84. <h2>More From<br><a href="http://www.dentedpixel.com">Dented Pixel</a></h2><br>
  85. <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>
  86. <br>
  87. <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>
  88. <br>
  89. <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>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="yui3-u-3-4">
  94. <div id="api-options">
  95. Show:
  96. <label for="api-show-inherited">
  97. <input type="checkbox" id="api-show-inherited" checked>
  98. Inherited
  99. </label>
  100. <label for="api-show-protected">
  101. <input type="checkbox" id="api-show-protected">
  102. Protected
  103. </label>
  104. <label for="api-show-private">
  105. <input type="checkbox" id="api-show-private">
  106. Private
  107. </label>
  108. <label for="api-show-deprecated">
  109. <input type="checkbox" id="api-show-deprecated">
  110. Deprecated
  111. </label>
  112. </div>
  113. <div class="apidocs">
  114. <div id="docs-main">
  115. <div class="content">
  116. <h1>LeanAudio Class</h1>
  117. <div class="box meta">
  118. <div class="foundat">
  119. Defined in: <a href="../files/LeanAudio.cs.html#l30"><code>LeanAudio.cs:30</code></a>
  120. </div>
  121. </div>
  122. <div class="box intro">
  123. <p>Create Audio dynamically and easily playback</p>
  124. </div>
  125. <div class="constructor">
  126. <h2>Constructor</h2>
  127. <div id="method_LeanAudio" class="method item">
  128. <h3 class="name"><code>LeanAudio</code></h3>
  129. <span class="paren">()</span>
  130. <div class="meta">
  131. <p>
  132. Defined in
  133. <a href="../files/LeanAudio.cs.html#l30"><code>LeanAudio.cs:30</code></a>
  134. </p>
  135. </div>
  136. <div class="description">
  137. </div>
  138. </div>
  139. </div>
  140. <div id="classdocs" class="tabview">
  141. <ul class="api-class-tabs">
  142. <li class="api-class-tab index"><a href="#index">Index</a></li>
  143. <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
  144. </ul>
  145. <div>
  146. <div id="index" class="api-class-tabpanel index">
  147. <h2 class="off-left">Item Index</h2>
  148. <div class="index-section methods">
  149. <h3>Methods</h3>
  150. <ul class="index-list methods">
  151. <li class="index-item method">
  152. <a href="#method_createAudio">createAudio</a>
  153. </li>
  154. </ul>
  155. </div>
  156. </div>
  157. <div id="methods" class="api-class-tabpanel">
  158. <h2 class="off-left">Methods</h2>
  159. <div id="method_createAudio" class="method item">
  160. <h3 class="name"><code>createAudio</code></h3>
  161. <div class="args">
  162. <span class="paren">(</span><ul class="args-list inline commas">
  163. <li class="arg">
  164. <code>volumeCurve:AnimationCurve</code>
  165. </li>
  166. <li class="arg">
  167. <code>frequencyCurve:AnimationCurve</code>
  168. </li>
  169. <li class="arg">
  170. <code>options:LeanAudioOptions</code>
  171. </li>
  172. </ul><span class="paren">)</span>
  173. </div>
  174. <span class="returns-inline">
  175. <span class="type">AudioClip</span>
  176. </span>
  177. <div class="meta">
  178. <p>
  179. Defined in
  180. <a href="../files/LeanAudio.cs.html#l65"><code>LeanAudio.cs:65</code></a>
  181. </p>
  182. </div>
  183. <div class="description">
  184. <p>Create dynamic audio from a set of Animation Curves and other options.</p>
  185. </div>
  186. <div class="params">
  187. <h4>Parameters:</h4>
  188. <ul class="params-list">
  189. <li class="param">
  190. <code class="param-name">volumeCurve:AnimationCurve</code>
  191. <span class="type">AnimationCurve</span>
  192. <div class="param-description">
  193. <p>describing the shape of the audios volume (from 0-1). The length of the audio is dicated by the end value here.</p>
  194. </div>
  195. </li>
  196. <li class="param">
  197. <code class="param-name">frequencyCurve:AnimationCurve</code>
  198. <span class="type">AnimationCurve</span>
  199. <div class="param-description">
  200. <p>describing the width of the oscillations between the sound waves in seconds. Large numbers mean a lower note, while higher numbers mean a tighter frequency and therefor a higher note. Values are usually between 0.01 and 0.000001 (or smaller)</p>
  201. </div>
  202. </li>
  203. <li class="param">
  204. <code class="param-name">options:LeanAudioOptions</code>
  205. <span class="type"><a href="../classes/LeanAudioOptions.html" class="crosslink">LeanAudioOptions</a></span>
  206. <div class="param-description">
  207. <p>You can pass any other values in here like vibrato or the frequency you would like the sound to be encoded at. See <a href="LeanAudioOptions.html">LeanAudioOptions</a> for more details.</p>
  208. </div>
  209. </li>
  210. </ul>
  211. </div>
  212. <div class="returns">
  213. <h4>Returns:</h4>
  214. <div class="returns-description">
  215. <span class="type">AudioClip</span>:
  216. <p>AudioClip of the procedurally generated audio</p>
  217. </div>
  218. </div>
  219. <div class="example">
  220. <h4>Example:</h4>
  221. <div class="example-content">
  222. <p>AnimationCurve volumeCurve = new AnimationCurve( new Keyframe(0f, 1f, 0f, -1f), new Keyframe(1f, 0f, -1f, 0f));<br>
  223. AnimationCurve frequencyCurve = new AnimationCurve( new Keyframe(0f, 0.003f, 0f, 0f), new Keyframe(1f, 0.003f, 0f, 0f));<br>
  224. AudioClip audioClip = LeanAudio.createAudio(volumeCurve, frequencyCurve, LeanAudio.options().setVibrato( new Vector3[]{ new Vector3(0.32f,0f,0f)} ));<br></p>
  225. </div>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. </div>
  235. </div>
  236. </div>
  237. <script src="../assets/vendor/prettify/prettify-min.js"></script>
  238. <script>prettyPrint();</script>
  239. <script src="../assets/js/yui-prettify.js"></script>
  240. <script src="../assets/../api.js"></script>
  241. <script src="../assets/js/api-filter.js"></script>
  242. <script src="../assets/js/api-list.js"></script>
  243. <script src="../assets/js/api-search.js"></script>
  244. <script src="../assets/js/apidocs.js"></script>
  245. </body>
  246. </html>