Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new ReplayGain mode to consider all tracks in the Play Queue #12

Open
jonathanlie opened this issue Oct 1, 2019 · 12 comments
Open
Assignees

Comments

@jonathanlie
Copy link

Hi, just a suggestion to improve list of things cleared up from README.

@kartik-venugopal
Copy link
Owner

kartik-venugopal commented Oct 16, 2019

Hi, thanks for the suggestion. It has been suggested before, and I briefly looked into it. It is challenging to implement, but I will definitely keep it in mind for the future.

Thanks for your interest in the project !

Cheers !

@LesterJitsi
Copy link

I'm a new Aural user and it would be nice if replay gain was implemented. I understand it has to be actually challenging as two years have elapsed. That said it's a very interesting application, my congrats!

@kartik-venugopal
Copy link
Owner

Thanks, I am currently busy with other work, so I don't know when I will return to working on Aural, but thank you for your kind words :)

Stay safe. Best wishes,
mC

@kartik-venugopal kartik-venugopal self-assigned this Jan 11, 2022
@kartik-venugopal kartik-venugopal removed their assignment Oct 22, 2022
@kartik-venugopal kartik-venugopal changed the title Add a section about ReplayGain support? ReplayGain support Aug 11, 2024
@kartik-venugopal
Copy link
Owner

@LesterJitsi - I have been looking into replay gain recently ... I can now implement replay gain reading from track metadata ... in the future, I may also be able to implement active scanning of tracks to compute replay gain (I found a couple of C / C++ libraries to do it). If I figure out how to integrate those libraries into Aural, I can do it.

Anyway, I should be able to release metadata-based replay gain in v4.0.0 😄

@LesterJitsi
Copy link

@kartik-venugopal Great! 👍

@kartik-venugopal kartik-venugopal self-assigned this Aug 19, 2024
kartik-venugopal added a commit that referenced this issue Aug 20, 2024
kartik-venugopal added a commit that referenced this issue Aug 21, 2024
kartik-venugopal added a commit that referenced this issue Aug 24, 2024
@kartik-venugopal
Copy link
Owner

kartik-venugopal commented Aug 25, 2024

@LesterJitsi - Implemented in the v4 "preview9" release (updated just now). Aural will look for metadata and if none is found, it will scan / analyze the file / album for loudness. There's also a pre-amp to adjust the baseline gain. It shows up as a new effects unit (on the effects window) ... enable it by clicking the power button on the unit. Also there are some hidden options in the presets / settings menu (3 dots / ellipsis auto-hiding icon below the power button)

Screenshot 2024-08-25 at 2 00 30 AM

Screenshot 2024-08-25 at 2 03 16 AM

See the release notes in the release Zip archive for all the details.

And let me know if it works for you. Cheers!

@LesterJitsi
Copy link

Yes, it works 😀 Now I'll reveal my ignorance posing a dumb question (please refer to the screenshots).

Screenshot 2024-08-26 alle 18 25 35_1

Screenshot 2024-08-26 alle 18 25 52_1

The tracks are taken from two Sheryl Crow's CDs mastered at markedly different loudness levels. No matter what the order of tracks in the Play Queue, the louder one is normalized to the less loud level (I hope my choice of words is not fully inaccurate). That's how it works ReplayGain or is it possible to reverse the effect? Disabling clipping prevention makes very little difference if none at all.

I'm asking just for sake of knowledge. I hate inflated loudness like this:

stoogeswave2

Thanks a lot!

@kartik-venugopal
Copy link
Owner

kartik-venugopal commented Aug 27, 2024

Hey @LesterJitsi , I think I understood what you're trying to say. Correct me if I didn't.

The way that ReplayGain generally works is based on the idea of a "target loudness" ... this is generally 89 dbSPL (Sound Pressure Level) or in the computer world, -14 dbFS (Full Scale) or -18 LUFS (Loudness Units Full Scale) .. Aural uses -18 LUFS as its target loudness. Think of this value as a baseline ... anything louder than it will be made quieter, and anything softer than the baseline will be made louder. That is how track gain works. Album gain is the same thing but for an album as a whole ... album gain is based on the average loudness for the entire album as a whole. But read the next paragraph ...

The way that Aural uses "Album gain" is ... first of all, tracks must have the same value for the "Album" metadata field in order to be considered as part of the same album. If your tracks in the Play Queue come from different albums (as in your case), then album gain will not be the right setting for you ...

That said, I can see from your screenshots that what has been applied is Track gain, not Album gain. So the target loudness (and individual track loudness) is the deciding factor in what becomes louder / softer.

That said, maybe what Aural needs is to consider all the tracks currently in the Play Queue as an "album" ... maybe this would be another "Mode" ???

What do you think ?

@kartik-venugopal
Copy link
Owner

And clipping prevention won't take effect unless it predicts (based on track / album peak metadata) that clipping MAY occur ... if your loudness is already at a safe level, clipping will never happen and prevention makes no difference.

@LesterJitsi
Copy link

That said, maybe what Aural needs is to consider all the tracks currently in the Play Queue as an "album" ... maybe this would be another "Mode" ???

Oh yes, that would be perfect 💯 You understood what I meant, I should have searched better. Ok also for clipping prevention, I mentioned it not being sure about what has to be considered a "safe level".

That said, you're doing an outstanding work 🥇 All paid alternatives to Aural for Mac I know about are less worthy, IMHO.

@kartik-venugopal
Copy link
Owner

Great, I am reopening this issue to add the new replay gain mode. Thanks buddy ... by the way, I hope you saw your name in the "Contributor Attributions" section on the main page 😉

https://github.com/kartik-venugopal/aural-player?tab=readme-ov-file#contributor-attributions

@kartik-venugopal kartik-venugopal changed the title ReplayGain support Add a new ReplayGain mode to consider all tracks in the Play Queue Aug 27, 2024
@kartik-venugopal
Copy link
Owner

kartik-venugopal commented Aug 27, 2024

I mentioned it not being sure about what has to be considered a "safe level".

No worries. So, it's basically some mathematics ... it looks at the previously recorded "track peak" or "album peak" amplitude (which is a number between 0 and 1) ... and then based on the replay gain value (esp. if the gain is positive), it checks if the replay gain will cause the max amplitude to cross that threshold value beyond which the signal will get "clipped" or cut off, producing a distorted buzzy sound that we have all heard when blasting music on our stereo speakers 😄

It's just a safety mechanism to prevent that unpleasant sound distortion that may occur ... or in worse cases damage your equipment or your ears !... whether or not it has an effect kind of depends on how much the amplitude varies from its quietest to loudest within a song / album - "dynamic range", and how much replay gain is applied.

This is a highly simplified explanation. Watch out for all the audiophiles who will come in here and correct me 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants