Closed jorio closed 10 years ago
By the way, I came across this in reset():
-- subtract 0.017 to match the pitch of the original
fperiod = 100 / ((self.frequency.start - 0.017)^2 + 0.001)
That 0.017 actually seemed to have an adverse effect. Since I couldn't find out how you came up with this number, I removed it; it seems to work fine without it, and the pitch doesn't sound like it's different from the original.
Thanks for your help! The 0.017 is a result of plain experimentation.
I combed through the code, compared with the reference implementation, and corrected some small mistakes. I believe sfxrlua now sounds pretty much identical to vanilla sfxr, except for the volume level. You can test this with my other patch to read binary sfxr files.