Forums

mysterious click in audio file

Started by markpxxxxx November 26, 2005
I wrote a Matlab program that generates overlapping timbres. It works fine, except that it
causes a single clicking sound in the audio file and I can't figure out where it is located.
Usually I can identify a click's location by a visible discontinuity in the waveform, but in
this case I see no discontinuities. The click comes in about halfway through this 1-second
excerpt, and appears in both channels. If anybody could figure this out for me, I'd be very
grateful!

Here's the 1MB audio file, in WAV format:
http://www.kunst.no/bjornmag/mpphp2004/Click.wav



Mark-

> I wrote a Matlab program that generates overlapping timbres. It works fine, except that it
> causes a single clicking sound in the audio file and I can't figure out where it is located.
> Usually I can identify a click's location by a visible discontinuity in the waveform, but in
> this case I see no discontinuities. The click comes in about halfway through this 1-second
> excerpt, and appears in both channels. If anybody could figure this out for me, I'd be very
> grateful!
>
> Here's the 1MB audio file, in WAV format:
> http://www.kunst.no/bjornmag/mpphp2004/Click.wav

I posted two plots, one showing the click in the frequency domain after STFFT
generation and giving a 128 pt (3 msec) estimate on where to look, and the other
showing the exact spot where you have a slight discontinuity in the time domain:

http://www.signalogic.com/images/hsm_freq_domain_click.jpg

http://www.signalogic.com/images/hsm_time_domain_click.jpg

These were generated by Hypersignal-Macro (HSM) software, a veteran package around
for many years, but still a bit faster than MATLAB at finding and displaying these
sorts of things (took about 30 sec). You should be able to generate something
similar in MATLAB using the "specgram" function, or similar. I used 128-pt time
analysis framesize, 4096-pt FFT, 50% overlap, and Hanning window.

In the time domain plot, you don't have a spike or glitch really, but a sudden, sharp
increase in slope. That translates in the freq domain as "wideband noise", which
shows up in 2-D plots like this as a thin vertical bar.

The interesting thing to me is this is a good example of time vs. freq domain
resolution tradeoff. If you want increased frequency information out of the STFFT
(short-time fast Fourier transform) or other similar methods, you lose time domain
accuracy. Enter wavelet transforms.

-Jeff



2005/11/27, markpxxxxx <markpxxxxx@mark...>:

> I wrote a Matlab program that generates overlapping timbres. It works fine, except that it causes a single clicking sound in the audio file and I can't figure out where it is located.
> Usually I can identify a click's location by a visible discontinuity in the waveform, but in this case I see no discontinuities. The click comes in about halfway through this 1-second excerpt, and appears in both channels. If anybody could figure this out for me, I'd be very grateful!
>
> Here's the 1MB audio file, in WAV format:
> http://www.kunst.no/bjornmag/mpphp2004/Click.wav

Hi, what I see is that if you combine both channels, you have a strong
wideband spread of the signal, but if you invert the phase of one of
them, and mix them, the tone overlaps perfectly, and even when there
is a noticeable frequency spread on the problematic point, it is much
more reduced.

This is the signal with phase inversion in the second channel and I
here no click on it, or in a periodic extension:

<http://homepage.mac.com/juandesant/Click.Inverted.wav>

This is the sonogram via Amadeus II in Mac OS X for the signal you sent:

<http://homepage.mac.com/juandesant/OriginalPhase.png>

And this is the sonogram for the altered signal, with one of the
channels phase inverted:

<http://homepage.mac.com/juandesant/InversePhaseChannel.png>

--
Juan de Dios Santander Vela
Ingeniero en Electrica
Doctorando en Tecnologs Multimedia (Universidad de Granada)
Instituto de Astrofica de Andaluc (CSIC)


Thank you, both, for two OUTSTANDING reponses! VERY
helpful and illuminating!

M --- Jeff Brower <jbrower@jbro...> wrote:

> Mark-
>
> > I wrote a Matlab program that generates
> overlapping timbres. It works fine, except that it
> > causes a single clicking sound in the audio file
> and I can't figure out where it is located.
> > Usually I can identify a click's location by a
> visible discontinuity in the waveform, but in
> > this case I see no discontinuities. The click
> comes in about halfway through this 1-second
> > excerpt, and appears in both channels. If anybody
> could figure this out for me, I'd be very
> > grateful!
> >
> > Here's the 1MB audio file, in WAV format:
> > http://www.kunst.no/bjornmag/mpphp2004/Click.wav
>
> I posted two plots, one showing the click in the
> frequency domain after STFFT
> generation and giving a 128 pt (3 msec) estimate on
> where to look, and the other
> showing the exact spot where you have a slight
> discontinuity in the time domain: >
http://www.signalogic.com/images/hsm_freq_domain_click.jpg
http://www.signalogic.com/images/hsm_time_domain_click.jpg
>
> These were generated by Hypersignal-Macro (HSM)
> software, a veteran package around
> for many years, but still a bit faster than MATLAB
> at finding and displaying these
> sorts of things (took about 30 sec). You should be
> able to generate something
> similar in MATLAB using the "specgram" function, or
> similar. I used 128-pt time
> analysis framesize, 4096-pt FFT, 50% overlap, and
> Hanning window.
>
> In the time domain plot, you don't have a spike or
> glitch really, but a sudden, sharp
> increase in slope. That translates in the freq
> domain as "wideband noise", which
> shows up in 2-D plots like this as a thin vertical
> bar.
>
> The interesting thing to me is this is a good
> example of time vs. freq domain
> resolution tradeoff. If you want increased
> frequency information out of the STFFT
> (short-time fast Fourier transform) or other similar
> methods, you lose time domain
> accuracy. Enter wavelet transforms.
>
> -Jeff
>