# How do I create a polar plot from a multi-channel sound file?

I have a multi-channel sound file from a microphone array. I want to get the polar plot in Matlab in order to get the directivity patter of the sound source. How do I do this? I did the FFT on the whole recording and I plotted the magnitude in dB but I'm afraid I'm not doing the correct thing.

• Can someone tell me how I can get the polar directivity representation?
• If I want to plot the directivity in terms of octave bands should I use a filter bank or can I just plot some averaged magnitudes of the frequencies that are on that specific octave band?

Sorry for the newbie questions and thanks a lot in advance.

• Do you have the relative positions of the mics on the array? (This process will give you the directivity of the microphone, not the directivity of the source). The FFT of one raw channel does not convey anything. How familiar are you with phased arrays?
– A_A
Feb 25 '20 at 8:11
• I have the positions of the microphones, they are located in a semi-spherical way around the sound source. If I have the FFT of all the mics can I use the magnitude information to plot the directivity of the source? I would have a different directivity for each frequency bin though. I am new in the field, so I am not familiar with those, thanks for the link! Feb 25 '20 at 11:19
• OK, that is a bit different and I think that it should appear in the main body of the question. Do you have the polar responses of the microphones?
– A_A
Feb 25 '20 at 13:43
• I just know that they are omnidirectional Feb 25 '20 at 15:34

Now, let's briefly describe the process for a 2D horizontal polar plot. In the easy case where you have $$N$$ amount of microphones lying on the same horizontal plane, you just plot the recorded magnitude of each of them and find a way to fill in the gaps. This means that in the simplest case where they are spaced in equal angle steps around the source you could just interpolate every angle between them (by the way, if I am not mistaken, this is what happens in the CLF files, as their angular step is around 5 degrees). Keep in mind that this is NOT the most accurate/best way to do it.
Now, if you happen to either have a non-constant angular step you would have to find an appropriate formula to calculate the magnitude in between the microphone positions. In addition to that, if you happen to plot directivity patterns of horizontal planes that you either have some microphones on for some angles, but not for all of them (i.e. 3 mics for some horizontal angles lie on the plane but another $$N - 3$$ mics don't lie on the plane) you would also have to interpolate between adjacent microphone positions to get a magnitude value for that angle. A somewhat simple way to do it would be to use Vector Base Amplitude Panning (VBAP) (although this algorithm is used for "panning" it could very well serve as the basis for other calculations) to calculate the linear contribution of adjacent microphones to each location. Nevertheless, you would eventually have to find a way to calculate the magnitude for a $$p = [x, y, z]^{T}$$ point in 3D space in order to plot the magnitude on a $$P = [x, y, c]^{T}$$ or $$P = [c, y, z]^{T}$$ plane.