oosyrag's Recent Forum Activity

    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 ;)

    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.

    (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...

    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.

    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 too familiar with the steam deck myself, but trigger buttons usually aren't buttons, they are analogue axises.

  • Your header should be set before making the ajax request.

    I do not know if that is the reason you are not getting a response/ajax completed, but seems like it could be.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Don't use wait.

    Timer is the correct way. On speed boost collected - check if timer is running. If not, start timer, add boost. Else add boost steength.

  • You'll need a way to identify every node. For each node, you'll then need a list of other nodes connected to it.

    First pick by connected nodes (compare instance variable), then pick by distance.

  • Try setting sampling in project properties to nearest.

  • I'm not too familiar with the file system plugin, but it looks like it's got some browser based security restrictions.

    The old way would be to just use nw.js which also has access to the local disk, but that only applies to running as a local executable.

oosyrag's avatar

oosyrag

Member since 20 Feb, 2013

Twitter
oosyrag has 38 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

21/44
How to earn trophies