0 Favourites

Sound volume only negative?

  • Hi,

       I couldn�t find an example (cap) or make it work for positive values of volume in the Sound Plugin.

       Actually, Audacity also gives limites to amplification for some files.

       Can someone help me? Should I upload the sound with maximum value and then lower the volume (e.g. Background music)?

        Cheers,

        Jerry

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • xexeo - What actions are you using in the event sheet to try and increase the sound? Using the "play sound" action, you should be able to type in a value in the volume box and notice a difference. Maybe try posting a screenshot or capx of the problem you're having?

  • 0 is max volume, negative infinity is off. This may sound a little strange but (I think) it's the standard way to do volume.

    (I would really like the ability to set the volume from 0-100% however!)

  • xexeo Yes 0db is the standard digital max volume. It means if a sound file is "normalised" the maximum peaks in the wave will be at 0db.

    It avoids clipping where the tops of the waves get cut off causing distortion (you can't exceed 1111111111111111 in a 16bit file, which is your 0dB).

    If your files are too quiet, you can "normalise" them using an audio editor, which will place the loudest sound in the sample at 0db.

    Anything you want quieter should be reduced below that.

    Audio editors allow you to go higher but its basically a multiplication (adding 6db for every perceived doubling in volume). With an audio editor you make sure you don't go into the red (which is the total audio output exceeding 0 db). So you could have a recording at -12dB and set +10dB in the audio editor, but your output would be -2dB. An audio editor will let you go into the red but the sound will be distorted.

  • Most audio APIs don't allow you to amplify audio - even if they did, it would be really easy to clip your audio and then it would distort and sound horrible. So to achieve volume differences, normalise all your sounds to maximum volume, and turn things down.

  • sqiddster

    This formula will convert a percent (x) to dB:

    20*log10(x/100)

  • R0J0hound, fascinating! I'll have to hook that up to a function and make by life a little easier.

  • the best formula is

    -log10(100/x)*33.2

    (with 33.2 is 10*log2(10))

    x is percent between (0,100]

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