Add, subtract, multiply, divide, logic operations ...

Eli Brandt eli at gs160.sp.cs.cmu.edu
Fri Dec 13 00:47:13 CET 1996


Mark Pulver wrote:
> If I had two sines, both at 400hz, and *mixed* them, then I would hear a
> single pitched tone, possibly SLIGHTLY louder.

Three dB louder, if I'm not screwing up peak-to-peak versus RMS,
corresponding to twice the peak-to-peak voltage.  (Well, I'm not sure
this is necessarily true on a real mixer, even at "unity gain" --
are they strictly accurate about levels?)

> But... If I ADD them together I will *THEN* get a single pitched tone, but
> it will have twice the voltage at the peaks and the SLOPE of the viewed
> waveform will be twice as steep. It will be much more triangle than sine.

If you add sin(x) and sin(x), you get 2*sin(x).  It has twice the
amplitude, and twice the slope at any point, but it's still a sine --
no higher harmonic content, as a triangle would have.  After all,
adding something to itself is the same thing as doubling it.

> Lemme do the numbers again (and I'll do 'em right this time <g>):
> 
> 	sine #1   -3 -2 -1 0 +1 +2 +3 +2 +1 0 -1 -2 -3 -2
> 	sine #2   -3 -2 -1 0 +1 +2 +3 +2 +1 0 -1 -2 -3 -2
> 	sum	   -6 -4 -2 0 +2 +4 +6 +4 +2 0 -2 -4 -6 -4

Both of these are triangle waves to begin with. :-)  But we can see
that adding triangles gives you triangles.

> Think about *really* dividing waveforms... wow.

You'd clip or melt down or something whenever the second waveform
crossed zero, if you want to be rigorous...  Think of it as ring
modulating A with inverted B.  To invert, waveshape with 1/x on [-1,1].  
Unfortunately, this has an infinite discontinuity at zero.  After you
approximate this away, I imagine inversion would sound vaguely like
zero-comparison, but with much ruder harmonic content.

-- 
   Eli Brandt
   eli+ at cs.cmu.edu



More information about the Synth-diy mailing list