Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Peak search in fb2k like on a CD player? (Read 6354 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Peak search in fb2k like on a CD player?

Hi all. As the retro guy I am, I want to make a cassette tape with 80's tracks. But since this is analog, I have to manually set the recording level on the cassette deck. My Sony CD player has this "Peak Search" feature, where it scans through the CD and plays the loudest part repeatedly, so I can adjust the rec level to match that part, to avoid clipping

I was wondering if a similar thing can be done in foobar? Like scan a group of mp3 files and point out where the loudest part is?

Peak search in fb2k like on a CD player?

Reply #1
You could scan them all with ReplayGain (which, in foobar2000, is implemented using a different volume-measuring algorithm but functions the same after that), display the resulting peaks in your playlist window, sort descending, and adjust your recording according to the highest peak.

The bonus is that RG is intended to perform perceptual levelling of loudnesses between tracks or groups thereof, so you get the info necessary for that for free.

If you just want to see the peaks, RG is fine. If you want to physically normalise the files according to them, its standard algorithm is not made for that purpose. Thus, to perform basic, non-perceptual normalisation on the files themselves, you would have to either decompress and normalise the desired group of tracks using another program…

…or, if my vague recollection of someone else mentioning this and a quick test just now are accurate, you could trick ReplayGain into levelling according to peaks by (1) scanning the tracks with RG, (2) setting the maximal available (+20 dB) preamp gain for RGd tracks, and (3) enabling the option to prevent clipping according to the peak of each track. That assumes, since RG is usually performed in real time, that you either (A) play the files from fb2k into your tape recorder or (B) use the Converter to create new copies with the adjustment applied and then record those by whichever method you prefer. Also, because of the aforementioned limit to the preamp gain selectable in foobar2000, this method might not fully normalise files whose peaks are below −20 dB, although that will depend upon their perceptual loudness too.

(Wow, it’s been a while since I was reminded that cassettes exist. )

Peak search in fb2k like on a CD player?

Reply #2
I tried your RG suggestion, and it works like a charm - thanks!

Peak search in fb2k like on a CD player?

Reply #3
You can physically normalise the files using the foobar2000 converter; you don't need to use another program.
Install the fb2k component foo_r128norm
then select all your files in the fb2k playlist viewer > right click > Convert > ... > Converter Setup > Processing : Available DSPs : activate "EBU R128 Compressor".

To visualize how it works, do this little test . . .
In foobar2000, create a new playlist and drag in two tracks which have completely dissimilar loudness features,
for example (1) An aggressive rock/metal song and (2) Someone playing the first movement from Beethoven's Moonlight Piano Sonata (14, Op.27),
While tracks are playing, activate foo_r128norm by holding SHIFT key and going to toolbar: Playback > DSP Settings > Preferences > Available DSPs : activate "EBU R128 Compressor".
Switch playback back-and-forth between the tracks and listen . . . Remove the DSP from the playback chain and do the same  . . .

Peak search in fb2k like on a CD player?

Reply #4
Did you read my post? I covered all this already. Yes, you can physically write RG/DSPs into new files, which I have already explained. However, normally, RG is perceptual rather than peak-based, the latter of which is desired by the OP, although I provided a hack to achieve the former. But more so, the OP never mentioned anything about compression. Considering all of these facts, I’m not sure why you think you can drop in and decide on behalf of him/her to shift to a radically different method.

Peak search in fb2k like on a CD player?

Reply #5
Perhaps the OP may use the "peak discovery" method and then create his cassette.
Perhaps he would also like to try the "r128 normalization" method and then create another cassette.
He may prefer one over the other, given that we don't know the exact range of music types covered by the term "I want to make a cassette tape with 80's tracks".

In any case, using foobar2000 he can make two separate conversions and have a nice listen to tracks as a group before he commits to the cassette burn.

Peak search in fb2k like on a CD player?

Reply #6
Yeah, fair point. Options are always good!  It’s just important, since the OP is new to ReplayGain, to make sure we don’t confuse matters. So, as well as noting that ReplayGain is by default perceptual and not peak-based, I think it’s important to specify that normal ReplayGain does not involve dynamic range compression at all. The plugin you mentioned is an adaptation of RG’s algorithm for a new purpose: real-time DRC based upon a moving window of perceptual loudness, instead of a static process performed on the entire stream. Perhaps you or the OP can report how much you agree with this statement by kode54:
Quote
Restructured to use a sliding gated loudness window, with a sufficient look-ahead. It should now be almost as good as running a R128Gain scan on the source material.

Peak search in fb2k like on a CD player?

Reply #7
That's a very dry and technical mouthful there db1989 . . . to be honest I'm not capable of giving an educated reply.

It would be lovely if kode54 came here and gave his opinion and shed some more light on the usage and technicalities of his plugin and whether the application I have described has any merit.

I conducted this test. . .

I made three sample clips of unrelated tracks which were aurally and dynamically very different to each other:
(1) Ramones Blitzkrieg Bop (15 sec clip).flac
(2) Beethoven Moonlight (15 sec clip).flac
(3) Pink Floyd Time (15 sec clip).flac

I made three sets and put them in three folders, and the folder names are literal to the contents:
(1)...\converted with foo_R128norm\...
(2)...\tagged with RG (as album)\...
(3)...\tagged with RG (as tracks)\...

I dragged all three folders into an fb2k playlist and had a listen . . .
The files converted with foo_r128norm sounded "normalized" and the tracks harmonized in loudness.
The files tagged with both RG methods did not harmonize well and I was wanting to reach for the volume slider.

So, my test gave me the opinion that converting a bunch of tracks with foo_r128norm before burning to a cassette is a worthwhile exercise.

Peak search in fb2k like on a CD player?

Reply #8
That's a very dry and technical mouthful there db1989
I’ll take that as a compliment…

Quote
The files converted with foo_r128norm sounded "normalized" and the tracks harmonized in loudness.
The files tagged with both RG methods did not harmonize well and I was wanting to reach for the volume slider.
Did those samples happen to contain massive dynamic variation? If so, compression would tend to neutralise that, whereas in native RG, they might bias the computed average volume used to adjust the stream as a whole. If the dynamics are within normal bounds, something would seem to be wrong with your setup as RG should produce equivalent perceptual loudnesses among the selection of streams input. Especially, because your clips were so short, said averages should not be easily confounded by spikes and so forth, meaning they should sound equally loud with RG applied.

Sorry to ask such a basic question, but have you set the option to enable ReplayGain during playback?

Peak search in fb2k like on a CD player?

Reply #9
> ...Did those samples happen to contain massive dynamic variation?
Yes

> ...have you set the option to enable ReplayGain during playback?
I think so . . . can you please describe the settings you would deem correct for my test at the page: Preferences > Playback

* EDIT *
 
Sorry, my bad . . . you are correct; the playback output for tagged RG tracks and converted r128 tracks is now identical!
At Preferences > Playback, I applied: Source Mode = track | Processing = apply gain | Preamp [with RG info] = 0 dB | Preamp [without RG info] = 0 dB

So my new conclusion about this is . . .
Using foo_r128 to convert the tracks before burning to cassette will normalize the tracks and achieve the same effect as applying ReplayGain on the track tags.

Personally, I think kode54 has done himself a big disservice by conflating the names for his plugin;
the DSP inside foobar2000 is named EBU R128 Compressor , but the component name is foo_r128norm and it is described as "a simple normalizer DSP ..." .
To a casual foobar2000 user this introduces unnecessary obfuscation and confusion . . . myself, I would have named the DSP inside fb2k as R128 Loudness Normalizer .

Peak search in fb2k like on a CD player?

Reply #10
Back to the cassette thing: any modern CD is going to hit 0dB FS, so just play a full scale sine wave when adjusting the meters on the cassette deck.

Older CDs are more dynamic and while it's most only very old CDs that don't hit 0dB FS at all, newer CDs hit it more often (i.e. most of the time!) whereas older CDs hit it occasionally. The thing with cassettes is that brief peaks above the saturation level don't really matter, so two CDs might have the same digital peak level, but one can be "turned up" far more on the cassette deck's meters before giving you audible distortion on the cassette.


I don't miss cassettes. The quality could easily be acceptable on a decent deck, but the hassle of setting recording levels and real-time transfers is a strange thing to have put up with. I look at my piles of cassettes and minidiscs and think "how much time and money did I spend/waste making these?!".

...but if you're going for the retro experience, I think ReplayGain and compressors are cheating! 

Cheers,
David.

Peak search in fb2k like on a CD player?

Reply #11
Sorry, my bad . . . you are correct; the playback output for tagged RG tracks and converted r128 tracks is now identical!
That makes more sense!

Quote
Personally, I think kode54 has done himself a big disservice by conflating the names for his plugin;
the DSP inside foobar2000 is named EBU R128 Compressor , but the component name is foo_r128norm and it is described as "a simple normalizer DSP ..." .
To a casual foobar2000 user this introduces unnecessary obfuscation and confusion . . .
Agreed. Normalisation and compression are not the same thing, so I see no valid reason to present them as such.

Quote
myself, I would have named the DSP inside fb2k as R128 Loudness Normalizer .
Really, the more pertinent change would be to rename r128norm to r128compress or something. The name of the normal RG scanner is only ambiguous if there is another component casting doubt upon it, as there is here.