DSPRelated.com
Forums

Digital Mixer.

Started by Ulrich Prakash August 19, 2002
Hi all,

I am interested in implementing a Digital Mixer(mixing 2 voice signals).
But I had HARD luck in finding the relevant material so far....I could only 
find filters in abundance.

Can anyone suggest me ANY book/link which would have the implementation of 
the Mixer?

Currently I have the following books:
i)DSP by Oppenheim & Schafer.
ii)Theory and Application of Digital Signal Processing  - Rabiner and Gold
iii) DSP - Salivahanan,Vallavaraj,Gnanapriya

But there is nothing about Mixers in these books....

Also what are the basics in DSP that I can learn from these books before 
going into the Mixer implementation/algorithm?

I need your suggestions.....Please reply.......
Thanks in advance,
Prakash.
	
Ulrich Prakash-

> I am interested in implementing a Digital
Mixer(mixing 2 voice signals).
> But I had HARD luck in finding the relevant material so far....I could only
> find filters in abundance.
> 
> Can anyone suggest me ANY book/link which would have the implementation of
> the Mixer?
> 
> Currently I have the following books:
> i)DSP by Oppenheim & Schafer.
> ii)Theory and Application of Digital Signal Processing  - Rabiner and Gold
> iii) DSP - Salivahanan,Vallavaraj,Gnanapriya
> 
> But there is nothing about Mixers in these books....
> 
> Also what are the basics in DSP that I can learn from these books before
> going into the Mixer implementation/algorithm?

Mix == add.  Add your signals together, like this:

  y[n] = a*x1[n] + b*x2[n]

Suggest that you maintain a + b = 1.  Then put a dial on your MATLAB GUI that
allows
the user to adjust between a and b.  All the way to left, a = 1.  All the way to
right, b = 1.

Jeff Brower
DSP sw/hw engineer
Signalogic

Hi Jeff,

Thanks for the reply.
I have some queries,pls see inline.....

At 07:34 AM 8/19/02 -0500, Jeff Brower wrote:
>Ulrich Prakash-
>
> > I am interested in implementing a Digital Mixer(mixing 2 voice
signals).
> > But I had HARD luck in finding the relevant material so far....I could
only
> > find filters in abundance.
> >
> > Can anyone suggest me ANY book/link which would have the
implementation of
> > the Mixer?
> >
> > Currently I have the following books:
> > i)DSP by Oppenheim & Schafer.
> > ii)Theory and Application of Digital Signal Processing  - Rabiner and
Gold
> > iii) DSP - Salivahanan,Vallavaraj,Gnanapriya
> >
> > But there is nothing about Mixers in these books....
> >
> > Also what are the basics in DSP that I can learn from these books
before
> > going into the Mixer implementation/algorithm?
>
>Mix == add.  Add your signals together, like this:
>
>   y[n] = a*x1[n] + b*x2[n]
>
>Suggest that you maintain a + b = 1.

[Prakash]
Can I take a = 0.5 and b = 0.5,or is there any particular factor to 
evaluate the value of a and b?

>   Then put a dial on your MATLAB GUI that allows
>the user to adjust between a and b.  All the way to left, a = 1.  All the 
>way to
>right, b = 1.

[Prakash]
 From what you have said,I assume,if
x1 = {4,2,6} and x2 = {8,10,12},and a=0.5,b=0.5then
y = {2+4, 1+5, 3+6} = {6, 6, 9}
Is that so straight-forward?Will I hear both samples x1 and x2 from y output?

But I didn't understand what you mean to the LEFT and RIGHT here.

Thanks in advance,
Prakash.

>Jeff Brower
>DSP sw/hw engineer
>Signalogic
>
>
>_____________________________________
>Note: If you do a simple "reply" with your email client, only the
author 
>of this message will receive your answer.  You need to do a "reply
all" if 
>you want your answer to be distributed to the entire group.
>
>_____________________________________
>About this discussion group:
>
>To Join:  audiodsp-subscribe@audi...
>
>To Post:  audiodsp@audi...
>
>To Leave: audiodsp-unsubscribe@audi...
>
>Archives: http://groups.yahoo.com/group/audiodsp
>
>Other DSP-Related Groups: http://www.dsprelated.com
>
>
>">http://docs.yahoo.com/info/terms/
	
Ulrich Prakash-

> >Mix == add.  Add your signals together, like
this:
> >
> >   y[n] = a*x1[n] + b*x2[n]
> >
> >Suggest that you maintain a + b = 1.
> 
> [Prakash]
> Can I take a = 0.5 and b = 0.5,or is there any particular factor to
> evaluate the value of a and b?
> 
> >   Then put a dial on your MATLAB GUI that allows
> >the user to adjust between a and b.  All the way to left, a = 1.  All
the
> >way to
> >right, b = 1.
> 
> [Prakash]
>  From what you have said,I assume,if
> x1 = {4,2,6} and x2 = {8,10,12},and a=0.5,b=0.5then
> y = {2+4, 1+5, 3+6} = {6, 6, 9}
> Is that so straight-forward?

Yep.

>Will I hear both samples x1 and x2 from y output?

Yep.

> But I didn't understand what you mean to the
LEFT and RIGHT here.

When the user turns the dial.  You can put a dial (knob) on your GUI to easily
demonstrate the effect; better than asking your users to enter values of a and
b.

Jeff Brower
DSP sw/hw engineer
Signalogic

Have a look at:

1) Watkinson, J., The art of digital audio, 2nd ed., Focal Press
(Butterworth), 1993.

2) Zzer, U., Digital audio signal processing, John Wiley & Sons, Ltd.,
1995.

Regards
Sigmund.

-----Original Message-----
From: Ulrich Prakash
To: Audiodsp@Audi...
Sent: 8/19/2002 11:01 AM
Subject: [audiodsp] Digital Mixer.

Hi all,

I am interested in implementing a Digital Mixer(mixing 2 voice signals).
But I had HARD luck in finding the relevant material so far....I could
only 
find filters in abundance.

Can anyone suggest me ANY book/link which would have the implementation
of 
the Mixer?

Currently I have the following books:
i)DSP by Oppenheim & Schafer.
ii)Theory and Application of Digital Signal Processing  - Rabiner and
Gold
iii) DSP - Salivahanan,Vallavaraj,Gnanapriya

But there is nothing about Mixers in these books....

Also what are the basics in DSP that I can learn from these books before

going into the Mixer implementation/algorithm?

I need your suggestions.....Please reply.......
Thanks in advance,
Prakash.
	_____________________________________
Note: If you do a simple "reply" with your email client, only the
author
of this message will receive your answer.  You need to do a "reply
all"
if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:  audiodsp-subscribe@audi...

To Post:  audiodsp@audi...

To Leave: audiodsp-unsubscribe@audi...

Archives: http://groups.yahoo.com/group/audiodsp

Other DSP-Related Groups: http://www.dsprelated.com
	">http://docs.yahoo.com/info/terms/
	
On Mon, Aug 19, 2002 at 08:20:16AM -0500, Jeff Brower wrote:
> Ulrich Prakash-
> 
> > >Mix == add.  Add your signals together, like this:
> > >
> > >   y[n] = a*x1[n] + b*x2[n]
> > >
> > >Suggest that you maintain a + b = 1.
> > 
> > [Prakash]
> > Can I take a = 0.5 and b = 0.5,or is there any particular factor to
> > evaluate the value of a and b?
> > 
> > >   Then put a dial on your MATLAB GUI that allows
> > >the user to adjust between a and b.  All the way to left, a = 1. 
All the
> > >way to
> > >right, b = 1.
> > 
> > [Prakash]
> >  From what you have said,I assume,if
> > x1 = {4,2,6} and x2 = {8,10,12},and a=0.5,b=0.5then
> > y = {2+4, 1+5, 3+6} = {6, 6, 9}
> > Is that so straight-forward?
> 
> Yep.
> 
> >Will I hear both samples x1 and x2 from y output?
> 
> Yep.
> 
> > But I didn't understand what you mean to the LEFT and RIGHT here.
> 
> When the user turns the dial.  You can put a dial (knob) on your GUI to
easily
> demonstrate the effect; better than asking your users to enter values of a
and b.
> 

Jeff,

Ulrich didn't say he was using Matlab.

Ulrich,

Don't read so many books. Experiment more. Look at the waveforms and listen
to them. 

