# How to interpret these different Fourier analysis of this audio signal?

This is my first dive in DSP. I would like to familiarize myself with frequency analysis. I have two audio tracks which should be digitized at 16bit-44.1kHz and 24bit-192kHz (music, presented as a 24bit-192kHz sample) respectively.

I wanted to identify the effect of the low-pass filter around the Nyquist frequency (22.05kHz and 96kHz respectively).

Edit: I completely reworked the question.

## Software used:

I basically estimated the power spectral density using Welch's method as implemented by scipy.signal.welch in the Scipy library of the Python programming language.

Basically, I used a script equivalent to:

import numpy as np
from matplotlib import pyplot as plt
from scipy import signal

# Load data from one channel (#0) for each sample file

# DoE: 2 sample size and two windows types
chunks = [256, 4096]
windows = ["hanning", "boxcar"] # boxcar is rectangular

# Prepare a figure
plt.figure()
# Calculate density spectra and plot
for N in chunks:
for w in windows:
f, Pxx44 = signal.welch(wav44, fs=44100, window=w, nperseg=N, nfft=2*N, scaling="density")
plt.semilogy(f, Pxx44)
plt.legend(["chunk=%d; window=%s"%(c, w) for c in chunks for w in windows])
plt.xlabel("Frequency (Hz)")
plt.ylabel("Density (I$^2$/Hz)")


## The power spectral density of the 44.1kHz audio sample:

Which is basically just as expected:

• The chunk size, i.e. the number of samples per fft-transform segment in the real domain, does not change the density a lot if a Hann window is used.
• The chunk size effect is clearly visible with the boxcar (rectangular) window. From what I understand, this is because of spectral leakage which diminishes as the chunk size increases. Is that correct?
• The low-pass filter effect at the Nyquist frequency (22.05kHz)

So far, so good.

## The power spectral density of the 192kHz audio sample:

Good point:

• Same behaviour in regard to the chunk size and the window. Is spectral leakage really that strong? That's pretty impressive.

Oddities:

• What the heck is happening?
• Where is the low-pass filter near the Nyquist frequency?
• Why are very-high frequencies even increasing? Could that be related to the choice of the windowing function?

From my interpretation, there is no low-pass filter visible because basically no audio system would go above 192kHz and generally, the software/hardware creator are smart enough to apply a low-pass filter designed with regard to the actual output bandwidth of the audio system.

As for the increasing audio signal above 57kHz, I really can't explain it: the original audio sample is some classical music. I wouldn't expect any instrument to generate louder sounds in that range or frequencies. Any idea? Could this be an example of upsampling?

• I don't know the implementation details of Audacity (and I guess, most other people here don't either). So it might be a good idea to try to reproduce the result using some tool like Matlab/Octave. Then you know exactly what's going on. – Matt L. Jul 11 '15 at 14:09
• as Matt L already commented even though many of us generally have seen the interface of that nice program, programming details are out of scope. Nevertheless, I really cannot understand what you mean by the spectral analysis technique you just described. I have never seen such a technique in any programs/application... that chunk size ? could it be FFT size ? or it seems like a spectrogram/stft in 1 dimension...? – Fat32 Jul 11 '15 at 14:19
• In my original question, I said I had a problem with Python. But I identified it, so I will update the question really soon with data finally coming from a decent programming language with all the details included! Sorry for the terms, I'm really new to DSP, and translating to English does not make it any better. The chunk size is the FFT size, indeed. This is what you would call a periodogram. But I'll come back with a working script and comparable data. The window I'm talking about is the filter function used on each of the FFT sample. – user13706 Jul 11 '15 at 14:43
• Took some time: Int24 is not a native Python type. But whatever, here is the updated version of my question! :) – user13706 Jul 11 '15 at 20:02