Sound volume only negative?

Discussion and feedback on Construct 2

Post » Tue Feb 05, 2013 7:29 pm

Hi,

   I couldnt 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
B
6
S
1
Posts: 16
Reputation: 1,116

Post » Tue Feb 05, 2013 7:59 pm

@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?
B
16
S
6
G
2
Posts: 152
Reputation: 3,764

Post » Tue Feb 05, 2013 10:51 pm

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!)
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Wed Feb 06, 2013 8:46 am

@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.
B
29
S
8
G
4
Posts: 61
Reputation: 6,205

Post » Wed Feb 06, 2013 1:35 pm

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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Wed Feb 06, 2013 6:49 pm

@sqiddster
This formula will convert a percent (x) to dB:
20*log10(x/100)
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Wed Feb 06, 2013 7:55 pm

@r0j0hound, fascinating! I'll have to hook that up to a function and make by life a little easier.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu May 30, 2013 11:52 am

the best formula is
-log10(100/x)*33.2
(with 33.2 is 10*log2(10))
x is percent between (0,100]
B
8
S
1
Posts: 5
Reputation: 760


Return to Construct 2 General

Who is online

Users browsing this forum: Avengium and 10 guests