0
$\begingroup$

I have 2 signals that were independently recorded, and want to produce a new signal that would represent what would be recorded if both signal sources were emitting at the same time together. Specifically my case is that I have a recording of dolphins, and a recording of beluga whales and although both recordings were produced independently I would like a sound file with both biologics in the signal.

This post on a MATLAB forum link recommends to multiply the time ordered values together $x_1(t) \times x_2(t)$ to produce a new signal as a result of 'mixing'. This blog post link describes the addition of noise as an additive process between the signals. A question on this forum relevant question asks about the composition from multiple signals where the addition is prescribed. But these approaches do not account for phase and I would assume that this would be necessary. It also does not account for the fact that the time of the recording for the onset of each signal greatly affects the alignment of the signals where there is irregular activity. There is quite a large amount of variation in the acoustic activity where the start time changes whether these animal sounds overlap or not.

The approach I currently use, is to take the FFT of each $x_i(t)$ separately and then generate signals using iFFT from each FFT output. This produces separate signals that I then add together their values at every time point.

  1. Is there a better way to do this?

  2. In order to create a more realistic environment would I have to segment the different states of the signals (biologic activity and non-active states) in order to simulate the randomness in their activity. Would that be an approach seen elsewhere? In general a more simulation like approach to account for the stochastic changes in the state of the system where phase then is taken into account?

$\endgroup$
1
$\begingroup$

In EE, waveform mixing is used for wave modulation. It is implemented via mixer circuits whose operation principle can be loosely described as multiplication of currents. It does not apply to your scenario of SPL data acquisition and processing: you have no waves that modulate one another.

Your sound sources being independent and also removed at distances larger than a sound wavelength from each other (1.5 m at 1kHz in water), you can safely ignore phase effects and, specifically, acoustic interference. You can model the composite signal SPL as a linear combination of SPL's of your prerecorded signals.

$\endgroup$
5
  • $\begingroup$ so I can add the time domain waveforms directly? I guess the onset for different starting times of the signals will be handled programmatically? $\endgroup$ – Vass Aug 5 '20 at 3:42
  • 1
    $\begingroup$ You adjust sample rates (if those are different) by resampling, calculate linear superposition coefficients for participating signals from physics and geometry of your scenario, and move on. Only take care to work with floating point values or otherwise beware of possible summation overflows for fixed point values. $\endgroup$ – V.V.T Aug 5 '20 at 4:00
  • $\begingroup$ just to make sure I understand; 1) 'linear superposition coefficients' this is just the 'a' and 'b' coefficients for the direct addition of the values at each time point? 2) working with floating point numbers, is that when the signal waveforms are between [0,1]? 3) what is the 'summation overflows for fixed point values'?, when the numbers go over the precision of the programming language? $\endgroup$ – Vass Aug 5 '20 at 14:37
  • 1
    $\begingroup$ 1) SPL_{composite_signal} = ax_1 + bx_2; 2) en.wikipedia.org/wiki/Floating-point_arithmetic , section 'Range of floating-point numbers', see also en.wikipedia.org/wiki/IEEE_754 ; 3) en.wikipedia.org/wiki/Fixed-point_arithmetic , section 'Precision loss and overflow' $\endgroup$ – V.V.T Aug 5 '20 at 15:22
  • 1
    $\begingroup$ If you have fixed-point data and decide to do processing with floating-point numbers, you simply convert fixed-point representation to floating-point representation (putting it bluntly, rather than, say, (short) SPL[0] = 10 you work with (float) SPL[0] = 10.0 ) $\endgroup$ – V.V.T Aug 5 '20 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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