Maybe this is just my phone (and laptop), but volume control is irritating when some tracks are configured so that I need to set the volume to 70-80% and some tracks are so “naturally loud” that the lowest setting (5% ish for my phone) is distractingly loud.

On some of my tracks (especially for the classical music ones), within the same track I need to change the volume from 20% to 80% depending on what part I am listening to if I want to hear everything without killing my ear drums.

I get that it would be difficult to do anything about this for streaming or live audio since the phone doesn’t know in advance what the input will be, but for a pre-recorded mp3 file, couldn’t my phone do some digital signal processing?

Do I just have terrible electronic items and is this an issue anyone else experiences? Ot is this problem just harder to solve than I am expecting?

  • The_Grinch [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    3
    ·
    4 days ago

    Try clementine/strawberry music player on your laptop. They scan your music library and apply a volume normalization value to each track.

  • BakedCatboy@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    4 days ago

    Some music players do this, I think jellyfin uses replaygain. I remember seeing a setting to normalize across all tracks or normalize per album (to preserve some tracks being louder than other tracks of an album while still lowering as a whole entire albums that are louder than others)

  • wuphysics87@lemmy.ml
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    edit-2
    4 days ago

    What you are looking for, at least in part, is called compression. You could compress tracks to have the same volume with an external tool like Audacity (which I understand is no longer open source or has a weird licensing situation) or ffmpeg.

    There are at least 2 drawbacks. First, you’d need to run your software over the tracks externally and rerecord them. Which could be a pain in the ass unless you write a script. If you haven’t done that, it shouldn’t be hard to do. List the files in a directory and feed them into ffmpeg with whatever compression parameters you want.

    The second issue is the loss of sound quality. You can somewhat avoid this if you set the compression range in dB wide enough.

    All that said, the easiest thing would be if there was an app that either was a media player that did this for you, or acted like a filter for your media player. The latter can be done on linux with pipewire/jack without using ffmpeg or audacity.

    Not a direct answer to your question, but I hope that helps 🙂

    • dizzy@lemmy.ml
      link
      fedilink
      arrow-up
      6
      ·
      4 days ago

      As an audio engineer, this suggestion makes my skin crawl.

      Don’t apply any extra compression to your files this, it will ruin them.

      Modern audio streaming services and good audio players use loudness normalization to achieve consistent playback loudness. The way they do this is by measuring the integrated loudness of each song and increasing or, in most cases, reducing the playback gain of the song to an arbitrary target (e.g. Spotify has chosen -14LUFS which is pretty quiet when you consider most pop music is mastered to somewhere between -10LUFS and -3LUFS).

      OP should just find a better audio player or figure out how to enable loudness normalization.

      • The_Grinch [he/him]@hexbear.net
        link
        fedilink
        English
        arrow-up
        3
        ·
        4 days ago

        I have a semi-related question if you don’t mind. People often complain about the voice tracks in movies being hard to hear, especially if you don’t have a speaker for the center channel (but even then I have trouble)

        Why haven’t they solved this problem by packaging the voice track separately on the bluray/stream so you can turn up the volume of the voices only without blowing your ears out when the music hits?

        • dizzy@lemmy.ml
          link
          fedilink
          arrow-up
          4
          ·
          4 days ago

          I don’t know why they don’t, I work in music rather than TV/Film but it infuriated me too! Give me a voice volume control! It would be technically very easy to do implement as a standard but the powers that be just haven’t come together and done it!

          • The_Grinch [he/him]@hexbear.net
            link
            fedilink
            English
            arrow-up
            3
            ·
            4 days ago

            I’m glad to hear I’m not the only one thinking it!

            Do you think it could be done by diffing a few of the different language tracks?

            • dizzy@lemmy.ml
              link
              fedilink
              arrow-up
              2
              ·
              edit-2
              3 days ago

              Unfortunately no, audio files are actually really dumb in that they’re basically just a file of 44100 (or 48000 or 96000 etc) amplitude numbers per second.

              So there’s nothing really to diff because it’s basically just a squiggly line, set of squiggly lines or, when compressed, a mathematical expression that when decompressed, recreates a squiggly line.

              You could isolate the dialog if you got ahold of a version with no dialog at all and then inverse the polarity of that and sum it with the original but it’s unlikely you’ll find a version without any vocals.

              Machine learning vocal isolation tools are probably going to be the best way to go about it as a DIY approach. Ultimate Vocal Remover 5 with the demucs 4 algo is great FOSS software to extract vocals and you could sum that with the original track and adjust the gain to get louder dialogue… it would be a lot of work though…

      • Sodium_nitride@lemmygrad.mlOP
        link
        fedilink
        arrow-up
        1
        ·
        3 days ago

        OP should just find a better audio player or figure out how to enable loudness normalization.

        Yeah I figured it was an issue with my software.

  • Shinji_Ikari [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    3
    ·
    4 days ago

    Typically volume of a track is chosen by the producer/person mixing. You could theoretically get an average volume and scale the tracks gain. This could have the effect of compressing or chopping parts of the song that are purposefully loud while the rest of the song is purposefully quiet.

    I think it isn’t done in order to maintain the intention of how the track was mixed. Typically people won’t have playlists of quiet classical mixed with maxed out edm so a general rule is hard to predict and the authors of the music player just leave it as is.

    Look into the cd loudness wars of the 90s where record companies were mixing their tracks louder and louder to compete, which produced notoriously terrible album mixes.

    • Hyacin (He/Him)@lemmy.ml
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      4 days ago

      Typically volume of a track is chosen by the producer/person mixing. You could theoretically get an average volume and scale the tracks gain. This could have the effect of compressing or chopping parts of the song that are purposefully loud while the rest of the song is purposefully quiet.

      This is exactly it. Well, this and I’d say the fact that modern digital volume controls evolved from previous analog volume controls where you were literally just adjusting how much the input signal was amplified.

      But, back to the “this” - they have similar automatic compression options built in to a lot of AVRs too, often called something to the effect of ‘night mode’ or ‘midnight mode’, but they completely destroy the directors intention … take for example, a ‘scary’ movie with jump scares - the people are supposed to be whispering and somewhat hard to hear, making you strain to hear them, to increase the impact of the loud jump scare - if you compressed that enough (extreme example), you could probably take all the ‘scare’ right out of it. Varying volume within a single track/album/movie/show/etc., is intentional, and more often that not you would not want to compress that.

      Track to track and source to source variations are I suppose largely because of a lack of any standards.

  • Sam_Bass@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    4 days ago

    Musicbee has a built-in volume leveler. I’ve used it a few times when iron maiden was unintentionally whispering

  • monovergent 🛠️@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    4 days ago

    I can comfortably go through my music collection without adjusting the volume, but I too would like to see something like this. In my case, I’d like to cap the maximum power output so I won’t lose my ears to audio glitches, poor editing, or forgetting to turn down the volume after a very quiet video. Many phone manufacturers already warn users of hearing loss when turning up the volume too far, and I’m surprised that nobody has made an obvious and easy way to just cap the output power.