Unanalyzed tracks are much louder than replaygained tracks

Bug #1406928 reported by Daniel Schürmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
High
Daniel Schürmann

Bug Description

After the latest Gain patches the overall gain experience is somehow broken.
Currently all unanalyzed tracks are almost clipping.

Here my theory, without looking too the code:

1.11 Gain story

* A common normalized track at 1 (noise distance optimized/loudness war)
* Replay gain analysis to a value that allows tracks with the same loudness, but a high dynamic
* This is a value ~ 0.5 for common pop music
* Inital Gain Boost by preferences, default 6dB (x2)
* fixed gain correction (/2) (dropped in current master)

* Result: for common pop music:
** without gain correction: normalized at 0.5
** with gain correction: normalized at ~0.5 for equal loudness

-> works!

current master Gain story

* A common normalized track at 1 (noise distance optimized/loudness war)
* Replay gain analysis to a value that allows tracks with the same loudness, but a high dynamic
* This is a value ~ 0.5 for common pop music
* Inital Gain Boost by preferences, default 0dB (x1)
* no fixed gain correction

* Result: for common pop music:
** without gain correction: normalized at 1
** with gain correction: normalized at ~0.5 for equal loudness

-> broken: no headrom for mixing using no replay gain analysis.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Solutions:
* Revert the changes and document the fixed gain correction in master, probably move it to a less confusing position.
(my favorite, since there was nothing broken)

* Replace the "Inital Gain Boost" with a default gain for non analyses tracks)
This will work for common pop music, but not for high dynamic tracks, since there is no Mixing headroom if it still reaches 1 after replay gain analysis.

By the way: the current situation almost breaks my party, because if the track was played before the analysis finished it was extreme loud.

Changed in mixxx:
importance: Undecided → Critical
milestone: none → 1.12.0
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hm, yes you're right. We now have clipping with two compressed tracks and replaygain turned off.

The result of the old way is that Mixxx sounds quiet compared to other apps since we've reserved headroom that is not being used.

I think a master compressor would be the best solution here -- but I'd rather not add one so late.

What about changing the default master gain to -6dB. That way it's visible in the UI from the get-go that there is reserved headroom and it is tweakable by the user as desired.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

For me master compressor is a backup solution (last resort) before clipping. I would not use it for permanent normalize my mix, since it may change the volume when I do not expect it.

An other type of compressor is that which is uses for broadcasting, too remove undesired dynamics from the tracks to be usable to hear as background music while working. But that is an other topic.

@RJ: Your proposal matches mine second one, which I think is technically wrong. Lets explain a bit more:

The replay gain analysis is leveled to allow to play high dynamic tracks like classic and soundtracks with compressed radio tracks.
Therefore the resulting gain feels is much too low if you have only compressed radio tracks.
To fix this we have the "Inital Gain Boost" this is a replay gain standard facility. It does what it should, it removes the probably unused dynamic headroom if a user is not using classic tracks. If everything is setup ideal, the result is that the track with the highset voltage peak but lowest loudness in you library is at 1, all other tracks with lower dynamics are below. Now we start to mixxx Deck A + Deck B + .... to be on the save side we have the fixed 1/2 gain. This way two decks together cannot clip.

If competitor apps produces a higher output voltage, they have probably a not such a headroom.
But I cannot see an issue here, just crank up the master gain and you match the competitor App.

It is also possible to tweak the "Inital Gain Boost", but that is the wrong position for the Mixing headroom since this effects the replay gain only. We may add a mixing headroom preference or CO to clarify the Issue, but we have now the master gain ...

IMHO the "Inital Gain Boost" is badly named, I did not understand it at all before I have understood that equal loudness != equal peak voltage. Foobar seems to have good view on the issue:
http://eolindel.free.fr/foobar/replaygain.shtml
we should rename it to "Replaygain Boost" and add the standard 89dB for reference.

