Wouldn't it be easier to set the sound volume using a positive percentage value?

0 favourites
From the Asset Store
809 energetic male voice announcer phrases for casual & mobile games, such as puzzles, match, quest, casino, sports etc.

    Most normal users don't know what dB means so presenting a dB scale slider as 0-100 is easier to understand and still works in terms of perceived volume.

    I quite agree with this, and this is also precisely why I think Construct should also do the translation between dbs and 0-1 for the user, because the Construct user currently cannot just input 0-100 or 0-1.

    Rather than having the average Construct user look up how db works, the relationships between volume, loudness, and power, figuring out that negative infinity can be used the lowest volume instead of a hardcoded "mute" level, stepping dbs by 3 or 10 × log₁₀(V2/V1) to double "loudness" ect., trying to understand articles like (https://www.dr-lex.be/info-stuff/volumecontrols.html) and (https://dcordero.me/posts/logarithmic_volume_control.html), reading through the wikipedia page on psychoacoustics and not understanding a single word, ect...

    According to the latter article, "implementing a volume control logarithmically is actually a quite easy task", which I'm assuming is a similar to the point of view from Ashley, but I'm pretty sure the vast majority of the users here are not going to understand the "simple extension" example also in that article besides the fact that it doesn't directly apply to Construct, nor how to implement that in Construct.

    Even if the user is given the approximation formulas like volume^4 or 33*log10(volume/100) where volume is a value between 0-1, I still get the feeling most probably still wouldn't be able to apply that knowledge to their own projects themselves...

    I'm not sure you've understood the point. By working in dB, Construct makes it easy to have a volume slider that works properly. If it worked in 0-1 scale, then you'd need to look up all the logarithmic math to make a volume slider that works properly, because volume sliders that work properly use a dB scale - even if they label that as 0-100 for the user.

    Ok I guess I still don't understand...

    Let me ask a more straightforward question then since I still don't know the answer -

    If I'm making a volume slider in Construct with 10 (or n) steps, what should I set volume to at each step to have the lowest step be silent and the last step to be maximum or system volume?

    As a user, I sure wish I'd be able to just "Set volume" to "n" as a value between 0 and 1 and end up with a nice volume curve.

    I'm not sure what the standard approach is, because I don't know what every software developer in the world has done with their volume slider, but I would say an easy solution is that each step is a lower amount of dB, with a special case for the bottom one being -Infinity dB (or just enable mute). Maybe -10dB per step will do it, I don't know, I'd just play around and come up with something that seems right.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    (Apologies in advance - I'm even getting annoyed at myself at this point for being confrontational like this)

    If I don't know the answer and you don't know the answer then is Construct really making it easy?

    After playing around [mute, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0] results in the sound being inaudible after the 5th (down). Would it be like that for everyone on every system? So seems like the answer would be to set volume to (volumepercent*50)-50?

    Edit: (volumepercent*30)-30 seems to be better...

    It should not be that complicated. Set the loudest part of the slider to 0 and set the lowest to whatever you feel is inaudible. Then adjust steps in between. For example if you have 10 steps and -60 is what you feel is inaudible each step will decrease volume by 6db. If you really need an absolute way to make sure nobody hears anything when the slider is all the way down, just set the last step to mute sounds or set to -100

    This does not work well as you want 50% on the slider to somewhat be perceived as half as loud, this is why the exponential formula that has been posted multiple times works better.

    This does not work well as you want 50% on the slider to somewhat be perceived as half as loud, this is why the exponential formula that has been posted multiple times works better.

    Even if the user is given the approximation formulas like volume^4 or 33*log10(volume/100) where volume is a value between 0-1, I still get the feeling most probably still wouldn't be able to apply that knowledge to their own projects themselves...

    This is why I think Construct should provide an alternative (non exclusive) option to perform this task automatically, (please, let me repeat the keyword: automatically), without the users having to manually type complex mathematical formulas and try to understand and apply them correctly for something as common and necessary as controlling the sound volume in any game.

    TBH I don't think construct has to change how its handled internally, I think this can be solved with a good example project of a volume slider, demonstrating how to do the conversion?

    Hi Ashley, to translate, we are just asking for something that even artists or non-programmers can understand. And I don't mean actual or pro artists; I mean the wannabe kind.

    To illustrate, just give us an action that makes us feel like we're making progress and feel like tech savvies with no effort. Leave the dB values to the nerds.

    Ok so I spent all night experimenting and reading about this topic. Ashley was right in the end, although I think it could still be made easier for the end user by using a 0-1 scale.

    From the Dr. Lex article, once again -

    I sometimes get mails from people who want to know how they should configure a hardware or software volume control that already uses dB values by design. Some seem to believe they still need to apply a non-linear transformation to the dB values. No! The only things you need to determine there, are the range you want to use and the step size if applicable. For instance if the volume control offers a range of 120 dB, most likely you will want to limit it to the upper 60 dB range. Some controls offer attenuation (negative dB values) as well as amplification (positive dB values), you need to determine if your application needs either or both.

    The key is to identify the lower bound - -50db in my case is more or less silent. This should be confirmed at the highest system volume available. If your lower bound is too low, then the lower parts of your volume settings will be imperceptible. My earlier (volumepercent*50)-50 is what I'll be going with moving forward.

    Here's another article from Microsoft. When the online articles talk about linear controls, they are generally referring to linearly controlling the voltage or power - which results in the undesirable perceived volume, or loudness, curve as seen in the first diagram. It illustrates the problem of minimal effect on loudness at the upper volume levels, and disproportionally large effect at the lower volume levels. Where we're at, since we're working with decibels directly in Construct, is the second diagram already, where the loudness in db is linearly proportional to the volume control slider position. This is the desired behavior. Again, the key is identifying the minimum loudness, otherwise a portion of your lower volume settings will be useless.

    So what happens if we apply a logarithmic function again to our decibel level in Construct? (the formula I've commonly consistantly found was 20(log10(v)). This would result in skewing the perceived loudness to volume position the OTHER way. That is, upper volume level adjustments would have a larger impact on loudness, but lower volume adjustments have a lower impact. While this is indeed skewed, it's not nearly as uncomfortable as the other way around since at louder levels we are able to hear more and discern more of a difference than when the loudness is very low. That's why some people have found using the logarithmic formula on the decibel setting acceptable or even preferable.

    tldr:

    1. Identifying the lower bound of attenuation is critical. I've found -50 to be a good result for my system at max volume, although lower system volumes result in differences in the lower end of the volume slider being hard to perceive, which is understandable.

    2. Using linear decibal attenuation values results in linear perceived volume, which is "correct". Using logarithmic decibal attenuation values results in skewed perceived volume, which might be preferable, but "wrong" - this can be considered overcorrecting.

    I've got an example project illustrating various approaches coming soon after I make it a bit more comprehensive and labelled.

    TLDRTLDR:

    Set your volume to -50*volumecontrol, where volumecontrol is a value from 0-1 and -50 is the point you don't hear anything anymore at max system volume. Mute when volumecontrol is 0.

    PS: After all this I still think it would be nice for Construct to apply this for the user as a 0-1 value. Although the ability for each user to determine the lower bound themselves would be lost, a whole ton of confusion is resulting from users not understanding where that lower bound is to begin with, or how or why they should identify it themselves. Users who want to apply a further logarithmic adjustment can still do so on this 0-1 value. If the ability to apply more attenuation than -50 is desired to be preserved, then allow negative values. Values greater than 1 would be capped at 1 anyway, since we can't have less attenuation than no attenuation.

    Hi Ashley, to translate, we are just asking for something that even artists or non-programmers can understand. And I don't mean actual or pro artists; I mean the wannabe kind.

    To illustrate, just give us an action that makes us feel like we're making progress and feel like tech savvies with no effort. Leave the dB values to the nerds.

    That is the point. We prefer to buy a game engine because we need a tool that allows us to create games quickly, easily and intuitively. That's supposed to be the main purpose of any good game engine: to make tasks as easy as possible in terms of time and effort. We don't want to be intellectuals handling complex mathematical formulas, and we don't want to be programming experts either. We simply want to be efficient in creating games, and we are willing to pay for a tool that offers us this possibility.

    This is my opinion.

    Kind regards.

    Having the default setting be a percentage rather than DB sounds like a fantastic idea! I hope that's able to happen.

    Will be much more intuitive, and easy to work with.

    I think based on what oosyrag wrote, and what I was also explaining, using dB for volume is the easy intuitive way to do it.

    If Construct has a 0-1 linear volume, then either your volume control works wrong (nonlinear perceived volume), or you have to do some complicated logarithmic math to get a linear perceived volume (e.g. doing the dB conversion yourself, or some other exponential formula). As oosyrag pointed out there is a simple linear calculation you can use when the units are dB.

    So if you think linear 0-1 is actually the simple intuitive option, are you saying you want a nonlinear perceived volume - which AFAIK no other software does - or that you want to do the logarithmic math yourself - which I wouldn't describe as the simple or intuitive thing to do?

    Or if you want Construct to map 0-1 to dB for you, then surely someone will want to control the dB range and cutoff, so it actually makes it a more limited option.

    Perhaps all we need is an expression to map 0-1 to dB for you - e.g. linearVolume(-50, x) will map x as 0-1 with a -50 dB range/cutoff.

    Construct to map 0-1 to dB for you

    I think this would indeed go a long way to reducing confusion (as an expression would be a great step and backwards compatible as well). And I suggested earlier, perhaps actually allow the user to input a value outside the 0-1 range to address the new limitation of not being able to set the range and cutoff. Anything greater than 1 wouldn't have an effect and anything less than 0 probably wouldn't have a perceivable effect anyway.

    The more common problem I can foresee is users complaining about is they can't hear a difference between -50 and -40 db (0 to 0.2) because of too low volume overall especially if their system volume isn't maxed, but that would simply be a matter of starting adjusting the lowest volume to 0.2 before muting instead.

    Whether or not that's a good idea, it is still up to the user to choose. The user will still have control over the range in the end.

    In effect, this would basically assist a user define what 0 volume is (or rather what they should set as the lowest volume), which currently causes confusion.

    (Ed: I totally missed the part of the expression that allows for lower bound to be set. I hope there can be a default value if not specified, or at least suggested in the manual.)

    Unfortunately I'm sure there will also be those that will complain that 0 isn't actually silence either, as this doesn't address muting at the lowest setting so there might still be some misunderstanding. That's no different than how it is currently though, even theoretically at -100 db.

    Ed2: Also may I suggest "normalizedVolume()" as the expression if this is going to be a thing? "linearVolume()" might cause... confusion ;)

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