Path: utzoo!attcan!utgpu!watmath!iuvax!purdue!gatech!gitpyr!byron
From: byron@pyr.gatech.EDU (Byron A Jeff)
Newsgroups: comp.dsp
Subject: Re: More digital mixer stuff
Message-ID: <9247@pyr.gatech.EDU>
Date: 30 Sep 89 16:28:44 GMT
References: <9238@pyr.gatech.EDU> <7905@microsoft.UUCP>
Reply-To: byron@pyr.UUCP (Byron A Jeff)
Organization: Georgia Institute of Technology
Lines: 119

In article <7905@microsoft.UUCP> brianw@microsoft.UUCP (Brian Willoughby) writes:
-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.

I think I'd just attach a 4 bit counter that is clocked and cleared along
with the shift registers. Then when the counters overflows I generate
an interrupt. When I read in the parallel value in the shift register
I clear the counter. Not completely thought out but that's the 
general idea.

-
->>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.

The only question is what's the sample rate of the mixed signal? It
would seem to be 8x the original sample rate yes? So for 8 48Khz channels
I'd need a 384 Khz DAC. Ouch! 

-
->>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?

I have a CD player with a single DAC. My ears are not sharp enough
to hear such distortion and I'm a musician.

-
-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.

This is the same explanation I got in Hal Chainberlin (sp) "Musical
Applications for Microprocessors". I understand I'll need S/H and filters
before the ADC and after the DAC. I was figuring on only one or two
pairs of stereo outputs from the mixer so I don't think that many S/H
are necessary on output.

Someone suggested that the S/H is built into the ADC so that I can
hook up the output from the CMOS multiplexor directly into the ADC.
So only 2 S/H (or one if I decide to go with a single DAC) will be
necessary (I hope).

-Brian Willoughby
-UUCP:           ...!{tikal, sun, uunet, elwood}!microsoft!brianw
-InterNet:       microsoft!brianw@uunet.UU.NET
-  or:           microsoft!brianw@Sun.COM
-Bitnet          brianw@microsoft.UUCP
-- 
Another random extraction from the mental bit stream of...
Byron A. Jeff
Georgia Tech, Atlanta GA 30332
Internet:	byron@pyr.gatech.edu  uucp:	...!gatech!pyr!byron