Conclusion:
I would like to keep (make) Mixxx compliant to the replaygain standard.
* If a track is at 89 dB it does not clip.
* you may boost the replay gain by 6 DB to 95 dB (current default) if you do not use classic tracks.
* you may lower your Mixing headroom to 0 (crank up master Gain)

Advantage no principal change to 1.11

Revision history for this message
Owen Williams (ywwg) wrote :

I agree that a compressor is not the right solution. But, if you're combining two well-mastered tracks with full bass together, they *should* clip because you're mixing incorrectly. If we try to hold the users' hand and reduce the overall loudness, they're still going to get a quiet track, then an overly-loud transition (due to doubled kicks), and then a quiet track again. Just because you're not clipping doesn't mean you haven't messed up the mix.

I would be ok with giving people a -1 or -2db default for some headroom, but not the full -6db. Maybe we should separate "initial gain boost" from replaygain so it's applied for everybody. That way it's really just a tweak to the zero-point of the master fader.

Maybe we can add more training wheels (like a compressor) for radio DJs that just want everything maxed out all the time, but club DJs know how to ride the bass and levels to keep output even.

Also, don't we have a crossfader setting for constant power? That should prevent clipping too.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

It is OK for me to remove the headroom by default (shift the master gain center, or add a new preference option).
This has the advantage that the Mixxx output will match the replay gain standard.

We probably have to tweak the gain factor positions to have a smooth VU meter and waveform experience.

Offtopic: It seams that there is a trend to switch to the EBU R 128 standard:
http://www.hydrogenaud.io/forums/index.php?showtopic=86116
will file a new bug.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

I have played with the gain settings a bit and it turns out that all hidden gain headroom is somehow unpredictable.

So lets fix it like that:
* Default master gain = 1 (no extra control for headroom)
* Default Replay gain Boost = 0 dB (this makes the Mixxx output conform to the replay gain standard)
* New setting: default gain for tracks without replaygain
* Default gain for tracks without replay gain = -6 dB (this gives the headroom to mixxx two decks without clipping)

Any objection?

Changed in mixxx:
assignee: nobody → Daniel Schürmann (daschuer)
status: New → In Progress
Revision history for this message
Owen Williams (ywwg) wrote :

As an amendment to my own post, I realized that it doesn't make sense to alter the master game knob, but the individual track gain knobs instead.

Daniel, if possible I'd like to try to move from an "any objections" system of decision making to a "do people agree?" system. Asking for objections treats the proposal as something that people need to argue against, rather than something that could be modified and improved to a point of agreement. Each proposal should be a starting point for discussion, not an ending point to be vetoed or committed as-is. I would really prefer that we get to a point of consensus where multiple developers positively agree on a direction or design.

As I stated previously, I don't think mixing two decks without clipping is a correct way to see the problem. I also mentioned the constant-power crossfader as a solution if users are interested in that behavior. We need to discuss that before we go back to the old system of reducing mixxx's volume by 50% again.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

> We need to discuss that before we go back to the old system of reducing mixxx's volume by 50% again.

I do not want to do that. It just turn out that most of my tracks are original leveled for a peak at 1.0. and a the mean value of the replay gain is ~0.5. So if we assume 0.5 as a default gain, it has nothing todo with a mixing headroom we have discussed, it is just the attempt to predict the correct replay gain.

If a DJ likes to Mixxx with 1.0 leveled tracks, he may try, but the clipping light will be lit even if he plays the track at unity.
This is the essence of the original bug report we have to fix.

I have asked for objection, since from my point of view we had already fruitful discussion. I have outlined a final conclusion and I like to work on it now, since time is running out. Since I do not want to do the a fight at the PR it should be the last chance for others to argue against it if my view is wrong.
Asking "do people agree?" implies waiting for an explicit final go, which I have never got in similar discussions.

Revision history for this message
Owen Williams (ywwg) wrote :

