2

I have around 1000 "songs" - an 80s experimental noise duo - ripped to flac from cassette. A bunch (150, maybe?, but I don't know which ones) were processed with a hard limiting script instead of a normalizing script, which butchered any sustained low bass sounds as well as caused other problems. I don't want to have to listen to all of them attentively to find the problems. I recognize I will have to listen to the questionable ones for a final decision. I may have cleaner copies of them as well, but won't know for certain without listening or analysis.

I have (as have others) successfully automated finding compressed audio with limited frequency response (hi-res copies of low-res MP3 rips), and finding hard clipping. I have a program (Similarity) that purports to analyze quality, but doesn't tell me any details. I have other software capable of more detailed analysis, up to and including CSound, but I have no idea what to look for. With repeated analysis, I could focus on things that might distinguish them - bass always having strong low-order harmonics, bass volume very compressed, even if highs vary in volume, intermodulation products, for example.

Are there analysis tools (either free or easily available commercial music audio software) that are more specialized and easier to use for this specific job than attacking it with generic signal-processing math? Maybe something "loudness wars" related?

4
  • I presume you didn't keep any of the originals? Because really, the very first task after copying over from old cassettes is fixing the azimuth. if you've comped the hell out of things, then you might find them by looking at very low LUFS values. I only know of one batch processor that will look at LUFS, Myriad, & it's a) Mac only & b) currently not available to purchase as it's changed owners recently.
    – Tetsujin
    Jul 16 at 16:56
  • I may have some/all originals. I have many different versions/mixes of the same song with no way but analysis to distinguish them. Some with azimuth compensation, some without, some with NR, etc. This project, partially completed, was recovered from three or four different dead computers and all the files dumped into a couple of folders. The same tools that find low-res MP3s will find azimuth issues - sharp notches in the high treble when summed to mono rather than a smooth roll-off. There's a bunch of problems - this is just one I don't know how to start analyzing.
    – KFW
    Jul 16 at 21:47
  • I like how you quoted the word "songs" lol. Interesting question, though. I assume there's no metadata or embedded code that could help determine what's what? Even dates may help group similarly processed files. Just a thought.
    – n00dles
    Jul 24 at 14:20
  • Couldn't you analyse peak samples and if there are a certain amount at(or around) a common level, then it's been hard-limited rather than just normalized? That should be quite simple, but then I haven't worked with such analysing software. Having the HL script would be helpful, I assume, so you know what to look for.
    – n00dles
    Jul 24 at 14:31

1 Answer 1

2

Here is my understanding of your problem:

  • You have a set of recorded audio files stored using a lossless audio format.
  • I will assume that no saturation/clipping occured during the recording process, and that initially, all recorded tracks had some headroom.
  • A first subset of them, which I call "N", have been normalized, i.e. a constant gain was applied to the signal so that the maximum peak of amplitude reaches a target value. The normalization process does not change the perception of the sound, except for the volume.
  • A second subset of them, which I call "L", have been hard limited, i.e. most of the signal is left untouched, except for the part near a target amplitude value. In that area, a dynamic gain was applied locally to prevent the signal from going over the target value. The hard limiting process can result in audible distortion in some cases.
  • I will assume that the target value:
    • is the same for all files;
    • is the same for normalization and hard limiting.
  • You want to:
    • be able to determine if a file belongs to L or N by analysing its content;
    • automate that task.

 

Among the L set, depending on the initial signal content, there are two kinds of files:

  • the "L0" set : files whose signal was left unchanged because it was not "loud" enough to trigger the limiter.
  • the "L1" set : files whose signal was altered by the limiter.

 

You should be able to determine if a file belongs to L0 by looking at files with a peak of amplitude below the target value. Other files belong either to N or to L1.

 

The tricky part is to distinguish L1 files from N files, and I would be tempted to say that there is no solution that would work in all cases. Especially as the signals involved here are "songs", which can be quite different from one another, and may have already undergone a number of processes, and may or may not exhibit saturation or limitation...

 

In a favourable case where the different signals have similar statistical characteristics, we could make the assumption that L1 signals, in the surroundings of the target amplitude, are more flattened/squashed than the N signals. As a consequence, we could try this:

  • Put aside files belonging to L0, as seen above.
  • For every other file, compute a histogram of the absolute amplitude of all audio samples whose amplitude is in the surroundings of the target amplitude (the "height" of the surroundings has to be chosen empirically, or by knowing how the hard limiter behaves).
  • L1 files should have an histogram with more high amplitude values than N files.

 

The same idea could be rephrased that way: L1 files contain many "almost clipped" parts in their signal, compared to N files that do not (considering the assumptions made above).

So if we could "de-clip" all these files, the "de-clipped" version of the L1 files should have a new maximum peak of amplitude quite higher than the previous one, due to the reconstructed parts going clearly above the target limiting amplitude. On the contrary, the difference should be null or negligeable for files in N.

As the success of this method relies mostly on having a good/smart "de-clipping" algorithm, here are some leads:

 

Although I was not able to provide a turnkey solution for your problem, I hope the detailed approach I presented here will help you get to one.

1
  • Yes, lossless. No, some were distorted by various means. All have been normalized, some otherwise processed. No, the hard limited portion may have already been compressed first. They weren't all limited, just some of them, and normalized as part of the limiting process. Everything peaks around -1db. Some noisy ones stay up there, like a rock song. Some have one or two peaks in ten minutes. As the distortion products on the low bass notes are primarily what I hear, I thought they'd be easiest to detect. I may be able to de-clipping to do that.
    – KFW
    Jul 25 at 2:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.