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: Pop/tick detection algorithms? (Read 4206 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Pop/tick detection algorithms?

I'm looking into ways to detect transient pops and ticks (yes, for vinyl analysis) at a very high level of sensitivity. That is, false positives are allowed, as long as it aids detection at levels very close to the noise floor. The overall goal is to generate a figure of merit that is proportional to both the number of detected transients, as well as their average energy. It would be nice if this figure of merit had some correspondence with a physical quantity in its calculation, rather than representing a purely synthetic unit of measurement.

I've cobbled together a time-domain algorithm so far, which is fairly simple. Assume I'm dealing with a 96khz sample rate here. If you're in 44.1 land you'll need to change a few numbers around.
  • Highpass the signal at ~10khz. I use a FIR filter for this although I suppose any decently designed filter would work. Passband tolerances can be very wide, as long as the stopband rejection is extremely high.
  • Divide the signal into 10-sample chunks. (ie, whatever highpass cutoff you set in step 1, block up the data so that the block length is not smaller than the period of the cutoff frequency.)
  • Calculate the RMS average of each block's samples, yielding an RMS amplitude plot at ~0.1ms resolution.
  • Run a highpass FIR filter over the RMS signal. The goal here is to sum up a potential transient's signal, and the signal around it if it straddles more than one sample, and subtract the average neighboring signal amplitude around the transient to obtain an estimate of the real transient amplitude.
  • Threshold the filtered RMS signal to select amplitudes greater than 0.
  • Sum the filtered RMS signal samples together, and divide by the signal duration in seconds, to obtain a figure of merit representing the total transient energy across the waveform
I haven't ironed all the kinks out of this yet, but the basic idea tends to perform extremely well on real signals, and reject white noise very well. It tends to emit a lot of false positives for CD data, but the resulting figures of merit tend to be 2-3 orders of magnitude lower than those computed for vinyl samples, which suggests to me that the false positives are not completely compromising the results.

At 10khz, most of the energy is either electricial noise, or pops/ticks, or mistracking in the case of vinyl (which can generate astonishingly high harmonics!). Any lower of a cutoff frequency and it seems that too much musical material creeps into the energy measurements, which raises the average background energy level and so reduces the sensitivity.

Another benefit of such a high cutoff is that the resulting block length is small enough to detect transients that are only a short space apart (perhaps 1ms). Depending on the length of the FIR highpass in #4, legitimate pops and ticks could be filtered out if they occur often enough.

Has anybody else done anything similar to this, and can document their algorithm? Any suggestions on testing this properly?

Pop/tick detection algorithms?

Reply #1
I have done some transient detection algorithm. The problem which you are describing is that you are trying to detect "certain" type of transients. I am very sure you can't differentiate the various transients within a music clip. Some of these clicks and pops might be naturally ocurring transients that belongs to the music itself and not due to outside noise. 

Pop/tick detection algorithms?

Reply #2
Like I said, false positives are not a showstopper.

 

Pop/tick detection algorithms?

Reply #3
Like I said, false positives are not a showstopper.


I do not understand your statement. For some clips, these false positives could be very significant in numbers. Surely it will have effect on your results? After all you are measuring pops and ticks due to external noise.