Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / how to fade out a sound/music?

Author
Message
ico2
21
Years of Service
User Offline
Joined: 3rd Jan 2004
Location:
Posted: 10th Mar 2004 15:08
can this be done?
hexGEAR
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 10th Mar 2004 15:21
there's a set sound volume command but no set music volume command so i guess you could gradually reduce the volume of the sound from it's maximum 100 to 0.

TKF15H
21
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 10th Mar 2004 16:46
put "set sound volume 1, sound volume(1)-10" in a loop. Just remember
to stop before reaching 0.

Can I see a demo now?
hexGEAR
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 10th Mar 2004 17:33
that would be way too fast, go with a gain of about 1 or even less.

David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 10th Mar 2004 19:17
I prefer to control the sound volume using curvevalue()



"To do is to be" - Descartes
"To be is to do" - Voltaire
"Do be do be do" - Frank Sinatra
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 10th Mar 2004 23:50
I use a variable!

WaitVar = 10

do
dec WaitVar,1

if WaitVar < 0
set sound volume 1, sound volume(1)-10
WaitVar = 10
Endif

Loop

Simple


We need help! Email us! [email protected]

Login to post a reply

Server time is: 2025-05-23 08:23:22
Your offset time is: 2025-05-23 08:23:22