Kyma Forum
  Kyma Sound Exchange
  Cepstral Analysis

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Cepstral Analysis
David McClain
Member
posted 31 March 2003 13:57         Edit/Delete Message   Reply w/Quote

cepstralanalysis.kym


log2_66db.aif

 
The attached Sound allows you to investigate the structure of recorded reverb and echos by means of "Cepstral Analysis".

The (simple) Cepstrum is the inverse FFT of the Log of the magnitude of a signal FFT. A Complex Cepstrum is more difficult to compute on Kyma, but it would permit you to remove the reverb and echoes in the recorded sound.

This Sound takes audio in on any of channels 1-4 and displays an oscilloscope display that represents Cepstrum amplitude vs. time. The center of the display (assuming you have the oscilloscope running synchronous with Capy sample rate) is time zero. As you play a recording into this analyzer you will see a large hump gradually appear in the center of the display, and smaller echo and reverb humps on either side.

A pulse generator is provided along with several delays to produce a set of time markers on the display. Some CVS presets are provided to demonstrate some "features".

A Cepstrum has infinite duration, no matter what. A sampled Cepstrum therefore folds all of the images from minus infinity to plus infinity over the top of the base-time region. This is "time aliasing".

You can see this happening by first going to the "8 ms marker" preset in the VCS. You should see a center spike, and spikes spaced at 8 ms on either side. A reasonably clean display...

Now go to the "Time aliasing" preset, which adds a 10 ms marker. What you see is a picket fence of spurious markers that are the result of time aliasing from the 10 ms delay.

On my system running at 48 KHz sample rate, the 1024 point FFT provides for the display of up to +/-512 samples from the center, which is 10.67 ms. The Hann window on the input of the FFT supresses most of the amplitude of the 10 ms marker, but its images are readily seen.

The "Time markers" preset has a mostly non-aliased display of time markers for you to use.

The only way to diminish the effects of time aliasing in a Cepstrum is to use a longer FFT. The longer the better. Furthermore, when analyzing reverb, you can see that there will be plenty of opportunities for long reverb tails to time alias over the 10 ms display window.

The output of the Cepstral analyzer is fed into a recurrent delay line with leakage. This allows the display of material to build up and change slowly over time. It also averages out the musical variations, and since reverb is mostly constant, its small humps build up quite visibly.

The idea behind the Cepstrum is to take a signal, do a forward FFT, take the Log of the amplitude of the FFT values, then inverse FFT. Signals are affected by reverb and most other filters by means of time-domain convolution. The spectrum of a convolved signal is simply the product of the signal spectrum and that of the filter impulse response. Taking the Log of a product produces a sum of Logs. Hence the Cepstrum can separate the effects of signal and convolving kernel and present them as additive components. That's what you see in that oscilloscope display.

If we could perform FFT analysis over many seconds duration, and perform proper phase unwrapping of the Fourier components, then we could isolate that signal from the effects of echoes and reverb. But this is too much for Capy in real time. An off-line C program could do this.

Try this on some old Enya recordings! Maybe, someday, with the help of Cepstral analysis, I'll get to hear what Enya sounds like direct?

- DM

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c