I've already stated an objection, but I will repeat it: Mixxx should not be in the business of reducing track gain to "protect" the user during mixes. You mention the loudness war -- that only applies to pop songs, not to club-mastered tracks. Tracks on beatport/etc are not highly-compressed, so that is not a universally-correct assumption.

By default, I think Mixxx should output tracks at close-to-full volume, with perhaps 1 or 2 db of headroom. Not 6.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

I will not explicit add an additional headroom for mixing, It is a side effect if we try to predict the ReplayGain value.
The replaygain standard levels tracks to an average of -14 dB. allmost all of my tracks have an average of ~-8 dB.
A DefaultBoost of -6dB just reduces the gain drop after the replay gain is applied to a minimum.
If this is not desired, you can disable the ReplayGain Analysis, and set the DefaultBoost to 0, and use the gain knob to reduce the level individual to a suitable mixing level.

Revision history for this message
Daniel Schürmann (daschuer) wrote :
Revision history for this message
Daniel Schürmann (daschuer) wrote :

By the way, the default Loudness of Mixxx has not changed since 1.11, because we have reduced the mixing headroom of 6 dB and we have removed the Inital boost of 6 dB to compensate that.

In case you switch of ReplayGain, Mixxx 1.12 was louder than 1.11 before my patch but clipping at unity. Now you need to set the default boost to 0 dB to achieve the same results.

Revision history for this message
Owen Williams (ywwg) wrote :

If playing a single, unanalyzed track in 1.12 causes clipping with all gain knobs at unity, that's a bug. (Could the vinylsoundemu be pushing near-clipped values above 1.0?)

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Daniel -- I'm confused. You say in comment 8 that this is not about clipping but you're contradicting yourself from comment 6.

> * Default gain for tracks without replay gain = -6 dB (this gives the headroom to mixxx two decks without clipping)

These are two separate issues:
1) You can't mix the same compressed track with itself without clipping.
2) Tracks that don't have a replaygain are louder than tracks that have a replaygain.

Daniel -- your proposal does not address problem #1. If someone wants to mix without replay gain enabled then they will still face that issue.

For problem #2, a default boost for replaygain might help if the user can guess what their library's typical replaygain will be but that's not for us to decide. I certainly could not provide a good guess for my library. If we add such a feature it should default to 0dB -- just because 6dB happens to work on your library doesn't mean it's a universal truth! :)

For problem #1, as a guiding principle we should be passing audio through untouched as much as possible. Based on all of your bit-perfect EQ work I think you agree with this Daniel.

As Owen mentions, no experienced DJ will be surprised if they get clipping while playing two tracks -- any analog mixer would behave this way and we shouldn't necessarily put training wheels on unless the DJ asks for it.

On the other hand, it will be annoying for casual use if you boot up Mixxx and it clips by default due to the lack of headroom.

So based on these two tensions, I am for providing a preference option for the default master gain. By default we could make it -2dB as a nod towards making casual use less annoying but I would also support making it 0dB. The benefit to this being in the master gain is that it clearly visible in the UI that the gain is less than unity rather than being an invisible demotion we apply. In Mixxx 1.11, we were mysteriously quieter than all other apps since the 0.5 gain was totally invisible.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I'm not aware of single-track clipping while playing. I thought we were discussing mixing 2 or more tracks throughout this discussion.

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote : Re: [Bug 1406928] Re: the gain story is broken

On 01/04/2015 03:45 PM, RJ Ryan wrote:
> library. If we add such a feature it should default to 0dB -- just
> because 6dB happens to work on your library doesn't mean it's a
> universal truth! :)

Note that the RG spec mentions using some default pre-amp value for
modern compressed pop music if desired. (1.11 used +6dB FWIW.)
But it says that the ideal is to set it to 0dB to ensure clipping
doesn't occur and to get the full dynamic range.

http://wiki.hydrogenaud.io/index.php?title=ReplayGain_specification#Pre-amplification

