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 Professional Discussion / Improving music fade in-fade out

Author
Message
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 11th Jul 2006 15:48
Hi,

I have noticed that "set music volume" only accepts integers as volume. That represents a jump from 0 to 1 when fading in and out.

That could be said as that "1" is the minimum volume for a music, and that is not low enough to make a good fade effect (in or out).

So when fading (setting music volume), the music "abruptly" starts or ends. Well, not very abruptly, but it can be noticed.

I attach an example.

Anyone knows how to improve this?

Attachments

Login to view attachments
Reaperman
20
Years of Service
User Offline
Joined: 9th Sep 2003
Location: Kent, England
Posted: 11th Jul 2006 15:55
Quote: "Anyone knows how to improve this?"


Yes.... Just put your music in to a program like sound forge and use the fade in effect, then save your music back out.

So when you load it in to DB the music will already be faded so you will not notice the "jump" when you move the volume from 0 to 1.

Cheers
Reaperman
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 11th Jul 2006 18:09
That's a good solution, but sometimes you have to stop the music before the file ends (it is still playing).
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 11th Jul 2006 18:45 Edited at: 11th Jul 2006 18:46
Well it accepts a real number from 0.0 to 100.0, so I don't see the problem .

It will be very noticeable if your only fading in 11 stages, but mess with real numbers instead from 0.0 to 100.0.

Seems fine in Krait, quite a neat effect actually, never noticed any chunkyness to the fading.

Aegrescit medendo
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 11th Jul 2006 19:08
it accepts a real number between 0 - 200
and following is a quick demonstration.

Attachments

Login to view attachments
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 11th Jul 2006 19:35 Edited at: 11th Jul 2006 19:36
It accepts real numbers, but I bet the function only uses integers. I say that because the header of DGDK function is:


Yes, I raised the volume to only 10 units, but it was rather to have the example executed in a shorter time. Maybe I could be using 200 at max, but I don't want the user to be annoyed by a music that is too loud.

No problems in your experience? Ok, I'll try that. Thanks.
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 11th Jul 2006 19:36
no problems here

Login to post a reply

Server time is: 2024-04-24 23:56:17
Your offset time is: 2024-04-24 23:56:17