mirror of
https://github.com/nucular/sfxrlua.git
synced 2024-12-24 18:44:20 +00:00
Fixed generators
This commit is contained in:
parent
abfa927494
commit
f3e49ab0a8
8
sfxr.lua
8
sfxr.lua
@ -560,9 +560,9 @@ end
|
|||||||
function sfxr.Sound:randomLaser(seed)
|
function sfxr.Sound:randomLaser(seed)
|
||||||
if seed then setseed(seed) end
|
if seed then setseed(seed) end
|
||||||
self:resetParameters()
|
self:resetParameters()
|
||||||
self.waveType = trunc(random(0, 2))
|
self.waveType = trunc(random(0, 2)) + 1
|
||||||
if self.waveType == sfxr.SINE and maybe() then
|
if self.waveType == sfxr.SINE and maybe() then
|
||||||
self.waveType = trunc(random(0, 1))
|
self.waveType = trunc(random(0, 1)) + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
if maybe(2) then
|
if maybe(2) then
|
||||||
@ -669,7 +669,7 @@ end
|
|||||||
function sfxr.Sound:randomHit(seed)
|
function sfxr.Sound:randomHit(seed)
|
||||||
if seed then setseed(seed) end
|
if seed then setseed(seed) end
|
||||||
self:resetParameters()
|
self:resetParameters()
|
||||||
self.waveType = trunc(random(0, 2))
|
self.waveType = trunc(random(0, 2)) + 1
|
||||||
|
|
||||||
if self.waveType == sfxr.SINE then
|
if self.waveType == sfxr.SINE then
|
||||||
self.waveType = 3
|
self.waveType = 3
|
||||||
@ -712,7 +712,7 @@ end
|
|||||||
function sfxr.Sound:randomBlip(seed)
|
function sfxr.Sound:randomBlip(seed)
|
||||||
if seed then setseed(seed) end
|
if seed then setseed(seed) end
|
||||||
self:resetParameters()
|
self:resetParameters()
|
||||||
self.waveType = trunc(random(0, 1))
|
self.waveType = trunc(random(0, 1)) + 1
|
||||||
|
|
||||||
if self.waveType == 0 then
|
if self.waveType == 0 then
|
||||||
self.duty.ratio = random(0, 0.6)
|
self.duty.ratio = random(0, 0.6)
|
||||||
|
Loading…
Reference in New Issue
Block a user