mirror of
https://github.com/nucular/sfxrlua.git
synced 2024-12-24 18:44:20 +00:00
More documentation stuff
This commit is contained in:
parent
fd81eea263
commit
5337a0cd3c
@ -56,7 +56,7 @@
|
|||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#newSound">newSound (...)</a></td>
|
<td class="name" nowrap><a href="#newSound">newSound (...)</a></td>
|
||||||
<td class="summary">The constructor for the Sound class.</td>
|
<td class="summary">Construct and return a new <a href="../index.html#Sound">Sound</a> instance.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<h2><a href="#Tables">Tables</a></h2>
|
<h2><a href="#Tables">Tables</a></h2>
|
||||||
@ -387,7 +387,7 @@ y_Sustain_Release_.28ADSR.29_envelope">ASD envelope</a> that controls the sound
|
|||||||
<strong>newSound (...)</strong>
|
<strong>newSound (...)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The constructor for the Sound class.
|
Construct and return a new <a href="../index.html#Sound">Sound</a> instance.
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -425,16 +425,16 @@ y_Sustain_Release_.28ADSR.29_envelope">ASD envelope</a> that controls the sound
|
|||||||
<h3>Fields:</h3>
|
<h3>Fields:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">SQUARE</span>
|
<li><span class="parameter">SQUARE</span>
|
||||||
square wave (<code>= 0</code>)
|
<a href="https://en.wikipedia.org/wiki/Square_wave">square wave</a> (<code>= 0</code>)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">SAW</span>
|
<li><span class="parameter">SAW</span>
|
||||||
saw wave (<code>= 1</code>)
|
<a href="https://en.wikipedia.org/wiki/Sawtooth_wave">saw wave</a> (<code>= 1</code>)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">SINE</span>
|
<li><span class="parameter">SINE</span>
|
||||||
sine wave (<code>= 2</code>)
|
<a href="https://en.wikipedia.org/wiki/Sine_wave">sine wave</a> (<code>= 2</code>)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">NOISE</span>
|
<li><span class="parameter">NOISE</span>
|
||||||
white noise (<code>= 3</code>)
|
<a href="https://en.wikipedia.org/wiki/White_noise">white noise</a> (<code>= 3</code>)
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -1674,7 +1674,7 @@ y_Sustain_Release_.28ADSR.29_envelope">ASD envelope</a> that controls the sound
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
||||||
<i style="float:right;">Last updated 2016-03-05 20:16:35 </i>
|
<i style="float:right;">Last updated 2016-03-05 20:26:21 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap><a href="#newSound">newSound (...)</a></td>
|
<td class="name" nowrap><a href="#newSound">newSound (...)</a></td>
|
||||||
<td class="summary">The constructor for the Sound class.</td>
|
<td class="summary">Construct and return a new <a href="index.html#Sound">Sound</a> instance.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<h2><a href="#Tables">Tables</a></h2>
|
<h2><a href="#Tables">Tables</a></h2>
|
||||||
@ -387,7 +387,7 @@ y_Sustain_Release_.28ADSR.29_envelope">ASD envelope</a> that controls the sound
|
|||||||
<strong>newSound (...)</strong>
|
<strong>newSound (...)</strong>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The constructor for the Sound class.
|
Construct and return a new <a href="index.html#Sound">Sound</a> instance.
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameters:</h3>
|
<h3>Parameters:</h3>
|
||||||
@ -425,16 +425,16 @@ y_Sustain_Release_.28ADSR.29_envelope">ASD envelope</a> that controls the sound
|
|||||||
<h3>Fields:</h3>
|
<h3>Fields:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="parameter">SQUARE</span>
|
<li><span class="parameter">SQUARE</span>
|
||||||
square wave (<code>= 0</code>)
|
<a href="https://en.wikipedia.org/wiki/Square_wave">square wave</a> (<code>= 0</code>)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">SAW</span>
|
<li><span class="parameter">SAW</span>
|
||||||
saw wave (<code>= 1</code>)
|
<a href="https://en.wikipedia.org/wiki/Sawtooth_wave">saw wave</a> (<code>= 1</code>)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">SINE</span>
|
<li><span class="parameter">SINE</span>
|
||||||
sine wave (<code>= 2</code>)
|
<a href="https://en.wikipedia.org/wiki/Sine_wave">sine wave</a> (<code>= 2</code>)
|
||||||
</li>
|
</li>
|
||||||
<li><span class="parameter">NOISE</span>
|
<li><span class="parameter">NOISE</span>
|
||||||
white noise (<code>= 3</code>)
|
<a href="https://en.wikipedia.org/wiki/White_noise">white noise</a> (<code>= 3</code>)
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -1674,7 +1674,7 @@ y_Sustain_Release_.28ADSR.29_envelope">ASD envelope</a> that controls the sound
|
|||||||
</div> <!-- id="main" -->
|
</div> <!-- id="main" -->
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
||||||
<i style="float:right;">Last updated 2016-03-05 20:16:35 </i>
|
<i style="float:right;">Last updated 2016-03-05 20:26:21 </i>
|
||||||
</div> <!-- id="about" -->
|
</div> <!-- id="about" -->
|
||||||
</div> <!-- id="container" -->
|
</div> <!-- id="container" -->
|
||||||
</body>
|
</body>
|
||||||
|
10
sfxr.lua
10
sfxr.lua
@ -32,10 +32,10 @@ local bit = bit32 or require("bit")
|
|||||||
sfxr.VERSION = "0.0.2"
|
sfxr.VERSION = "0.0.2"
|
||||||
|
|
||||||
--- [Waveform](https://en.wikipedia.org/wiki/Waveform) constants
|
--- [Waveform](https://en.wikipedia.org/wiki/Waveform) constants
|
||||||
-- @field SQUARE square wave (`= 0`)
|
-- @field SQUARE [square wave](https://en.wikipedia.org/wiki/Square_wave) (`= 0`)
|
||||||
-- @field SAW saw wave (`= 1`)
|
-- @field SAW [saw wave](https://en.wikipedia.org/wiki/Sawtooth_wave) (`= 1`)
|
||||||
-- @field SINE sine wave (`= 2`)
|
-- @field SINE [sine wave](https://en.wikipedia.org/wiki/Sine_wave) (`= 2`)
|
||||||
-- @field NOISE white noise (`= 3`)
|
-- @field NOISE [white noise](https://en.wikipedia.org/wiki/White_noise) (`= 3`)
|
||||||
sfxr.WAVEFORM = {
|
sfxr.WAVEFORM = {
|
||||||
SQUARE = 0,
|
SQUARE = 0,
|
||||||
[0] = 0,
|
[0] = 0,
|
||||||
@ -225,7 +225,7 @@ local function unpackIEEE754(packed)
|
|||||||
return math.ldexp(mantissa, exponent - 0x7F)
|
return math.ldexp(mantissa, exponent - 0x7F)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- The constructor for the Sound class.
|
--- Construct and return a new @{Sound} instance.
|
||||||
-- @treturn Sound a Sound instance
|
-- @treturn Sound a Sound instance
|
||||||
function sfxr.newSound(...)
|
function sfxr.newSound(...)
|
||||||
local instance = setmetatable({}, sfxr.Sound)
|
local instance = setmetatable({}, sfxr.Sound)
|
||||||
|
Loading…
Reference in New Issue
Block a user