Reply by Randy Yates April 7, 20152015-04-07
robert bristow-johnson <rbj@audioimagination.com> writes:

> somehow missed this, Randy. > > On 4/3/15 12:31 AM, Randy Yates wrote: >> robert bristow-johnson<rbj@audioimagination.com> writes: >> >>> On 4/2/15 7:05 PM, Les Cargill wrote: >>>> ABM 200 wrote: >>>>> Suppose, i record audio at say, 10000 samples/sec for some amount of >>>>> time. >>>>> I store these samples in a file(WAV file). When i play back this >>>>> audio, at >>>>> a different rate, say 30000 samples/ sec. The audio will definitely be >>>>> fast. But, theoretically more samples/ sec implies higher frequency. So, >>>>> does this mean that the play back audio will be at 3 times the original >>>>> (recorded) audio frequency or more ? >>>>> >>>> >>>> The D/A converter would have to use a reconstruction filter with a >>>> different upper bandlimit for this to work. >>>> >>> >>> to work *well*. sometimes we be cheap SOBs and our reconstruction >>> filter is nothing other than what is inherent to the D/A. maybe there >>> is a simple RC LPF after the D/A, maybe more or maybe less. >>> >>> for a conventional D/A, there is the zero-order hold which *would* >>> naturally adjust to the higher sample rate. >>> >>> for a sigma-delta D/A, >> >> You mean delta sigma? >> > > oh, i guess you're right: > > https://groups.google.com/forum/#!original/comp.dsp/4vzhOURLS5U/n5SgTrd-dRoJ
Ha ha. But that Google groups date has got to be wrong. I haven't used ELO in my .sigs for a LONG time, probably well over 10 years.
> i would rather get in a fight about whether or not the DFT inherently > periodically extends the data passed to it.
Yeah, me too.
>>> i dunno if the internal arithmetic in the sigma-delta modulator gets >>> adjusted or not. >> >> No, it doesn't. > > never? like it doesn't matter how much your oversampling factor is > (like if it's 128x or 64x) in the design of your delta-sigma > modulator? > > perhaps not, but it doesn't seem to be particularly ostensible to me.
Oh yeah, of course that would change things. I thought you meant that once the oversampling factor and modulator were designed, if operating the whole thing at a different rate would require any changes numerically. I still say I don't think so.
>>> i never designed a sigma-delta D/A, but i imagine that before the >>> modulator there is an upsampler, say 64x (so it looks like a 3 MHz >>> sampled signal bandlimited to 24 kHz going into the sigma-delta >>> modulator with +1 and -1 coming out at 3 MHz). but i don't think >>> increasing the sample rate changes any numerical parameters in that >>> upsampler (if it stays at 64x). >> >> Nope. At least it wouldn't have in my design I did way back when. > > well, wait a minute... > > you have, say, 48 kHz PCM audio going in and coming out is a stream of > -1 and +1 clocking out at 3.072 MHz (that's 64x). now, what is going > into that summer junction (where the input is summed with the negative > feedback) of the delta-sigma modulator for 63 of those 64 > "micro-samples" happening every 325 nanoseconds? it is just a > constant value for all 64 micro-samples? if it were to emulate a > sigma-delta A/D, wouldn't it be a smoother input (at Fs=3.072 MHz but > with bandwidth below 24 kHz) analog-like signal?
It is an interpolated signal, including the lowpass filter. If you didn't do that, then one of the major advantages of a delta sigma DAC - a simplified reconstruction filter - is lost. So yes, different oversampling ratios would be different prior the modulator.
>> Of course you have to be careful to stay within operating parameters of >> the device's hardware. > > like i said, i never designed a delta-sigma D/A, but it would seem to > be to be natural to make the input to the delta-sigma modulator look > as much like continuous-time as possible.
Well, that is done by increasing the oversampling ratio, which of course gets you more bits for a given modulator structure, which is good. See Figure 9 here: http://www.digitalsignallabs.com/presentation.pdf. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Reply by robert bristow-johnson April 7, 20152015-04-07
somehow missed this, Randy.

On 4/3/15 12:31 AM, Randy Yates wrote:
> robert bristow-johnson<rbj@audioimagination.com> writes: > >> On 4/2/15 7:05 PM, Les Cargill wrote: >>> ABM 200 wrote: >>>> Suppose, i record audio at say, 10000 samples/sec for some amount of >>>> time. >>>> I store these samples in a file(WAV file). When i play back this >>>> audio, at >>>> a different rate, say 30000 samples/ sec. The audio will definitely be >>>> fast. But, theoretically more samples/ sec implies higher frequency. So, >>>> does this mean that the play back audio will be at 3 times the original >>>> (recorded) audio frequency or more ? >>>> >>> >>> The D/A converter would have to use a reconstruction filter with a >>> different upper bandlimit for this to work. >>> >> >> to work *well*. sometimes we be cheap SOBs and our reconstruction >> filter is nothing other than what is inherent to the D/A. maybe there >> is a simple RC LPF after the D/A, maybe more or maybe less. >> >> for a conventional D/A, there is the zero-order hold which *would* >> naturally adjust to the higher sample rate. >> >> for a sigma-delta D/A, > > You mean delta sigma? >
oh, i guess you're right: https://groups.google.com/forum/#!original/comp.dsp/4vzhOURLS5U/n5SgTrd-dRoJ i would rather get in a fight about whether or not the DFT inherently periodically extends the data passed to it.
>> i dunno if the internal arithmetic in the sigma-delta modulator gets >> adjusted or not. > > No, it doesn't.
never? like it doesn't matter how much your oversampling factor is (like if it's 128x or 64x) in the design of your delta-sigma modulator? perhaps not, but it doesn't seem to be particularly ostensible to me.
> >> i never designed a sigma-delta D/A, but i imagine that before the >> modulator there is an upsampler, say 64x (so it looks like a 3 MHz >> sampled signal bandlimited to 24 kHz going into the sigma-delta >> modulator with +1 and -1 coming out at 3 MHz). but i don't think >> increasing the sample rate changes any numerical parameters in that >> upsampler (if it stays at 64x). > > Nope. At least it wouldn't have in my design I did way back when.
well, wait a minute... you have, say, 48 kHz PCM audio going in and coming out is a stream of -1 and +1 clocking out at 3.072 MHz (that's 64x). now, what is going into that summer junction (where the input is summed with the negative feedback) of the delta-sigma modulator for 63 of those 64 "micro-samples" happening every 325 nanoseconds? it is just a constant value for all 64 micro-samples? if it were to emulate a sigma-delta A/D, wouldn't it be a smoother input (at Fs=3.072 MHz but with bandwidth below 24 kHz) analog-like signal?
> Of course you have to be careful to stay within operating parameters of > the device's hardware.
like i said, i never designed a delta-sigma D/A, but it would seem to be to be natural to make the input to the delta-sigma modulator look as much like continuous-time as possible. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by Rick Lyons April 6, 20152015-04-06
On Thu, 02 Apr 2015 15:02:42 -0500, "ABM 200" <104798@dsprelated>
wrote:

>Suppose, i record audio at say, 10000 samples/sec for some amount of time. >I store these samples in a file(WAV file). When i play back this audio, at >a different rate, say 30000 samples/ sec. The audio will definitely be >fast. But, theoretically more samples/ sec implies higher frequency. So, >does this mean that the play back audio will be at 3 times the original >(recorded) audio frequency or more ? >
Hello ABM 200, You received good replies here. I just thought I'd mention that you may be mildly interested in looking at: http://www.dsprelated.com/showarticle/167.php [-Rick-]
Reply by Bob Masta April 3, 20152015-04-03
On Fri, 03 Apr 2015 00:35:34 -0400, Randy Yates
<yates@digitalsignallabs.com> wrote:

>"ABM 200" <104798@dsprelated> writes: > >> Suppose, i record audio at say, 10000 samples/sec for some amount of time. >> I store these samples in a file(WAV file). When i play back this audio, at >> a different rate, say 30000 samples/ sec. The audio will definitely be >> fast. But, theoretically more samples/ sec implies higher frequency. So, >> does this mean that the play back audio will be at 3 times the original >> (recorded) audio frequency or more ? > >Yes, at exactly 3 times the original. Except that the reconstruction >filter won't change, so you may get some filtering of those higher >frequencies, as others have pointed out.
If you actually try this exact experiment with a real-world sound card, there is another complicating factor: Almost all sound cards use fixed hardware sample rates of 48000, 96000, or 192000 Hz. But they *appear* to allow you to set other rates, then they "fake" the results with sample rate conversion. You have no control over or knowledge of this process; it's all done behind your back. The sample rate conversion gives the appearance that the output filter (and input, if you are recording) has changed to match the new requested sample rate. For a typical true hardware sample rate of 48000 Hz, the output would cut off at something less than 24000 Hz... probably around 20-22 kHz. In the example given, both the "before" and "after" sample rates are under 48000 Hz, so everything would appear to work exactly as expected. Had the experiment been, say, going from 20000 Hz to 60000 Hz sample rates the output filter would still be limited to the original 20 kHz (or whatever) determined by the hardware 48000 Hz sample rate. So any raw sound above 6.67 kHz would now be above 20 kHz and be cut off. Best regards, Bob Masta DAQARTA v7.60 Data AcQuisition And Real-Time Analysis www.daqarta.com Scope, Spectrum, Spectrogram, Sound Level Meter Frequency Counter, Pitch Track, Pitch-to-MIDI FREE Signal Generator, DaqMusiq generator Science with your sound card!
Reply by robert bristow-johnson April 3, 20152015-04-03
On 4/3/15 12:27 AM, Randy Yates wrote:
> robert bristow-johnson<rbj@audioimagination.com> writes: > >> but in sigma-delta they clock back-and-forth more in a random pattern, >> so that the spectrum of the error is not a deterministic line-spectra, >> but more like HPF noise. > > Robert, > > What is "HPF?" I would normally think "High Pass Filter," but in this > context that doesn't make sense.
it's what i meant. i just meant high-pass filtered noise. noise pushed up against Nyquist. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by Randy Yates April 3, 20152015-04-03
"ABM 200" <104798@dsprelated> writes:

> Suppose, i record audio at say, 10000 samples/sec for some amount of time. > I store these samples in a file(WAV file). When i play back this audio, at > a different rate, say 30000 samples/ sec. The audio will definitely be > fast. But, theoretically more samples/ sec implies higher frequency. So, > does this mean that the play back audio will be at 3 times the original > (recorded) audio frequency or more ?
Yes, at exactly 3 times the original. Except that the reconstruction filter won't change, so you may get some filtering of those higher frequencies, as others have pointed out. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Reply by Randy Yates April 3, 20152015-04-03
robert bristow-johnson <rbj@audioimagination.com> writes:

> On 4/2/15 7:05 PM, Les Cargill wrote: >> ABM 200 wrote: >>> Suppose, i record audio at say, 10000 samples/sec for some amount of >>> time. >>> I store these samples in a file(WAV file). When i play back this >>> audio, at >>> a different rate, say 30000 samples/ sec. The audio will definitely be >>> fast. But, theoretically more samples/ sec implies higher frequency. So, >>> does this mean that the play back audio will be at 3 times the original >>> (recorded) audio frequency or more ? >>> >> >> The D/A converter would have to use a reconstruction filter with a >> different upper bandlimit for this to work. >> > > to work *well*. sometimes we be cheap SOBs and our reconstruction > filter is nothing other than what is inherent to the D/A. maybe there > is a simple RC LPF after the D/A, maybe more or maybe less. > > for a conventional D/A, there is the zero-order hold which *would* > naturally adjust to the higher sample rate. > > for a sigma-delta D/A,
You mean delta sigma?
> i dunno if the internal arithmetic in the sigma-delta modulator gets > adjusted or not.
No, it doesn't.
> i never designed a sigma-delta D/A, but i imagine that before the > modulator there is an upsampler, say 64x (so it looks like a 3 MHz > sampled signal bandlimited to 24 kHz going into the sigma-delta > modulator with +1 and -1 coming out at 3 MHz). but i don't think > increasing the sample rate changes any numerical parameters in that > upsampler (if it stays at 64x).
Nope. At least it wouldn't have in my design I did way back when. Of course you have to be careful to stay within operating parameters of the device's hardware. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Reply by Randy Yates April 3, 20152015-04-03
robert bristow-johnson <rbj@audioimagination.com> writes:

> but in sigma-delta they clock back-and-forth more in a random pattern, > so that the spectrum of the error is not a deterministic line-spectra, > but more like HPF noise.
Robert, What is "HPF?" I would normally think "High Pass Filter," but in this context that doesn't make sense. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Reply by Les Cargill April 2, 20152015-04-02
robert bristow-johnson wrote:
> On 4/2/15 9:40 PM, Les Cargill wrote: >> robert bristow-johnson wrote: >>> On 4/2/15 7:05 PM, Les Cargill wrote: >>>> ABM 200 wrote: >>>>> Suppose, i record audio at say, 10000 samples/sec for some amount of >>>>> time. >>>>> I store these samples in a file(WAV file). When i play back this >>>>> audio, at >>>>> a different rate, say 30000 samples/ sec. The audio will definitely be >>>>> fast. But, theoretically more samples/ sec implies higher frequency. >>>>> So, >>>>> does this mean that the play back audio will be at 3 times the >>>>> original >>>>> (recorded) audio frequency or more ? >>>>> >>>> >>>> The D/A converter would have to use a reconstruction filter with a >>>> different upper bandlimit for this to work. >>>> >>> >>> to work *well*. sometimes we be cheap SOBs and our reconstruction >>> filter is nothing other than what is inherent to the D/A. maybe there >>> is a simple RC LPF after the D/A, maybe more or maybe less. >>> >>> for a conventional D/A, there is the zero-order hold which *would* >>> naturally adjust to the higher sample rate. >>> >>> for a sigma-delta D/A, i dunno if the internal arithmetic in the >>> sigma-delta modulator gets adjusted or not. i never designed a >>> sigma-delta D/A, but i imagine that before the modulator there is an >>> upsampler, say 64x (so it looks like a 3 MHz sampled signal bandlimited >>> to 24 kHz going into the sigma-delta modulator with +1 and -1 coming out >>> at 3 MHz). but i don't think increasing the sample rate changes any >>> numerical parameters in that upsampler (if it stays at 64x). >>> >>> i dunno. >>> >>> >> >> This looks like it's darn near just PWM into a lowpass >> filter: >> http://www.cirrus.com/en/pubs/proDatasheet/CS4398_F2.pdf >> > > if it were a 1-bit D/A, then what it has in common with PWM is that it's > greatly oversampled and the low-frequency signal you want is in the > "duty-cycle" of the clocking +1 and -1 states. but in sigma-delta they > clock back-and-forth more in a random pattern, so that the spectrum of > the error is not a deterministic line-spectra, but more like HPF noise. >
Yep - although using PWM for classic motor control, the HPF moise is way down there. For audio, "more like HPF noise" is a very good thing.
> but that device uses a multi-bit D/A (maybe 4 bits), which means a > tradeoff of sorts between the noise power of the sigma-delta modulator > (which is reduced) and the requirements of linearity of the multibit > D/A. except for issues of capacitors charging and discharging > symmetrically, a 1-bit D/A doesn't have linearity issues because there > is only 1 step (it's when there are multiple steps in the staircase > function of a conventional D/A that there are issues of the steps not > being precisely equal-sized and the staircase not going up straight and > linear). >
Right. With one unit, there's no unit to unit variation. "Fold" the many-units to be the one unit, and presto.
>> Sez it has a "switched capacitor" DAC . Looks >> complicated: >> http://www.seas.ucla.edu/brweb/teaching/AIC_Ch12.pdf >> >> To abuse a phrase; a "class D DAC". > > something like that. it's a combination of a sigma-delta modulator and > a class D D/A. > >
So it is actually class D? It seemed like that but I was diving into details too soon. We're seeing a lot of things go more like class D these days. I suppose you can keep all the fiddly parts controlled enough to replicate it. Class D looks like a giant suite of offsetting .. hacks to me. I have a class D guitar amp now - and it sounds somewhere between a MOSFET amp and tubes in ... color, while being as "fast" and detailed as MOSFET. Hard to explain. Size weight and power. Maybe it's just me but that seems to have happened pretty fast*. It's really driven by shipping costs, which is fascinating if you think about it. *slightly ludicrous - switchmode power supplies for PC have been the norm since the '80s. -- Les Cargill
Reply by robert bristow-johnson April 2, 20152015-04-02
On 4/2/15 9:40 PM, Les Cargill wrote:
> robert bristow-johnson wrote: >> On 4/2/15 7:05 PM, Les Cargill wrote: >>> ABM 200 wrote: >>>> Suppose, i record audio at say, 10000 samples/sec for some amount of >>>> time. >>>> I store these samples in a file(WAV file). When i play back this >>>> audio, at >>>> a different rate, say 30000 samples/ sec. The audio will definitely be >>>> fast. But, theoretically more samples/ sec implies higher frequency. >>>> So, >>>> does this mean that the play back audio will be at 3 times the original >>>> (recorded) audio frequency or more ? >>>> >>> >>> The D/A converter would have to use a reconstruction filter with a >>> different upper bandlimit for this to work. >>> >> >> to work *well*. sometimes we be cheap SOBs and our reconstruction >> filter is nothing other than what is inherent to the D/A. maybe there >> is a simple RC LPF after the D/A, maybe more or maybe less. >> >> for a conventional D/A, there is the zero-order hold which *would* >> naturally adjust to the higher sample rate. >> >> for a sigma-delta D/A, i dunno if the internal arithmetic in the >> sigma-delta modulator gets adjusted or not. i never designed a >> sigma-delta D/A, but i imagine that before the modulator there is an >> upsampler, say 64x (so it looks like a 3 MHz sampled signal bandlimited >> to 24 kHz going into the sigma-delta modulator with +1 and -1 coming out >> at 3 MHz). but i don't think increasing the sample rate changes any >> numerical parameters in that upsampler (if it stays at 64x). >> >> i dunno. >> >> > > This looks like it's darn near just PWM into a lowpass > filter: > http://www.cirrus.com/en/pubs/proDatasheet/CS4398_F2.pdf >
if it were a 1-bit D/A, then what it has in common with PWM is that it's greatly oversampled and the low-frequency signal you want is in the "duty-cycle" of the clocking +1 and -1 states. but in sigma-delta they clock back-and-forth more in a random pattern, so that the spectrum of the error is not a deterministic line-spectra, but more like HPF noise. but that device uses a multi-bit D/A (maybe 4 bits), which means a tradeoff of sorts between the noise power of the sigma-delta modulator (which is reduced) and the requirements of linearity of the multibit D/A. except for issues of capacitors charging and discharging symmetrically, a 1-bit D/A doesn't have linearity issues because there is only 1 step (it's when there are multiple steps in the staircase function of a conventional D/A that there are issues of the steps not being precisely equal-sized and the staircase not going up straight and linear).
> Sez it has a "switched capacitor" DAC . Looks > complicated: > http://www.seas.ucla.edu/brweb/teaching/AIC_Ch12.pdf > > To abuse a phrase; a "class D DAC".
something like that. it's a combination of a sigma-delta modulator and a class D D/A. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."