r128gain <file> <directory>
r128gain <file> <directory> flac
r128gain <directory> <directory>r128gain <directory>/* <directory>
r128gain <directory> <directory> flacr128gain <directory>/* <directory> flac
Didn't try the tool, yet,
but had a look at the source. Great work!
It would be nice, if you could also include your test suite.
$ r128gain ../sounds/ebu-loudness-test-setv01../sounds/ebu-loudness-test-setv01formats: no handler for file extension `txt' analyzing ... 1kHz Sine -20 LUFS-16bit.wav (1/16): -19.2 LUFS, -3.8 LU (peak: 0.100734: -10.0 dBFS) 1kHz Sine -26 LUFS-16bit.wav (2/16): -25.2 LUFS, 2.2 LU (peak: 0.050508: -13.0 dBFS) 1kHz Sine -40 LUFS-16bit.wav (3/16): -39.2 LUFS, 16.2 LU (peak: 0.010260: -19.9 dBFS)formats: no handler for file extension `txt' seq-3341-1-16bit.wav (4/16): -22.2 LUFS, -0.8 LU (peak: 0.071316: -11.5 dBFS) seq-3341-2-16bit.wav (5/16): -32.2 LUFS, 9.2 LU (peak: 0.023049: -16.4 dBFS) seq-3341-3-16bit.wav (6/16): -26.7 LUFS, 3.7 LU (peak: 0.071468: -11.5 dBFS) seq-3341-4-16bit.wav (7/16): -26.8 LUFS, 3.8 LU (peak: 0.070850: -11.5 dBFS) seq-3341-5-16bit.wav (8/16): -22.2 LUFS, -0.8 LU (peak: 0.100845: -10.0 dBFS) seq-3341-6-5channels-16bit.wav (9/16): -22.3 LUFS, -0.7 LU (peak: 0.063133: -12.0 dBFS) seq-3341-6-6channels-WAVEEX-16bit.wav (10/16): -22.9 LUFS, -0.1 LU (peak: 0.063133: -12.0 dBFS) seq-3341-7_seq-3342-5-24bit.wav (11/16): -21.5 LUFS, -1.5 LU (peak: 0.358341: -4.5 dBFS) seq-3341-8_seq-3342-6-24bit.wav (12/16): -22.8 LUFS, -0.2 LU (peak: 0.718299: -1.4 dBFS) seq-3342-1-16bit.wav (13/16): -21.8 LUFS, -1.2 LU (peak: 0.100089: -10.0 dBFS) seq-3342-2-16bit.wav (14/16): -16.0 LUFS, -7.0 LU (peak: 0.177974: -7.5 dBFS) seq-3342-3-16bit.wav (15/16): -22.2 LUFS, -0.8 LU (peak: 0.100089: -10.0 dBFS) seq-3342-4-16bit.wav (16/16): -25.9 LUFS, 2.9 LU (peak: 0.100075: -10.0 dBFS) ALBUM: -22.7 LUFS, -0.3 LU (peak: 0.718299: -1.4 dBFS)
Wow, thank you so much for this tool! I was already mentally preparing myself to have to write my own R128 scanner, but here it is! And in version 0.2, it already does all I need.
When I pass a file path with spaces and without "enclosing quotes", or a file which doesn't exist, it prints an assert and crashes.
For the loudness analysis, all input files are resampled to 48 kHz, right?For the peak finder, the files are additionally resampled to 192 kHz, right?
These filter coefficients are for a sampling rate of 48 kHz. Implementations at other sampling rates will require different coefficient values, which should be chosen to provide the same frequency response that the specified filter provides at 48 kHz. The values of these coefficients may need to be quantized due to the internal precision of the available hardware. Tests have shown that the performance of the algorithm is not sensitive to small variations in these coefficients.
Attenuate: 12.04 dB attenuation4 × over-samplingEmphasis: Pre-emphasis shelving filter, zero at 14.1 kHz, pole at 20 kHz (optional)DC block (optional)Absolute: Absolute valueMax: Highest value detection (optional, included if DC block is included).
The way I understand R128 is:Pass 1: analyze entire file/album, compute loudness taking into account the absolute gate of -70 LUFS.Pass 2: analyze entire file/album again, this time also taking into account the relative loudness gate derived from the result of pass 1. Is that how you implemented it?
using an absolute 'silence' gating threshold at -70 LUFS for the computation of the absolute-gated loudness level, andusing a relative gating threshold, 8 LU below the absolute-gated loudness level, andthe measurement input to which the gating threshold is applied is the loudness of the400 ms gating blocks measured using an ITU-R BS.1770 method without gating, that is, summed across channels;a constant overlap between consecutive gating blocks of at least 50% is required (for increased precision especially when measuring programs of short duration).
D:\New Downloads\r128gain-0.2.exe>r128gain.exe "d:\New Downloads\r128gain-0.2.exe\2009 - This Is War" "d:\New Downloads\r128gain-0.2.exe\2009 - This Is War"d:\New Downloads\r128gain-0.2.exe\2009 - This Is War analyzing ... 01. Escape.flac (1/12): -13.4 LUFS, -9.6 LU (peak: 1.001484: 0.0 dBFS) 02. Night Of The Hunter.flac (2/12): biquad: biquad clipped 4 samples; decrease volume?-5.7 LUFS, -17.3 LU (peak: 1.138934: 0.6 dBFS) 03. Kings And Queens.flac (3/12): biquad: biquad clipped 1 samples; decrease volume?-6.4 LUFS, -16.6 LU (peak: 1.136147: 0.6 dBFS) 04. This Is War.flac (4/12): biquad: biquad clipped 4 samples; decrease volume?-7.0 LUFS, -16.0 LU (peak: 1.135694: 0.6 dBFS) 05. 100 Suns.flac (5/12): -18.2 LUFS, -4.8 LU (peak: 0.602695: -2.2 dBFS) 06. Hurricane.flac (6/12): -7.4 LUFS, -15.6 LU (peak: 1.061867: 0.3 dBFS) 07. Closer To The Edge.flac (7/12): -5.3 LUFS, -17.7 LU (peak: 1.309490: 1.2 dBFS) 08. Vox Populi.flac (8/12): -6.0 LUFS, -17.0 LU (peak: 1.083542: 0.3 dBFS) 09. Search And Destroy.flac (9/12): -7.1 LUFS, -15.9 LU (peak: 1.085039: 0.4 dBFS) 10. Alibi.flac (10/12): -8.9 LUFS, -14.1 LU (peak: 1.017255: 0.1 dBFS) 11. Stranger In A Strange Land.flac (11/12): -7.2 LUFS, -15.8 LU (peak: 1.082148: 0.3 dBFS) 12. L490.flac (12/12): -9.3 LUFS, -13.7 LU (peak: 1.010430: 0.0 dBFS) ALBUM: -7.2 LUFS, -15.8 LU (peak: 1.309490: 1.2 dBFS) encoding ... 01. Escape.flac (1/12) ... done. 02. Night Of The Hunter.flac (2/12) ... done. 03. Kings And Queens.flac (3/12) ... done. 04. This Is War.flac (4/12) ... done. 05. 100 Suns.flac (5/12) ... done. 06. Hurricane.flac (6/12) ... done. 07. Closer To The Edge.flac (7/12) ... done. 08. Vox Populi.flac (8/12) ... done. 09. Search And Destroy.flac (9/12) ... done. 10. Alibi.flac (10/12) ... done. 11. Stranger In A Strange Land.flac (11/12) ... done. 12. L490.flac (12/12) ... done.
r128gain <switch> <directory> <directory>switch:--a --analyse --at --analyse-tag--ate --analyse-tag-encode
On a completely other note... What about patents?
What is the license for the tool?
Is it safe to use your tool in other projects?
i can't for the life of me get this app to just analyse and then tag, it always encodes the FLAC's again.
Is there any possibility of getting proper switches implemented?e.g.Code: [Select]r128gain <switch> <directory> <directory>switch:--a --analyse --at --analyse-tag--ate --analyse-tag-encode
It's GPLv3 (http://www.gnu.org/licenses/gpl.html)
On a completely other note... What about patents? Is it safe to use your tool in other projects?
The only way for major closed source players like FB2K to use it would involve complete, clean room reimplementations. Which means you run into the same issues as ReplayGain with differing implementations.
Quote from: mudlord on 06 January, 2011, 07:22:33 AMThe only way for major closed source players like FB2K to use it would involve complete, clean room reimplementations. Which means you run into the same issues as ReplayGain with differing implementations.Huh, it is a stand alone program and not a library that you link to. As long as the closed sourced players invokes it as an external helper program, there is no problem. The closed source players can even distribute it as long as the license is intact and the source code, or a link to the source, is provided.
If you ever split out the guts of the tool into a backend library, please consider relicensing it under a non-copyleft license like MIT or zlib, so it can be used in other software like a foobar2000 component.
Even if the end artifact is a program, this prevents anyone from lifting source code from it (with proper attribution), or preventing anyone from forking it into a library with a sane license.
So the license matters, even for a standalone application.
Quote from: Zao on 06 January, 2011, 07:29:55 AMIf you ever split out the guts of the tool into a backend library, please consider relicensing it under a non-copyleft license like MIT or zlib, so it can be used in other software like a foobar2000 component.Yes, and let other people leech off your work without contributing back.
What is sane to you is not sane for others..
If more kinds of applications can use the code, the quality of the code improves. More software exercising the code in different ways makes it more robust. An interface that only has one client tends to be very brittle and idiosyncratic.
The scanner is heavily based on SoX
If a developer uses a library with one of the usual non-copyleft open source licenses, he's bound by the license to make any alterations to the library available.