Why use db for unit of audio volume?

0 favourites
From the Asset Store
SCI-FI Units SFX contains 456 sounds With this pack, you can voice almost all the units in your sci-fi strategy game
  • jayderyu

    Thank you, and thank Ashley .

    BTW, it might be useful to have some documents about how to use db directly (for example, fade-in sound), or concept about linear number and db in audio manual chapter.

  • I calculate a function about volume and db :

    If db 0 = original volume, -10 is half, 10 is double ( but max is 0), then :

    Volume = 2 ^ ( db / 10 )

    db = 10 * log( Volume ) / log( 2 )

    Range of value:

    0 <= Volume <= 1;

    1 = original volume, 0 = silence.

    -Infinity ( or -60 for human ear ) <= db <= 0 ;

    0 = original volume, -Infinity or -60 = silence.

    And I made a little sample capx about fade in/out.

    Here is Sample : https://dl.dropboxusercontent.com/u/507 ... index.html

    And capx : https://drive.google.com/file/d/0BzBB_g ... sp=sharing

    not sure is it correct, but sounds good to me.

    If you cannot hear the sound please wait a second or refresh. <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    Thanks.

  • Can't we just have a simple begin Fade-Out type behaviors as we do for Sprites but for Audio as well?

  • EddyDingDongs

    I had made a plugin to fade-in/fade-out using lerp db.

    Try this

  • EddyDingDongs

    I had made a plugin to fade-in/fade-out using lerp db.

    Try this

    Thanks rex, will try it!!

  • Sorry Rex, unfortunately your plugin didn't work for my needs, i set fade out 5 seconds and their volume stayed the same and then just ubruptly cut out at 5-seconds, but i don't think it's your fault, i am doing some complex things with already setting volume every tick to a smooth graph of Array points, i think your plugin would work if it was using like a second pass volume that's on another layer to the existing volume variable.

    Sort of like how you can set a Sprite at 65% opacity and the Fade behavior will still fade that out from 65% to 0% smoothly.

  • It's not too hard to make a function to convert back and forth from db and a scale system (e.g. 0-100).

    Scale = 100 * 10 ^ (dB / 33.2)

    dB = -log10(100 / Scale) * 33.2

    Thanks! That's what I need!

    And Ashley , It would be good to add that to the manual, as I think.

    Or adding expression to the plugin would be nice!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I calculate a function about volume and db :

    If db 0 = original volume, -10 is half, 10 is double ( but max is 0), then :

    Volume = 2 ^ ( db / 10 )

    db = 10 * log( Volume ) / log( 2 )

    Range of value:

    0 <= Volume <= 1;

    1 = original volume, 0 = silence.

    -Infinity ( or -60 for human ear ) <= db <= 0 ;

    0 = original volume, -Infinity or -60 = silence.

    And I made a little sample capx about fade in/out.

    Here is Sample : dl.dropboxusercontent.com/u/507 ... index.html

    And capx : drive.google.com/file/d/0BzBB_g ... sp=sharing

    not sure is it correct, but sounds good to me.

    If you cannot hear the sound please wait a second or refresh. <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" />

    Thanks.

    <img src="{SMILIES_PATH}/icon_e_surprised.gif" alt=":o" title="Surprised" /> <img src="{SMILIES_PATH}/icon_e_surprised.gif" alt=":o" title="Surprised" /> <img src="{SMILIES_PATH}/icon_e_surprised.gif" alt=":o" title="Surprised" /> YOU ARE A MASTER OF SOUND <img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /> <img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /> <img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" />

    thanks a lot

    I spent two days breaking my head for this and nothing (until now <img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /> )

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)