From f3e49ab0a850e19be76694bba9904b5d9d7cbdb6 Mon Sep 17 00:00:00 2001 From: nucular Date: Sun, 25 May 2014 21:15:17 +0200 Subject: [PATCH] Fixed generators --- sfxr.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sfxr.lua b/sfxr.lua index e42ede2..5b873d8 100644 --- a/sfxr.lua +++ b/sfxr.lua @@ -560,9 +560,9 @@ end function sfxr.Sound:randomLaser(seed) if seed then setseed(seed) end self:resetParameters() - self.waveType = trunc(random(0, 2)) + self.waveType = trunc(random(0, 2)) + 1 if self.waveType == sfxr.SINE and maybe() then - self.waveType = trunc(random(0, 1)) + self.waveType = trunc(random(0, 1)) + 1 end if maybe(2) then @@ -669,7 +669,7 @@ end function sfxr.Sound:randomHit(seed) if seed then setseed(seed) end self:resetParameters() - self.waveType = trunc(random(0, 2)) + self.waveType = trunc(random(0, 2)) + 1 if self.waveType == sfxr.SINE then self.waveType = 3 @@ -712,7 +712,7 @@ end function sfxr.Sound:randomBlip(seed) if seed then setseed(seed) end self:resetParameters() - self.waveType = trunc(random(0, 1)) + self.waveType = trunc(random(0, 1)) + 1 if self.waveType == 0 then self.duty.ratio = random(0, 0.6)