1
$\begingroup$

I am working on a virtual microphone project which tries to emulate the output of an audio signal that would be obtained using another microphone. Let me know if this sounds reasonable as a solution or not.

Let's suppose, we have two microphones: Mic1 and Mic2. A sound source s is played through a loudspeaker using Mic1. Let h1 and h2 be the impulse response of Mic1 and Mic2 obtained using the same loudspeaker respectively. Now, if we record using Mic1, we obtain:

s1(t) = h1(t) * s(t) % (*) operator is convolution. 

If we want to achieve s2 (the sound produced by Mic2), we can do the following:

% Take fft of h1(t) & h2(t)
H1f = fft(h1); H2f = fft(h2);

% Obtain S(f) using division in fft
S1f = fft(s1);
Sf = S1f/H1f;

% Obtain s2(t) using multiplication in freq domain & ifft 
S2f = Sf .* H2f;
s2 = ifft(S2f);

Does this sound feasible as a solution to the problem? A more practical implementation (suggestion) would be appreciated.

$\endgroup$
1
  • $\begingroup$ In addition to the responses provided so far, please note, to emulate "another" microphone, you have to record the sound that other microphone "hears" with a much more superior microphone than the one you are trying to model. $\endgroup$
    – A_A
    Commented Mar 2, 2017 at 18:28

2 Answers 2

2
$\begingroup$

Will this work? Well, it will do something, but it will not magically make one microphone sound like another. A microphone is much more than a signal receiver with an impulse response. The character of a microphone is determined by its directional characteristic and how it couples to diffuse and direct field components, the kind of coupling to the pressure field, the nonlinearity of the membrane and integrated preamplifier, the noise of the membrane and the electronic components.

You will only be able to capture a small part of all that with an impulse response, and very likely exactly not the part of a microphone that is responsible for the praise of its sound.

But even if you ignore all that, you're still left with the problem of deconvolution that is not trivial, especially in the presence of noise of a potentially unknown character. Your spectral division approach is rather naive and will work to a certain degree. If you want to get good results, you will have to take a harder route and you will probably not even in that aspect get what you imagine. Also, you will always have to start with a very good microphone. A bad microphone does not allow for such a simple improvement usually.

In short, even if I sound overly pessimistic: No, this will not work how you probably expect it to. If you want to do this to start a research project then you're good. But it's not going to be a plug and play product for microphone aficionados.

$\endgroup$
1
$\begingroup$

I thought this would be feasible based on similar work I had done shown in the post I liked below, but as Jazzmaniac has pointed out in the comments my solution would only apply from a single point source in the spatial environment. That said, for the case of emulating the response from one source, you can capture all the effects including those of the microphone itself as part of your channel response. Your ability to do this will depend on your ability to accurately characterize the channel for your virtual microphone.

Please see this post where I did something very similar to this:

Compensating Loudspeaker frequency response in an audio signal

At the bottom of that post in the link above in my response I show an example of the equalizer function I used on a sound file to equalize the waveforms received by the left and right channels as received by two microphones. The two channels are not recognizable prior to equalization, and completely aligned in amplitude, phase and characteristic after! This is based on applying the channel impulse response that I determined from the measurements.

In the details of that approach I show how I determined the channel response. Using the channel response, and in the same fashion you could easily and accurately determine what the other microphone would have received.

To do this most accurately with your application, you would want to have a test microphone in both locations to be able to capture the received waveform and determine the channel impulse response using the method I provided in the link. As long as the room conditions do not change (this is important), and the experiment is done with one dominant sound source as Jazzmaniac points out, you can then remove one of the test microphones, and determine with the other microphone what the Virtual microphone that was in the test location would have received for a sound coming from the same spatial location as what was transmitted when the channel was characterized.

What would be interesting (of which I haven't done so the following is just suggestion), is to have two microphones or even an array of microphones, each separated by a half wavelength of the lowest frequency you would want to process such that directionality can be determined. With this approach there should be sufficient degrees of freedom so that you could equalize the whole room (but I imagine you would need to have a known channel sounder that can be moved to each uncorrelated spatial location, in this case a separation of 1/2 wavelength of the highest frequency you would want to process, and your equipment cannot interfere with the channel response itself.... how could this be done??). Thus with an array the concept should be at least feasible; I have not worked through what the size of the array would be however.

$\endgroup$
2
  • $\begingroup$ Your conclusion would be correct if microphones were omnidirectional point shaped sensors. You cannot equalise the spatial response of the microphone because that information does not make it to the channel in a way that is separable from the general frequency response. That means if you equalise your channel for one source, another source with different directional radiation characteristic will not be equalised. $\endgroup$
    – Jazzmaniac
    Commented Mar 2, 2017 at 18:33
  • $\begingroup$ Excellent point @Jazzmaniac--- I will reword my response- thank you $\endgroup$ Commented Mar 2, 2017 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.