So we need to decide: target audiophiles/professional DJs (0dB,) casual
users (+10dB) or split the difference (+6dB)?

Since I consider myself both a professional and a bit of an audiophile,
my vote is no pre-amplification (0dB.)

If we do however decide to use any, I strongly suggest and prefer that
the track gain knob be used to show how much is being applied so a DJ
can tweak it on a per-track basis. (1.11 had the RG pre-amp applied
silently for all tracks.)

Sincerely,
Sean M. Pappalardo
"D.J. Pegasus"

Revision history for this message
Daniel Schürmann (daschuer) wrote : Re: the gain story is broken
Download full text (3.3 KiB)

> Could the vinylsoundemu be pushing near-clipped values above 1.0?

@Owen: What does this mean?

> Daniel -- your proposal does not address problem #1. If someone wants to mix without replay gain enabled then they will still face that issue.

It is implicit solved since we have now two controls for this. the user can reduce the default boost or the master gain.
It is more a discussion about default. Currently I have picked -6 dB for the default boost. This should solve the issue, even though it was picked to attenuate the gain drop when the analyzer is finished.

> default boost for replaygain ..

The default ReplayGain boost is 0 dB now. Since we cannot predict the users type of tracks lets stick to this standard default of -14 dB Average. Since most tracks do not have 14 dB dynamic range there should be enough mixing headroom (but no guarantee)
This feature may help Radio DJs to level their loudness as required for a certain station. Set replay Gain boost to 0 dB and your output is on -14 dB average at unity. (In Mixxx 1.11 there was is allays an hidden offset of -6 dB, which was compensated by the default boost of 6 dB)

> just because 6dB happens to work on your library doesn't mean it's a universal truth! :)

That is right. But IMHO we need a default for the non ReplayGain tracks that does not require tweaking when starting to work with Mixxx.
We may assume that the majority of uses have a majority of tracks that is leveled above a -14dB average, so the resulting replay Gain ratio will be below 1. Probably like that http://www.hydrogenaud.io/forums/index.php?showtopic=86424&st=0&p=761876&#entry761876
So if we shot for the middle, we may pick 0.5 (-6 dB) as default boost.
In Mixxx 1.11 we had also an offset between ReplayGain Tracks an others of -6 dB and it worked good for me and I have never read complains about that. So lets stick to this established value, instead of picking a new one.

> I am for providing a preference option for the default master gain.

When this started, I was the same opinion. But I have played with this and it turns out to be unhandy, since this will make the UV-Meters not comparable at unity, we have just get rid of the hidden mixing headroom and and we should stick with it. Instead of this we may consider to make the default gain persistent, but I do not mind about it because I usually start from 0 to avoid noise during setup. Such a default would also destroy the Standard ReplayGain level of Mixxx we have just introduced.

@Sean: We need to distinguish between the boost value for ReplayGain Tracks and the Boost value for other tracks.
My current proposal remain at 0 dB Boost for ReplayGain tracks, this was changed by RJ some days before. (your audiophiles/professional DJs version)

The recent discussion is about an additional default Boost that is applied only to non ReplayGian tracks or when replay gain is disabled.
Mixxx 1.11 has a offset between both gains of -6 dB. I like to keep that by default, but allow to path through the samples unchanged by setting this default boost back to 0 dB.
Now we need to decide what is a suitable default for this. I do not like 0dB because that is ...

Read more...

Revision history for this message
Owen Williams (ywwg) wrote :

> > Could the vinylsoundemu be pushing near-clipped values above 1.0?
> @Owen: What does this mean?

The vinylsoundemu effect is applied to scaled audio when the speed is <.85x the original track speed. And if you play 44.1 audio at 48khz, the effect is activated. The effect adds a small amount of noise to the signal to prevent digital-yuck artifacting at slow speeds. The noise is a simple random value that is added to or subtracted from the original sample. If a sample comes through at 1.000, and noise is applied, there's a 50% chance it will clip.

