From 528321dce3c61eb463c2f16132a84bd054fda1ea Mon Sep 17 00:00:00 2001 From: nucular Date: Mon, 26 May 2014 18:03:07 +0200 Subject: [PATCH] Preserve wave type when randomizing --- sfxr.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sfxr.lua b/sfxr.lua index 592d137..d2f21c5 100644 --- a/sfxr.lua +++ b/sfxr.lua @@ -459,7 +459,11 @@ end function sfxr.Sound:randomize(seed) if seed then setseed(seed) end + + local wavetype = self.wavetype self:resetParameters() + self.wavetype = wavetype + if maybe() then self.repeatspeed = random(0, 1) end