4
votes

Background

I admit, this question stems from an ultimate lack of deep understanding of the underlying mathematics involved with digital signal processing; I'm still learning.

I want to take a set of amplitude samples, say 1024 (single channel), and bring them into the frequency domain. Obviously this requires a FFT; no problem there. The problem is that this only gives me frequencies up to the Nyquist frequency or 1024/2.

Question

If I have a stereo signal, can I merge the signals to produce 2048 amplitude samples thus returning 1024 frequency values? I'm looking to get higher resolution in the frequency domain.

So, can this be done and return meaningful frequency data? Is there any other way to take a stereo signal and end up with higher resolutions in the frequency domain?

What I've Found So Far

I came across an article that suggested taking the left signal and making it the real value and the right signal and making it the imaginary value of the complex-value for the FFT. This doesn't make sense to me, perhaps because I don't understand the math. I did try it, and it seemed to work, but I had signal leakage. So I applied a Hanning window, but that resulted in only 512 usable values after processing.

5

5 Answers

5
votes

In general, no. Your stereo signal is certainly 2048 amplitude samples, but these are samples from two separate channels, each of which was filtered to remove all information above the Nyquest frequency before A/D conversion.

Two cases to think about involving a pair of 48 KHz channels:

  1. A 1000 Hz signal panned hard left, and a 2000 Hz signal panned hard right. There's no relationship between these whatsoever, nor is any of either signal present in the opposite channel, so combining them makes no sense whatsoever.

  2. A 50 KHz signal panned hard left. There's nothing in the right channel, and, assuming a proper cutoff filter, nothing in the left channel, either. Without filtering, you have nonsense in the left channel.

That said, perhaps you're thinking that if a pair of microphones were recording an ambient signal in a room, and you removed the cutoff filters, the phase differences between the two microphones might give you more information about the actual signal. That would be a fascinating area of research, but as far as I know that's a long, long way from having any practical implementation at the moment.

3
votes

If the signal you're analysing were got from a physical signal you can't do anything. Merging the signals into one big array of 2048 samples will be enought to do the math, but the result will be meaningless.

For an example, make an array of 2048 cells and fill it like this:

original = int[1024];
new = int[2048]
new[2*n] = original[n];
new[2*n+1] = original[n];

This way you get a bigger array and an higher frequency, but as your initial data is the same, the result you get won't be of any help, it will be the same as the original FFT.

If you need only a higher frequency analysis, you can do 2 things, change the sample rate (I suppose you're using a sound line in jack) to the max your sound board can do (Mostly 48kHz). Or second, change the aquisition board to some specific hardware (any dedicated usb aquisition board can get up to 1MHz easly).

Ps: The frequency is 1024/2 times the sampling frequency. Do not forget to multiply the sampling frequency.

1
votes

Special Case:

One can imagine an arrangement with a single-point source for the sound, and the stereo input arranged to get a half-wavelength shift between the two channels.

Then you would be able to combine the channels to get high frequency data.

Might make a cute demo, but it is not a practical application.

1
votes

There's one possibility where you could get a higher rate from two channels. Often analog to digital systems are multiplexed, that is, they use one analog to digital converter for two channels, alternating between them. If this were the case in your recording, and the two channels had nearly identical input, and other variables were in your favor, then you might actually have twice the base sampling rate.

It's a long shot, but maybe worth checking out. And if this is the case, you could reconstitute the higher frequency by simply interleaving the two channels in the proper order. (I don't see any justification for the idea of making one into the complex channel.)

To check whether this was the case, you could simply inspect a plot of the interleaved channels, or a plot of the cross-correlation might work.

0
votes

Nope, can't be done!

The left and right channels being combined into an imag. number (left[i] + right[i]*j) form a single signal which contains the two distinct audio channels. Such a signal can be mixed up and transmitted over a medium (air, water, RF). It's just a means of muxing two real channels into one complex signal with a similar bandwidth.