All of that said, I think I will just lower the speed threshold so that the effect isn't applied in such a common case.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

The sample rate conversion of a track should not effect the vinylsoundemu an I think it does not.

I had just a look to the code and the noise is in the range of -0.000015259 .. -0.000015259.
So it will probably clip two bits on an 16 bit DAC, but only in the speed range form 0.85 to 0.8499870.

Not a big issue here. but as we are aware of it now, we should fix it.

But that can't be my issue. I have to retest if clipping actually happens or if I have just tricked myself.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

It actually still clips for many tracks without mixing and EQs disabled.
Both VU-Meter are equal for Master and Deck and the clipping light is lit. Track and Soundcard on 44.1 kHz

So we have a different bug as well

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Is that with replaygain enabled or disabled? What is your replaygain gain adjustment?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

ReplayGain Disabled. ReplayGain adjustment = 0 dB. Hope I find time to track that down soon.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Yikes! That's odd. Is the clipping light for the deck and master lit or just master?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Both.

Revision history for this message
Owen Williams (ywwg) wrote :

Daniel can you post the track that is causing clipping at unity for you? I am unable to reproduce the issue.

Revision history for this message
Owen Williams (ywwg) wrote :

(Actually can you file a separate bug? I am going to rename this one to make it a little more specific)

summary: - the gain story is broken
+ Unanalyzed tracks are much louder than replaygained tracks
Revision history for this message
Daniel Schürmann (daschuer) wrote :

> Daniel can you post the track that is causing clipping at unity for you?

No, sorry, not here because of copyright.

Revision history for this message
Owen Williams (ywwg) wrote :

OK now let's go back to this bug :)

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Straw poll:

Traktor: preference option for "headroom" and a compressor that defaults on
http://www.native-instruments.com/en/support/knowledge-base/show/840/digital-djing-and-sound-quality-handling-of-levels-in-traktor/

Serato ITCH: preference option for "headroom" and a compressor that defaults on
http://serato.com/manuals/itch/software/2.1/mixer_not_available_for_numark_v7_and_denon_dnhc5000

VirtualDJ: preference option for "volume headroom" and an auto-limiter
http://www.virtualdj.com/forums/182835/MAC_Version_Technical_Support/I_have_VDJ_but_I_m_not_getting_the_colored_waveforms___.html

Serato DJ: preference option for "output level"

So it's not a radical step to include a specific headroom setting which could either be a transparent gain or the default master gain at bootup.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

The headroom discussion has only started, because the default gain for non ReaplayGain tracks was to high.
We had newer complains about it before (only the opposite: mixxx is to quiet)

With my PR the box is open and we can tweak Mixxx to the 1.11 state or to anything what our competitors have.

There is only one remaining point we have to consider: The external sources. Should they have their own Boost preferences, or is 0 dB just right?

So I think this bug is fixed.

Of cause a tweak-able range of the Master Gain will be a nice addition. We have a similar request for the EQ gains.

But we have to be carefull. If this preference i too prominent, you can easily level Mixxx out of range. Currently, the default is the ReplaGain -14 dB average we can rely on for effects, waveforms and VU meters. If we have a a Headroom preference of some kind, a user (coming from traktor) can easily pick his habitual headroom of -6 dB and level level the track to lets say -8 dB average (0 dB default Boost for most of my tracks. He has the same output as a default Mixxx, but the internal signal for effect and so on is much to high. Clipping may occur on internal signal paths.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Right -- the headroom discussion started because there was a fixed -6dB headroom which we have now removed so we no longer have any headroom. A user mixing with replaygain turned off will have a hard time not clipping out of the box and will have to adjust their master gain knob to add headroom.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

These are two separate issues:
1) You can't mix the same compressed track with itself without clipping -> mixing headroom
2) Tracks that don't have a replaygain are louder than tracks that have a replaygain -> "predicted" replaygain

