Sound volume toggle ON/OFF EXAMPLE 2 download

Hi eveyone… here is a blendfile with a script that toggles the sound of a wav, on and off by lowering and raising the volume/gain… press “S” to toggle the sound…

—>you will also need to get your own wav file and get the sound actuator to play that wav instead of mine cos mine is too large to upload. You must do this first otherwise nothing will happen (without a sound file it will give you an error in the Command prompt)

for those of you who don’t know you load sounds into blender: Go to the scene button and find the sound block buttons.

the link to download the blendfile

the script is documented so it should help you make your own toggle switches for other things besides making the volume of a sound go up and down. …enjoy;)

a screengrab of the blend file below

:confused:…wow no-one interested… weird. no feedback etc etc? Did it work for other people?:eek:

Ah, the solitude of the “poster”… :slight_smile:
Sorry, I can test it, I have sound problems…a Blender/Linux classic when you have poor old sound cards
Anyway, thank you

Sorry, I’ve been gone a while, but it looks good. Yeah, people are bad about responding lately…

thanks for the feedback… you can use the toggle switch to do stuff that doesn’t have to involve music… I’ll make an example without music… I like using properties so I can debug while watching the gamengine… see if the script is doing what I want it to be doing.

You could do a cool bullet time sound effect by lowering the velocity of the sound -would be easy but the bullet time slowdown for everything else would be hard… dunno how to do that? Anyway i’ve got some other interesting stuff i’m gonno post soon like how to use random numbers to make things happen…