mirror of
https://github.com/nucular/sfxrlua.git
synced 2024-12-05 11:34:21 +00:00
More documentation stuff
This commit is contained in:
parent
fd81eea263
commit
5337a0cd3c
@ -56,7 +56,7 @@
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<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>
|
||||
</table>
|
||||
<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>
|
||||
</dt>
|
||||
<dd>
|
||||
The constructor for the Sound class.
|
||||
Construct and return a new <a href="../index.html#Sound">Sound</a> instance.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
@ -425,16 +425,16 @@ y_Sustain_Release_.28ADSR.29_envelope">ASD envelope</a> that controls the sound
|
||||
<h3>Fields:</h3>
|
||||
<ul>
|
||||
<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><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><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><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>
|
||||
</ul>
|
||||
|
||||
@ -1674,7 +1674,7 @@ y_Sustain_Release_.28ADSR.29_envelope">ASD envelope</a> that controls the sound
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<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="container" -->
|
||||
</body>
|
||||
|
@ -56,7 +56,7 @@
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<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>
|
||||
</table>
|
||||
<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>
|
||||
</dt>
|
||||
<dd>
|
||||
The constructor for the Sound class.
|
||||
Construct and return a new <a href="index.html#Sound">Sound</a> instance.
|
||||
|
||||
|
||||
<h3>Parameters:</h3>
|
||||
@ -425,16 +425,16 @@ y_Sustain_Release_.28ADSR.29_envelope">ASD envelope</a> that controls the sound
|
||||
<h3>Fields:</h3>
|
||||
<ul>
|
||||
<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><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><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><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>
|
||||
</ul>
|
||||
|
||||
@ -1674,7 +1674,7 @@ y_Sustain_Release_.28ADSR.29_envelope">ASD envelope</a> that controls the sound
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<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="container" -->
|
||||
</body>
|
||||
|
10
sfxr.lua
10
sfxr.lua
@ -32,10 +32,10 @@ local bit = bit32 or require("bit")
|
||||
sfxr.VERSION = "0.0.2"
|
||||
|
||||
--- [Waveform](https://en.wikipedia.org/wiki/Waveform) constants
|
||||
-- @field SQUARE square wave (`= 0`)
|
||||
-- @field SAW saw wave (`= 1`)
|
||||
-- @field SINE sine wave (`= 2`)
|
||||
-- @field NOISE white noise (`= 3`)
|
||||
-- @field SQUARE [square wave](https://en.wikipedia.org/wiki/Square_wave) (`= 0`)
|
||||
-- @field SAW [saw wave](https://en.wikipedia.org/wiki/Sawtooth_wave) (`= 1`)
|
||||
-- @field SINE [sine wave](https://en.wikipedia.org/wiki/Sine_wave) (`= 2`)
|
||||
-- @field NOISE [white noise](https://en.wikipedia.org/wiki/White_noise) (`= 3`)
|
||||
sfxr.WAVEFORM = {
|
||||
SQUARE = 0,
|
||||
[0] = 0,
|
||||
@ -225,7 +225,7 @@ local function unpackIEEE754(packed)
|
||||
return math.ldexp(mantissa, exponent - 0x7F)
|
||||
end
|
||||
|
||||
--- The constructor for the Sound class.
|
||||
--- Construct and return a new @{Sound} instance.
|
||||
-- @treturn Sound a Sound instance
|
||||
function sfxr.newSound(...)
|
||||
local instance = setmetatable({}, sfxr.Sound)
|
||||
|
Loading…
Reference in New Issue
Block a user