Audio Volume

Get help using Construct 2

Post » Mon Oct 02, 2017 1:17 am

hi there ive been working on a slider to control volume and had reasonable good luck o far with it following this discussion and capx
solved-how-do-i-make-a-slider-bar-to-control-sound_t148214
the problem im having is that i cant work out how to make volume scale down correctly as it pretty much silent after scrolling down by about 30%(70% actual volume)
and would like it to be half as quite at 50% and then almost quiet at about 30% then quiet at 0 :)

please if anyone can help would be greatly appreciated :)

update i've changed the max to 30 so it goes from 0 to -30 which is much better but far from perfect :(
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Mon Oct 02, 2017 7:43 am

try:
Code: Select all
log10(SliderBar.Value )* 20


audiologslider.capx



Programming Volume Controls
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Wed Oct 04, 2017 3:35 pm

@korbaach thanks for the reply, the slider bar is custom made :)
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Wed Oct 04, 2017 5:03 pm

no difference...

customLogSlider.capx

Image
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sun Oct 08, 2017 3:49 pm

@korbaach thanks alot for the reply ill give it ago :)
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Sun Oct 15, 2017 4:55 am

thanks for this nice demo.
B
80
S
29
G
166
Posts: 234
Reputation: 89,119

Post » Sun Oct 15, 2017 12:49 pm

Thanks @korbaach, used your formula today in my game!

BTW, the reverse formula for setting slider position to current volume is this:
position = 10^(volume/20)
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :)
B
17
S
9
G
71
Posts: 1,063
Reputation: 38,689


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests