Article View: comp.dsp
Article #25Re: Stereo separation of a mono signal
From: Gints Klimanis
Date: Thu, 29 Oct 1992 08:06
Date: Thu, 29 Oct 1992 08:06
49 lines
2665 bytes
2665 bytes
In article <3936@randvax.rand.org>, edhall@rand.org (Ed Hall) writes: |> Are you talking about two-way or N-way teleconferencing? If it's |> something like an audio "Internet chat" program (that is, N-way), with |> one talker per station, then you simply place each data stream at a |> different place in the stereo field at the receiving end with something |> like: |> |> L = S*P |> R = S*(1-P) |> |> Where "P" is some arbitrary position between 0 and 1, "S" is the |> data stream for a particular talker, and "L" and "R" are the left |> and right channels, respectively. Thus, the talker assigned 0.5 |> would be right in the middle, while 0, 0.25, 0.75, and 1.0 would |> be hard right, mid right, mid left, and hard left, respectively. You may be interested in proper constant power panning: /* pan pot position is in linear range -1 .. 1 -1 is hard left, 0 is center and 1 is hard right */ /* convert pan position to angle in range 0 .. pi/2 radians, where 0 radians is hard left, pi/4 is center and pi/2 is hard right */ /* shift range: [-1..1] + 1 = [0..2] */ dvalue += 1 /* range [0..2] * pi/4 = [0..pi/2] */ dvalue *= pi/4 /* left pan value is cosine(dvalue), right pan value is sine(dvalue). Power of both channels is: sin^2 + cos^2 = 1 Thus, constant power */ channelScale[LEFT] = cos(dvalue); channelScale[RIGHT] = sin(dvalue); |> : That leads to another question of mine. Is there code for band reject |> : and band pass filters out there? I realize that filters should be |> : specially tailored to the application. However, since I don't know |> : much DSP, I'd love to just try filters with certain specified |> : tolerances. I've read the FAQ without much luck. |> |> Look in "Musical Application of Microprocessors," 2nd Ed. (by Hal |> Chamberlin, Hayden Books, 1985, ISBN 0-8104-5768-7) for some practical, |> non-mathematical material on the subject (and on stereo, too). Some of The book is an excellent starter. However, I remember the filter coefficient equations contained a chock full o' errors.
Technical Details
Message-ID:
<1992Oct29.080645.2580@odin.corp.sgi.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!agate!ames!olivea!sgigate!odin!prophet.esd.sgi.com!gintsReferences:
<dfrankow.720325401@myria> <3936@randvax.rand.org>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!spool.mu.edu!agate!ames!olivea!sgigate!odin!prophet.esd.sgi.com!gints From: gints@prophet.esd.sgi.com (Gints Klimanis) Newsgroups: comp.dsp Subject: Re: Stereo separation of a mono signal Message-ID: <1992Oct29.080645.2580@odin.corp.sgi.com> Date: 29 Oct 92 08:06:45 GMT References: <dfrankow.720325401@myria> <3936@randvax.rand.org> Sender: news@odin.corp.sgi.com (Net News) Organization: Silicon Graphics, Inc. Lines: 49 Nntp-Posting-Host: prophet.esd.sgi.com