I have recorded Signal_A, and downloaded signal_B from the internet (therefore two different microphones/settings are used for recording)
You might be able to achieve a "seamless" mix (or transition) but the fact that you have two different microphones and settings might add artifacts in the final product. You can tell how this sounds like if you have ever noticed the differences between microphones. Accounting for such differences might be a bit more challenging.
The sound pressure level of both signals are known( I measured the sound pressure level of Signal_A in 1m distance, and also know the sound pressure level of Signal_B in the same distance).
It is good that you have measured the SPL but most commonly you are unlikely to know the exact relationship that takes you from SPL to converted values.
As far as I know, the value recorded/represented in each waveform of any signal is relative to that corresponding signal, and since two signals are recorded using different settings we can expect that one might be more amplified than the other. Therefore a simple mixing of the two won’t give us a realistic result.
I am not entirely clear on what you mean by "a simple mixing" but the first approach would be to simply adjust the amplitudes of the two recordings and then "add" them together as per your MergedSignal
equation.
Now the question is: is there a way to manipulate recorded signal_A and signal_B programatically, assuming the fact that the SPL values of the original signals at 1m distance is known, and get the merged signal as they were playing simultaneously and recorded at 1m distance?
Yes. BUT!, you have to make sure that the rest of the signal pathway was the same as well. Now:
Sound waves hit the transducer. The transducer converts them to voltage with a (hopefully) linear relationship of Volts per Pascal of pressure. In addition, this relationship is frequency dependent. But let's say that it is constant across the spectrum and call it $\alpha$.
Behind the transducer there is an amplifier whose job is to take the electrical signal and bring it up to some level. Again, this is achieved with a (hopefully) linear relationship. Let's keep things simple and assume that the job of this amplifier is to take the signal of the transducer and adapt it to a standard line level of approximately 2 Volts (peak-to-peak). Let's call this $\beta$.
The final stage is the Analog to Digital Converter (ADC). It converts the 2volts peak to peak to some range with a given word length (for example 0..255, -127..128 and so on).
So, assuming that $\alpha$ (mic), $\beta$ (amp/signal conditioning) are the same, you can indeed scale the recordings by the ratio of the SPLs. That is:
$$MergedSignal = (1.0 - \frac{SPL_A}{SPL_B}) \times Signal_A + \frac{SPL_A}{SPL_B} \times Signal_B$$
In the more general case and when you don't know the SPL, you can simply "match" the average level of the converted values. So, same relationship, instead of $SPL_A, SPL_B$ you have the averages of the signals.
Hope this helps.
Merged_Signal = a*Signal_A + b*Signal_B
? $\endgroup$Signal_A
to the mix point, and you know the sound pressure of the source at 1 m, thennew_amplitude = old_amplitude * old_distance / new_distance
$\endgroup$