Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sound effects experimentation
#4
(01-20-2024, 09:33 PM)Marcus Wrote: 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.

I've had a look at the ngui library in the past for this type of program, but wasn't able to work out how to apply it, so I would certainly appreciate seeing some examples Marcus.
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)