We should solve #1 with an explicit headroom preference, default master gain preference, persistent master gain with default to 6dB, or something like that. This should be totally unrelated to ReplayGain -- it should not live in the same preference dialog. It will be confusing if the replaygain "default boost" is the "headroom preference" when replaygain is turned off but when replaygain is turned on it's the "unanalyzed track gain". That's asking for user confusion.

Changed in mixxx:
importance: Critical → High
Revision history for this message
Daniel Schürmann (daschuer) wrote :

The defaults in my PR are exactly what we had in Mixxx 1.11.

            default boots RG Boost Headroom
1.11 0 dB +6 dB -6dB
my PR -6 dB 0 dB 0dB

So you see the resulting level is the same. But now default boost is tweak able. That will make me an Owen happy because our different recording level in our library. (And by default the virtually old headroom is back)
On of the boost is always active. so we will hardly hear complains about clipping tracks.
There is also an advantage for radio DJs, the can rely on the average dB value, as long master is at 0 dB.

Does Traktor have a master Gain? It looks like they cannot boost:
http://www.digitaldjtips.com/wp-content/uploads/2011/03/mastervol.png
http://www.digitaldjtips.com/2011/03/traktor-gain-sound-level-settings/

If you think our master gain is not sufficient, go for it and propose a preference option.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

table was broken:
______default boots__ RG Boost __ Headroom
1.11______ 0 dB ______ +6 dB _____ -6dB
my PR____ -6 dB _______ 0 dB _____ 0dB

Revision history for this message
Daniel Schürmann (daschuer) wrote :

By the way, I think slightly different about the two boost sliders:
They set the center of the deck gains. For club tracks a 0 dB center seams to be correct. But radio pop tracks need something like -6 dB as center. Without it, the gain Knob will be at 9 o Clock for pop tracks and centered for club tracks.
And now I realize why the static -6 db in Mixxx 1.11 are bad. It will force the gain knob to 3 o Clock to have a nice level without using ReplaGain.

Revision history for this message
Owen Williams (ywwg) wrote :