You would do well to learn a little analog signal processing as well.

Regards,
Mark
	
Mark-

> > > >Mix == add.  Add your signals
together, like this:
> > > >
> > > >   y[n] = a*x1[n] + b*x2[n]
>
> Ulrich didn't say he was using Matlab.

I did not assume he was.  Above is standard textbook notation, used widely.

Jeff Brower
DSP sw/hw engineer
Signalogic

Hi Jeff,

In that case,if I need to mix 'm' voice channels(in the form of RTP 
packets),then
y(n) = a1*x1 + a2*x2 + ... am*xm

        = SIGMA ai*xi,where i = 1 to m   (SIGMA - i don't have SIGMA symbol

in my mail editor)

And SIGMA ai = 1,where i = 1 to m.
In that case,if there are 10 input voice channels,then the amplitude of 
original sample x1 in output y will be around x1/10.Will this not affect 
the fidelity of x1?

Regards,
Prakash.

At 08:20 AM 8/19/02 -0500, Jeff Brower wrote:
>Ulrich Prakash-
>
> > >Mix == add.  Add your signals together, like this:
> > >
> > >   y[n] = a*x1[n] + b*x2[n]
> > >
> > >Suggest that you maintain a + b = 1.
> >
> > [Prakash]
> > Can I take a = 0.5 and b = 0.5,or is there any particular factor to
> > evaluate the value of a and b?
> >
> > >   Then put a dial on your MATLAB GUI that allows
> > >the user to adjust between a and b.  All the way to left, a = 1. 
All the
> > >way to
> > >right, b = 1.
> >
> > [Prakash]
> >  From what you have said,I assume,if
> > x1 = {4,2,6} and x2 = {8,10,12},and a=0.5,b=0.5then
> > y = {2+4, 1+5, 3+6} = {6, 6, 9}
> > Is that so straight-forward?
>
>Yep.
>
> >Will I hear both samples x1 and x2 from y output?
>
>Yep.
>
> > But I didn't understand what you mean to the LEFT and RIGHT here.
>
>When the user turns the dial.  You can put a dial (knob) on your GUI to
easily
>demonstrate the effect; better than asking your users to enter values of a 
>and b.
>
>Jeff Brower
>DSP sw/hw engineer
>Signalogic
	
Ulrich-

> In that case,if I need to mix 'm' voice
channels(in the form of RTP
> packets),then
> y(n) = a1*x1 + a2*x2 + ... am*xm
> 
>         = SIGMA ai*xi,where i = 1 to m   (SIGMA - i don't have SIGMA
symbol
> in my mail editor)
> 
> And SIGMA ai = 1,where i = 1 to m.
> In that case,if there are 10 input voice channels,then the amplitude of
> original sample x1 in output y will be around x1/10.Will this not affect
> the fidelity of x1?

Ahh, now you not mixing, but conferencing -- you should have said so earlier. 
You
need some type of algorithm that dynamically looks for "most energetic
voice" and
give that channel more weight.  I've seen some conferencing algorithms that
will look
for most 2 or 3 dominant channels and give them weight.

Clearly if you just constantly multiply every channel by 0.1 you will not hear
the
speaker -- he/she will be averaged with noise/silence.  Not everyone talks at
once,
right?  Or at least you hope that your algorithm does not cause them to do that
:-)

-Jeff
	> At 08:20 AM 8/19/02 -0500, Jeff Brower wrote:
> >Ulrich Prakash-
> >
> > > >Mix == add.  Add your signals together, like this:
> > > >
> > > >   y[n] = a*x1[n] + b*x2[n]
> > > >
> > > >Suggest that you maintain a + b = 1.
> > >
> > > [Prakash]
> > > Can I take a = 0.5 and b = 0.5,or is there any particular factor
to
> > > evaluate the value of a and b?
> > >
> > > >   Then put a dial on your MATLAB GUI that allows
> > > >the user to adjust between a and b.  All the way to left, a =
1.  All the
> > > >way to
> > > >right, b = 1.
> > >
> > > [Prakash]
> > >  From what you have said,I assume,if
> > > x1 = {4,2,6} and x2 = {8,10,12},and a=0.5,b=0.5then
> > > y = {2+4, 1+5, 3+6} = {6, 6, 9}
> > > Is that so straight-forward?
> >
> >Yep.
> >
> > >Will I hear both samples x1 and x2 from y output?
> >
> >Yep.
> >
> > > But I didn't understand what you mean to the LEFT and RIGHT
here.
> >
> >When the user turns the dial.  You can put a dial (knob) on your GUI to
easily
> >demonstrate the effect; better than asking your users to enter values
of a
> >and b.
> >
> >Jeff Brower
> >DSP sw/hw engineer
> >Signalogic

