# [music-dsp] signal splitting revisited

Jon Watte hplus at mindcontrol.org
Fri Nov 16 13:04:09 EST 2001

```OK,

The idea is to use a full-volume noise signal and the inherent
reversibility of modulo 2 arithmetic to mask the input signal.

If you just add noise of the same amplitude as the signal
(assuming the signal is full-volume as well) then you will be
able to pick out the signal in the noise.

However, if you treat the addition as modulo 2-to-the-16th
(assuming 16-bit PCM encoding here) then, because the noise is
already full-volume, you'll get a significant amount of wrapping
when you have a significant amount of signal, and the wrapping
that extra signal-dependent distortion to mask it completely.

As I don't speak Matlab (never found anything wrong with C :-)
let me try some pseudocode:

let in = array-of-your-input-signal-in-16-bit-pcm;
let len = length-of-"in"-counted-in-samples;
let out_a = array-of-"len"-random-numbers-in-[-32768,32767]; // noise signal
let out_b = empty-array-of-size-"len";

for off in [0,len) do:
let out = in[ off ] + out_a[ off ];
if out > 32767 then:
out -= 65536;
end
if out < -32768 then:
out += 65536;
end
-- NOTE: see below --
out_b[ off ] = out;
end

The trick here, I guess, is that the "effective" range of signal A,
because of the modulo arithmetic, is twice the range of signal IN, but
if this is for implementation on a computer, they can both stay
represented as 16-bit integers, with their summing operation being

If it's OK for A to be twice the range of IN, you can re-compute each
sample of A as a range of values in [-65536,65536) as the difference
between "out" and "in" for each sample (at the line marked "note" above).

Cheers,

/ h+

> I think Jon Watte might have been on to something, but could you please
> explain in pseudocode (or matlab-ish code) or in words; I'm not a
> programmer
> so I get confused by your syntax.

dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/

```