I think the problem with this design is it treats replaygain as the ideal case, but actually it's the exception. With unanalyzed tracks, microphone, and aux inputs, we assume the track is at full normalization, and for this reason we've been planning to add headroom to the master output. Replaygain is the exception because it has its own "built-in" headroom, which is why so many tools include a +6db gain on replaygain values to bring it back to full volume. This makes sense because many replaygain tracks are around .5, which is -6db. (You've been mentioned -14db, but that's an *absolute* loudness value. That's totally different from taking a fully-saturated track and applying a -14db gain -- that math is not valid).

This is why we've ended up with this two-slider approach that I don't like -- we have a slider to make replaygain sound one way, and then another to try to make other decks have the same headroom as replaygain.... it's a circular system of guessing and assumptions that is going to be annoying to work with. And like you say we will also end up having to apply that other boost to microphones and aux so that they are not much louder than the tracks.

So instead of trying to knock everything down to replaygain's level, I think the solution is to have one channel-level boost, only for replaygain tracks, to bring them back up to full volume. Then, we have a single master headroom value that pushes all channels back down again. For the replaygain that's *2 /2, but we're in float land so the redundant multiplication is not a big deal.

Lastly, I think we should make the per-channel peak indicator less sensitive. Since we don't do any clipping at the channel level, we should be more tolerant of slight peaks over 1.0. Only the master output needs to be so strict. We should also apply the master headroom gain to the individual deck outputs as well -- that way no clipping will be performed there either.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Right -- the -14 dB we keep talking about is not a -14dB of headroom (that would be a ratio gain of 0.2 for reference) and we can't treat it that way math-wise.

The replaygain (a literal multiplicative gain) is specifically the difference in loudness function between the track and pink noise file with an RMS loudness of -14dB relative to a full-scale sinusoid. This is supposed to correspond to 89db SPL.

+1 to what Owen is saying -- especially since we have to assume the aux and mic inputs are coming in at "full volume".

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

The headroom component of our gain story should be in the master gain only. Replaygain is just for making tracks have "equal loudness".

Also, complying with the replaygain "standard" is also a non-goal of Mixxx since we are not a music player (leave that to iTunes). We just use replaygain to achieve equal loudness to deal with compressed vs. non-compressed tracks.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Ah, here's the original bug where we were talking about Mixxx being too quiet: Bug #859925

Revision history for this message
Daniel Schürmann (daschuer) wrote :

I have never talked about a mixing headroom of 14 dB

It was just mentioned here:
http://wiki.hydrogenaud.io/index.php?title=ReplayGain_1.0_specification
and here.
http://en.wikipedia.org/wiki/ReplayGain

According to this and my understanding, it is just a standardized level that allows to play nearly every common track without clipping.

http://wiki.hydrogenaud.io/index.php?title=ReplayGain_1.0_specification#Pre-amplification
Explains the issue very good.

I had a look at some club tracks and It seams that there are some, that actually uses a dynamic range of almost 14 dB.

So the ReplayGain definition picks a reasonable value. And for me there is no reason to call this into question.

My conclusion is: If -14 dB is a average that works for most tracks, than it is a good pick for to use this as a Mixxx default es well as well.
(This level was proofer in Mixxx 1.11 as well)

My current two slider solution is just a pragmatic solution that just works.
And I have currently no usecase where it would fail.

The core issue for me is, that no usere likes to use the gain knob near the max or min value. But with a fixed gain knob scale this issue will strike either the club track users or the radio track users. My PR fixes this issue.

##

For external sources, we can also expect that there are two types: Already leveled track at -14dB average and 0 dB peak Tracks.
Example: My hardware mp3 player has also an option to play tracks wit equal loudness.

So we probably will have the gain center issue here as well.

##

What will not work with the two slider PR?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

> So instead of trying to knock everything down to replaygain's level, I think the solution is to have one channel-level boost, only for replaygain tracks, to bring them back up to full volume.

Per definition the -14 dB average is already full volume. Every gain you apply to this value includes the risk, that some tracks will light the deck clipping indicator.

> Lastly, I think we should make the per-channel peak indicator less sensitive.

Every effect amuses a signal input of < 1.0 so increasing the clipping indicator threshold is not purposeful.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Every effect assumes ..

Revision history for this message
Owen Williams (ywwg) wrote :

"Per definition the -14 dB average is already full volume. Every gain you apply to this value includes the risk, that some tracks will light the deck clipping indicator."

This is wrong. You are conflating many terms, peak and average and "full". Replaygain assigns many tracks are a gain multiplier of .5x to bring their average loudness down to -14db absolute. By definition it is possible to raise the gain from .5x without risk of clipping. "Full volume" would mean a 1x gain, and therefore higher than -14db average. As RJ says, -14 is a value that ReplayGain chose for movie theaters. It's an arbitrary choice and that value is not relevant to club mixing.

The two-slider design that you have proposed would not work for aux and mic sources as I explained, and suffers from poor usability as I have also explained.

By the way, DJs have no problem using the gain knobs to even out tracks -- they do it all the time.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Did you read http://wiki.hydrogenaud.io/index.php?title=ReplayGain_1.0_specification ?

Maybe I have explained it not detailed enough lets try again:

The average loudness of ReplayGain is 89 dB SPL playback level on a SMPTE calibrated system.
This matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid.
This roughly matches an average sample value of 0.2 inside Mixxx.
I say here roughly, because normally users do not play pink noise, but tracks with a different dynamic ranges.
After applying the calculated ReplaGain value all of them have equal loudness on a SMPTE calibrated system.
And the average sample value will be around 0.2 depending of the track content.
(sample1 + sample2 ... + sampleN / N = 0.2)
This average is defined by the ReplayGain standard in respect to uncompressed club tracks and classic tracks
with a wide dynamic range that may have sample values of lets say 0,99 even though there average is still at 0.2.
This is the 14 dB headroom for the dynamic range referenced in the ReplayGain specification.
But it is known that there are tracks with a wider dynamic range, that will exceed 1 on an average of 0.2.
The EBU R 128 standard for instance allows a dynamic range of 23 dB, which requires to level the tracks at
0.07 average
On the other end are the radio tracks with a dynamic rang of less then 7 dB. they do not have sample values that exceed
0.5 at the Replaygain level. Only for these track it is possible to raise the gain from the calculated replay again without risk of clipping.

> "Full volume" would mean a 1x gain, and therefore higher than -14db average.

I do not understand what you mean here, what does Volume mean in this contest? A gain of 1 will just play the track with the recorded loudness, which is different from track to track.
It seams to be a common practice to level the tracks in a way that the peak sample is slightly below or at 1.0 to gain a optimum noise to signal ratio. This increases the loudness of compressed tracks and lowers the loudness of tracks with a wide dynamic range.

> The two-slider design that you have proposed would not work for aux and mic sources as I explained.

That's right. If there is a demand, we may add a boost preferences for these inputs as well.

> suffers from poor usability as I have also explained.

I do not agree here. What is actually the usability problem here? Can you please explain it again, after we have a common scene about the ReplayGain average.

> By the way, DJs have no problem using the gain knobs to even out tracks -- they do it all the time.

You might not have the problem, but others do. That why the ReplayGain stuff was introduced and thats why it is enabled bay default

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Correction:
(abs(sample1) + abs(sample2) ... + abs(sampleN) / N) = 0.2

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

> I do not agree here. What is actually the usability problem here? Can you please explain it again, after we have a common scene about the ReplayGain average.

Here are the two usability issues:

Problem #1) It's similar to taking the crossfader settings and putting them in the EQ preference page. They are not conceptually related. When a user is trying to find the headroom setting why would they search in the ReplayGain preference page?

Problem #2) When replaygain is enabled, the boost is the predicted RG boost. When replaygain is disabled your boost is the headroom (applies to all tracks). With replaygain enabled there is no headroom preference.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Problem #1)
This is not about the mixing headroom.
If you think we need a headroom preferences for mixing, we can add it in a appropriate place.

Problem #2)
The the boost is always the predicted RG boost.

I think of the is preference page as a tweaking page for the deck gain knob center position.

You may user ReplayGain to find a good Boost value or you do it manually.

So for me it looks like a text string issue here.

Currently the preference pain is called "Normalization" What about Call it "Deck Gain"?
Or if we decide to add a preference option for the Master gain and the Aux and Mike Gain as well, we can call it just "Gain"
Any other ideas?

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Why is it a problem to expect DJs to use the deck Gain knobs to level out un-analyzed tracks? That's why they're there. DJing on an analog mixer in fact requires one to do this, so it's not like it's an unfamiliar practice.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Analog Mixer have a real big headroom to do it. You can use almost the whole range of the gain knob to do it.
We had such a headroom in Mixxx 1.11, but it was removed. (which I think Is right to remove such hidden stuff)

This has effectively increases the Loudness of Mixxx by +6dB for the non ReplayGain mode.
The issue was fixed for the ReplayGain mode, by moving the initial boost slider by -6 dB when migrating from Mixxx 1.11

If you now play loudness war tracks with samples at 1, you will notice, that the the upper half of your gain knob is useless, because it clips mediately even though the track loudness is too low.
This is no issue with replayGain enabled, because it reduces the default loudness of Mixxx again to have such a dynamic headroom.
(the same as Mixxx 1.11)

Some user like a loud Mixxx, some have a tracks with mixed loudness or dynamic range, so it is a good idea to have a preference option for this.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

merged to 12c3f8f2727106971c3dcdf259c6c497c3aec3b3 without applying the default boost when replayGain is disabled.

Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/7787

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.