Last year I went to SPIE's AeroSense conference and learned about
Independent Component Analysis and an application called the 'Cocktail
Party.'  Basically, it's a method to assume that n multiple signals
are
recorded by n microphones.  ICA is the method that allows the signals to be
separated into n discrete signals.  Perhaps a look down this path may be
what you need...

Regards,/s/neil 

Neil E. Van de Voorde, Ph.D.
Senior Scientist
Planning Systems Inc.
228.689.8775
	-----Original Message-----
From: Jeff Brower [mailto:jbrower@jbro...] 
Sent: Tuesday, August 20, 2002 7:21 AM
To: Ulrich Prakash
Cc: audiodsp@audi...
Subject: Re: [audiodsp] Digital Mixer.

Ulrich-

> In that case,if I need to mix 'm' voice
channels(in the form of RTP
> packets),then
> y(n) = a1*x1 + a2*x2 + ... am*xm
> 
>         = SIGMA ai*xi,where i = 1 to m   (SIGMA - i don't have SIGMA
symbol
> in my mail editor)
> 
> And SIGMA ai = 1,where i = 1 to m.
> In that case,if there are 10 input voice channels,then the amplitude of
> original sample x1 in output y will be around x1/10.Will this not affect
> the fidelity of x1?

Ahh, now you not mixing, but conferencing -- you should have said so
earlier.  You
need some type of algorithm that dynamically looks for "most energetic
voice" and
give that channel more weight.  I've seen some conferencing algorithms that
will look
for most 2 or 3 dominant channels and give them weight.

Clearly if you just constantly multiply every channel by 0.1 you will not
hear the
speaker -- he/she will be averaged with noise/silence.  Not everyone talks
at once,
right?  Or at least you hope that your algorithm does not cause them to do
that :-)

-Jeff
	> At 08:20 AM 8/19/02 -0500, Jeff Brower wrote:
> >Ulrich Prakash-
> >
> > > >Mix == add.  Add your signals together, like this:
> > > >
> > > >   y[n] = a*x1[n] + b*x2[n]
> > > >
> > > >Suggest that you maintain a + b = 1.
> > >
> > > [Prakash]
> > > Can I take a = 0.5 and b = 0.5,or is there any particular factor
to
> > > evaluate the value of a and b?
> > >
> > > >   Then put a dial on your MATLAB GUI that allows
> > > >the user to adjust between a and b.  All the way to left, a =
1.  All
the
> > > >way to
> > > >right, b = 1.
> > >
> > > [Prakash]
> > >  From what you have said,I assume,if
> > > x1 = {4,2,6} and x2 = {8,10,12},and a=0.5,b=0.5then
> > > y = {2+4, 1+5, 3+6} = {6, 6, 9}
> > > Is that so straight-forward?
> >
> >Yep.
> >
> > >Will I hear both samples x1 and x2 from y output?
> >
> >Yep.
> >
> > > But I didn't understand what you mean to the LEFT and RIGHT
here.
> >
> >When the user turns the dial.  You can put a dial (knob) on your GUI to
easily
> >demonstrate the effect; better than asking
your users to enter values of
a
> >and b.
> >
> >Jeff Brower
> >DSP sw/hw engineer
> >Signalogic
	_____________________________________
Note: If you do a simple "reply" with your email client, only the
author of
this message will receive your answer.  You need to do a "reply all"
if you
want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:  audiodsp-subscribe@audi...

To Post:  audiodsp@audi...

To Leave: audiodsp-unsubscribe@audi...

Archives: http://groups.yahoo.com/group/audiodsp

Other DSP-Related Groups: http://www.dsprelated.com
	">http://docs.yahoo.com/info/terms/