Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!microsoft!brianw
From: brianw@microsoft.UUCP (Brian Willoughby)
Newsgroups: comp.dsp
Subject: Re: More digital mixer stuff
Summary: Random digital audio circuit tips
Message-ID: <7905@microsoft.UUCP>
Date: 30 Sep 89 00:38:21 GMT
References: <9238@pyr.gatech.EDU>
Reply-To: brianw@microsoft.UUCP (Brian Willoughby)
Organization: Microsoft Corp., Redmond WA
Lines: 89

In article <9238@pyr.gatech.EDU> byron@pyr.gatech.edu.gatech.edu (Byron A Jeff) writes:
>>Serial
>>	44.1 kHz * 4 channels * 16 bits/channel = 2.822 MHz
>>
>>I think the 56000 can handle this.  Only half of what you need, though.
>>You might be able to do it with the TM$32030, as it has two serial inputs.
>
>Even if it were serial I'd probably just shift it into shift registers
>and read in the parallel outputs when all of the bits of a complete
>sample has been shifted in.

Sure, why overwork the DSP?  Question: how would you know which 16 bits
make up a sample word?  I.e. are there some kind of start bits which
could be used to signal an interrupt.  A good setup would involve
clearing all the shift register bits to one state, and then shifting in
until the start bit appears in the MSBit.  Whatever polarity the start
bit is, just clear the shift register to the opposite value and interrupt
the DSP when a full word is ready.

>>Your biggest problem is that the samples are not arriving at the same
>>time.  Actually, I guess you could use an interrupt routine to store all
>>the samples, then have the DSP act on them when all have arrived.
>
>That's exactly what I was thinking. Something along these lines:
>
>Sample 1
>         Sample 2
>                  Sample 3
>                           Sample 4
>                                    Output of mix of the 4 above samples.
>
>--------Time Axis--------->

Check out my posting on digital mixing using time-multiplexing.  Based
on Jeff Taylors zero-filling 'proofs' you should be able to send samples
1-4 through a digital filter and then directly into the 56000.  It's as
if each sample train were zero filled (3 zeroes) and then added to the
other channels.  You wouldn't have to use up any 56000 processing power
to do the mixing.  The digital filter between the time-multiplexed
samples and the 56000 may not even be necessary, but you would need to
filter the outputs at some point.

>>Remember that since you are using an analog MUX, the samples can't all
>>be done at EXACTLY the same time, so there will be a slight delay between
>>all of the channels.
>
>I'm brand new in this domain. I have no clue what the effect of the
>delay between channels will be. Can you give me an idea?

Good question.  CD manufacturers claim that using a single DAC for the
two signals in a stereo recording introduces phase distortion when the
audio waves recombine in the listening environment and cancellations
occur which wouldn't have in the original source (I least that's what I
gleaned from the mumbo-jumbo).  If the delay is <= half the sampling
period, then how can the cancelations be audible?  Perhaps the
cancellations could affect lower frequencies which are audible?

In any event, those manufacturers are merely trying to sell you two DACs
instead of one, when a single converter and a few sample and hold stages
would realign the reconstructed signals.  One S/H could be used to
temporarily hold and delay whichever channel is output first, and then a
pair of S/H amps could be simultaneously clocked for phase aligned sterio
output.  I think this would be a reasonable circuit if expanded to 8
channels (although you would need 15 S/H amps).  That's assuming that the
phase shifting is audible and you need to correct it.

S/H is necessary on the analog output of any high quality DAC to avoid
impulses caused by less-than-ideal settling times of the DAC output.
Consider that it is impossible for all 16 bits to change at the same
times in any non-ideal converter, especially considering that most
transistors cut off at a different speed that they cut on.  Example:
assume that it takes longer to turn on a transistor so that 0 to 1 bit
transitions take longer than 1 to 0 transistions.  Then, for a digital
sample changing from $8000 to $7FFF, you would first get $0000 on the
DAC output before all the other 15 bits changed to $7FFF.  Ugly and BIG
spike!  Analog sample and hold allows the outputs to be disconnented
from the DAC during that spike, which holding the voltage from the
previous conversion in a capacitor.  Then, when the DAC output has
settled (most DAC specs quote settling times in nsecs), the new voltage
is 'sampled' by charging the cap.

>Byron A. Jeff
>Georgia Tech, Atlanta GA 30332

Brian Willoughby
UUCP:           ...!{tikal, sun, uunet, elwood}!microsoft!brianw
InterNet:       microsoft!brianw@uunet.UU.NET
  or:           microsoft!brianw@Sun.COM
Bitnet          brianw@microsoft.UUCP