Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sound effects experimentation
#2
Ah, that makes it a lot easier to find good parameters Smile

I added a hack to unflag the mousebutton when the user clicks "PLAY SOUND", because I kept getting multiple instances of the sound effect playing.

Code:
...
if mousebutton(0)
    if mousey() > 60 and mousey() < 110
        if mousex() > 20 and mousex() < 220
            tmp = mousebutton(0, true) ' mousebutton will return false until it has been
                                          ' released and pressed again.
            play_sound = true
            laserShotSnd = CreateSquareSfx(duration, startFreq, endFreq, fadeOut, sampleRate)
            play sound laserShotSnd
        endif 
    endif
endif
...

Maybe I should write some examples on how to use the ngui library that NED and all the included editors are using. It makes it easier to make these type of programs.
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: 2 Guest(s)