Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sound effects experimentation
#7
(01-21-2024, 06:26 PM)johnno56 Wrote: Kevin,

Firstly... Cool additions... Immediately drawn to the "noise" generator... "Pitch" may need a "tweak". I wanted to see how "low" it would go... you know for explosions etc... The slider, using the mouse, can get it down to "-0". Yep. That's a minus... "invalid pitch" error... getting the pitch down to "0.05" works fine...

J

Johnno,

Thank you so much for finding that. I've fixed the code above. If you just want to change the code in your saved program, you will need to change lines 480 & 481 to this:
Code:
elseif mousex() > screen_w  - 220 and mousex() < screen_w  - 220 + pitch3  * 200/5
            pitch3 = max(0.01,pitch3 - 0.05)

Line 480 has nothing to do with the -0 issue, but caused a different issue where the slider would move to the left even though the mouse was to the right, but outside of the blue box.

I note that if line 481 is set to "pitch3 = max(0.00,pitch3 - 0.05)" it still causes a crash, so I assume that pitch has to be > 0.

I have absolutely no idea why the value was showing as -0.0 (negative), but the above seems to fix it. I can only assume that there is an issue with rounding.
Reply


Messages In This Thread
Sound effects experimentation - by kevin - 01-20-2024, 05:12 PM
RE: Sound effects experimentation - by Marcus - 01-20-2024, 09:33 PM
RE: Sound effects experimentation - by kevin - 01-21-2024, 04:50 AM
RE: Sound effects experimentation - by kevin - 01-21-2024, 06:55 AM
RE: Sound effects experimentation - by johnno56 - 01-21-2024, 06:26 PM
RE: Sound effects experimentation - by kevin - 01-21-2024, 07:02 PM
RE: Sound effects experimentation - by johnno56 - 01-21-2024, 07:33 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)