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

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

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

    I think that's a good point - let's use these terms to avoid confusion:

    • Linear volume: applying volume as a multiplier in the range 0-1, which does not represent perceived volume
    • dB volume: applying volume as a dB level from 0 to -Infinity
    • Normalized volume: representing volume as a percentage range, but actually applying it in dB as that matches perceived volume

    For the next beta I've added a NormalizedVolume expression which takes two parameters: the normalized volume in the range 0-100, and the dB threshold which represents the dynamic range of the volume slider (e.g. -40 means to ramp down to -40 dB at the bottom). It then returns the equivalent volume in dB to use. However as it's a built-in expression and can be a bit more complex, it includes a nice-to-have: the range 10-100 actually goes from the dB threshold to 0, and the range 0-10 actually goes back to a linear ramp. This means even if you choose a fairly high dB threshold which is still audible, it doesn't snap from audible to silent when going to volume 0 - instead it just more rapidly fades down to silent. I think that's a reasonable option to handle very low volumes and some of the references online describe this as a decent way to smoothly reach silence. The cutoff at 0 is probably fine in practice assuming the dB threshold is low enough, but this is just a little bit of polish.

    So I think we got there in the end with a useful addition to Construct - but it doesn't mean Construct itself accepts linear volumes in the Audio object, because I still struggle to think of cases that's useful, outside of perhaps coming up with advanced custom volume calculations - but you can still do that and just convert the result to dB at the end. And if you want to make a volume slider that reads 0-100, you can use the new NormalizedVolume expression.

    ...if you want to make a volume slider that reads 0-100, you can use the new NormalizedVolume expression.

    Great! Thank you so much.

    I think people should choose percent or decibels but decibels is the normal. And why not make it so you can have it louder instead of just quieter...

    Thanks Ashley!

    The stepped function is cool too! I really appreciate it. I think small things like this that can replace a extra conditional event (getting rid of the exception to set 0 as mute) goes a long way to making things simpler for the user.

    One more minor suggestion while we're on the topic - recommend updating the tooltip when choosing the volume parameter for Audio: Play (and other places?). It currently states "Volume: The attenuation in decibels (dB). 0 is original volume, -10dB is about half as loud, etc." I think that tooltip by itself was another source of confusion as well - I know it led me to think ok, if -10db is half as loud (it wasn't), 50% should be -10, and if I want half of that half (because of my limited knowledge of dB), I'd need -20 at 25%... (also wrong) ect.

    I think it would be enough to say that it is the attenuation in decibels from 0 to negative infinity, possibly implying or explicitly stating the user needs to determine the lower bound (this might be TMI for a tooltip?), and note that the normalizedVolume expression is a thing that exists for it.

    Recommending the dynamic range lower bound to be -40 (instead of -50 or -60) due to the stepped function) in the manual manual entry for normalizedVolume() might be good too. I'm not familiar with how standard ranges are across systems though so explicitly recommending a value may or may not cause problems for some people? Although I can't imagine that literally every piece of software in existence that dealt with audio would have (or should, at the least) to deal with something like that.

    And why not make it so you can have it louder instead of just quieter...

    This is the dream for us laypeople isn't it? This really is a key point that can be hard to wrap your head around without prior knowledge. Unfortunately, that's simply just not how computers/operating systems work when outputting sound, as far as I've learned about.

    Really appreciate it Ashley, I know a million things are on Scirra's plate, but still took the time to explore this and I'm sure it's going to be used by many of us!

    Awesome, without even needing to argue for it, I think Ashley already understands why we need LAB color space supported in Construct3 out of the box :D.

    Time to nerd out. All the reasons to keep db as the unit, is all the reasons we need lab color space. And to keep this relevant, I think they are good reasons too for staying with db.

    For those who don't know, using rgb to interpolate between two colors doesn't perceptually actually look like it is the color that should be between them. The easiest example is using grey 128,128,128 and white and black. Grey 128 isn't actually perceptual perfectly between white and black.

    The db conversation is the audio equivalent.

    Ruskul Regarding the sound volume, it seems that Ashley has already made a decision that we are happy with.

    Honestly, to talk about a different issue (color spaces), I think it would be convenient for you to create a new topic in the forum without trying to frustrate the general interest of those of us here in this thread.

    Here is a good solution for adjusting the sound

    construct.net/en/free-online-games/agnosiophobia-66038/play

    Liberador - I'm on Ashley's side on this, bringing up color spaces is relevant because the reasons for either are the same. Sorry if you feel frustrated by this but you are wrong - It was much more convenient for me to post here.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    Ruskul I posted this topic about a month ago to talk about the sound volume, and that issue has been satisfactorily resolved. If you insist on talking about color spaces here, I personally have nothing to say about it, and I'm not going to argue with you now either because that was never my purpose.

    Cheers.

    Ruskul I posted this topic about a month ago to talk about the sound volume, and that issue has been satisfactorily resolved. If you insist on talking about color spaces here, I personally have nothing to say about it, and I'm not going to argue with you now either because that was never my purpose.

    Cheers.

    And I posted about a month ago and added nothing about color theory in my most recent reply except in response to what you said.

    If you insist on arguing that you aren't arguing while telling someone to post elsewhere, I honestly think it would be more convenient for you to create a separate thread, because I'm not going to argue about that here as that was never MY purpose.

    Cheers

    I think this thread has run its course and it looks like any further discussion is not going to be helpful, so closing.

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