In article <50b480558eno...@audiomisc.co.uk>, Jim Lesurf <no...@audiomisc.co.uk> writes
>The explanation depends on how you are "checking instantaneous peak >levels".
I explained: I'm detecting (using an arithmetic model) then visually inspecting the peaks.
>Are you using an analogue meter on the generated waveform with perfect hold >of peaks? I suspect not. >If you are simply scanning the raw input LPCM series for the sample values >with the largest magnitude, then they do *not* always represent the actual >peak of the waveform defined by that sequence of sample values. The peak >may be in between the sampled instants and can be as much as a few dB above >the largest sample in the sequence.
Of course, but the question is whether or not that is significant. If it looks likely, I simply redraw the envelope at reduced amplitude. For almost all circumstances, peaks either side of the offending one hold a clue as to what it should look like, and limiting (for that is effectively what it is) one transient rarely has audible effects.
> The degree of the peaking intersample >depends on the definition of the recording system and the implied >reconstruction then required for conformance with the Information Theory.
Indeed so. For 16-bit linear sampling, however, at 44.1 or 48kHz, it's not a problem. Anyway, by definition, such an 'imaginary' peak has to be sinusoidal, and therefore estimable, given the slope of the adjacent waveform. If it's not, it's out of band.
>for a detailed discussion/analysis of this, plus some real-world examples >from commercial CDs. And what I have dubbed "The Waveform From Hell" as >an extreme case for conventional LPCM. 8-]
>So inter-sample overshoots can arise when an LPCM series of values is used >to convey a continuous waveform that has been bandwidth limited in accord >with the Sampling Theorem.
Yes, but they can't be very big, unless you're applying some non-real-world source material, for example 19.95kHz bursts at +9.5dB (arbitrarily assuming +10dB = 100% mod).
>This can get worse if you then throw lossy codecs into the mix that use >spectral representations, etc. The result can be significant peaks in the >reconstructed waveform that are bigger than any individual input sample >value.
Now that, I'll readily concede might be a problem. Again, however much is dependent on the spectral content of the source and on the material's dynamics. I'm deliberately trying to reduce the dynamics in a controlled way. Were I aiming for fidelity, I wouldn't be starting from here...
> The output can then have peaks that differ from the input before >encoding.
>The above webpage only deals with LPCM, and that isn't worst case once you >let lossy codecs (and excessive level compressions, etc) into the chain. >:-)
>> The latter would be defined in terms of squared-off or >> non-(roughly)-sinusoidal waveforms. I check for >2 samples at identical >> level on waveform peaks (at any level).
>> If it's going clean into the codec, are you saying the client DAC >> overshoots somehow, so as to square it off?
>Not quite. If the reconstruction system (decoder + DAC + image filtering) >works 'correctly' it should cheerfully produce the defined waveforms >*including* any parts required to go *above* 0dBFS.
Hang on a minute! If it's obviously going to peak above 100%, I'll be manually adjusting it (remember, I'm catching anything >2 samples flat, including at 100%).
>The problem is that in practice you can't assume the designer of the >reconstruction system had a clue about this, or cared. So the output may be >distorted in a way that varies from one reconstruction system to another.
Indeed. There be dragons, and I have no intention of risking that sort of effect.
>This is unlikely to be flat top as that violates the implied Sampling >theorem.
No it'll be a sinusoidal peak, with amplitude roughly inversely proportional to the frequency of the wave, as indicated by the adjacent samples. So the worst case would be at 22kHz, where you couldn't theoretically tell what the amplitude should be, unless you interpolate/infer from adjacent peaks (not samples!). Again, the saving grace is the nature of real-world audio, where things do tend to relate to other things (gunshots etc. notwithstanding).
>But if you measure the results for real systems you can find a >variety of forms of error shape. Indeed, some high order 1-bit delta sigma >systems can lock up or misbehave in a way that then extends after the >nominally affected part.
>Think yourself lucky that SACD/DSD never caught on, BTW. That had to be >range limited for fear of related problems. See Stan Lipshitz work on this >if curious. :-)
I think we're somewhat at cross purposes on all this. The stuff I'm outputting is most emphatically not high fidelity. the procedure is intended to make the most of poor bitrates etc. As I said, if fidelity were the aim, I wouldn't be doing such drastic (and time consuming) things.
Cheers,
S.
-- SimonM ----- TubeWiz.com ----- Video making/uploading that's easy to use & fun to share Try it today! (now with DFace blurring)
SpamTrapSeeSig wrote: > In article <50b3d76ad7no...@audiomisc.co.uk>, Jim Lesurf > <no...@audiomisc.co.uk> writes >> In article >> <997a43da-f5ce-4f91-b444-98ad5afb6...@z41g2000yqz.googlegroups.com>, >> davidrobin...@postmaster.co.uk <davidrobin...@postmaster.co.uk> wrote: >>> It's been heading that way on BBC One (Strictly) for a few years too. No >>> where near as bad, but given the show has live music which could sound >>> quite good (audio quality wise), it just sounds squashed.
>>> I wonder if it's across all the BBC TV output? I hear classical-ish >>> music being bounced by dynamic range compression in places where I can't >>> believe the original programme tape had such compression applied - so >>> does almost everything just get slammed through a processor?
>> Fortunately, I think there are exceptions to the general rule. The >> results >> of the analysis I did during the recent Proms shows that on BBC4 DTTV >> they >> didn't seem to apply any 'automated' level compression. Although there >> did >> seem to be a few dB worth of what looked like the person in charge >> altering >> the gain level 'by hand' for some sections.
> I would jolly well hope so!
>> But I can only say this by >> comparison with R3 DTTV/iPlayer as I don't have a 'source' recording >> of the >> BBC4 concerts.
>> By comparison, BBC1/2 seem far more level compressed. And the BBC1/2 >> iPlayer seems to have levels peaking right up to 0dBFS. So no headroom >> for >> any reconstruction overshoots.
> iPlayer *requires* heavy compression in order to work.
Does it really? I download things from iPlayer using BBC Radio Ripper and then treat the resulting mp3 files as they need to be just to boost the volume and trim them. The main one I do is Late Junction[1] on Radio 3 and I usually find an excellent spread of amplitude on this which I can boost usually by 160% or more to fit the available headroom.
Or am I missing something? It could be that somewhere something is telling me porkies.
[1] because its on after I go to bed (it starts in 30 minutes...) so I listen to it in the car on the way to work, using a Sansa Clip mp3 player through a Tesco adapter. i.e nowhere near a computer.
I find the Sansa great, it plays mp3, ogg-vorbis, and FLAC files amongst several others - these are the ones I use. This is a Linux box on which BBC Radio Ripper does not work (even with Wine) so I do it on another PC running Windows XP.
--
I'm not apathetic... I just don't give a sh** anymore
In article <GA2tVJKTsI8KF...@marketing1.teknocraft.co.uk>, SpamTrapSeeSig
<no-...@nospam.demon.co.uk> wrote: > In article <50b480558eno...@audiomisc.co.uk>, Jim Lesurf > <no...@audiomisc.co.uk> writes > >The explanation depends on how you are "checking instantaneous peak > >levels". > I explained: I'm detecting (using an arithmetic model) then visually > inspecting the peaks.
Sorry, but that tells me nothing unless you specify the details of the "arithmetic model" so that I could reproduce the same process for a series of sample values and understand what it actually does to the data. Please explain this "model" in terms of what it does with the data in a way I or others could use to duplicate the process.
> >Are you using an analogue meter on the generated waveform with perfect > >hold of peaks? I suspect not. > >If you are simply scanning the raw input LPCM series for the sample > >values with the largest magnitude, then they do *not* always represent > >the actual peak of the waveform defined by that sequence of sample > >values. The peak may be in between the sampled instants and can be as > >much as a few dB above the largest sample in the sequence. > Of course, but the question is whether or not that is significant.
To tell, you would first need to deal with the questions I put above.
> If it looks likely,
Sorry, but the actual interpeak levels for a series of LPCM values isn't a matter of what is 'likely'. They are defined by the data series you have to work with as input and knowing how the data were collected - i.e. the filtering, etc, of the ADC input to conform to the Sampling Theorem. The point of the Sampling Theorem is that the data series forms what it called a 'complete record'. This means it defines the entire waveform at all instants even those between samples. Matter for formal proof in terms of Information Theory.
> I simply redraw the envelope at reduced amplitude.
By what means? Envelope of what set of values? Afraid you still have not explained that.How does your "mathematical model" find the interpeak levels to let you form an "envelope" over them?
> For almost all circumstances, peaks either side of the offending one > hold a clue as to what it should look like, and limiting (for that is > effectively what it is) one transient rarely has audible effects.
I'm afraid that reads as rather muddled to me. You don't have 'peaks' either side. You have a series of LPCM values. For high order filtering or equivalents the levels in between the samples are determined by many more samples that just the two closest to the interpeak. Indeed, in classical sampling theory you need to take *all* the sample values in the set into account. Fortunately most real cases use FIR system so you can limit this. :-)
> > The degree of the peaking intersample depends on the definition of the > >recording system and the implied reconstruction then required for > >conformance with the Information Theory. > Indeed so. For 16-bit linear sampling, however, at 44.1 or 48kHz, it's > not a problem.
I'm afraid that from what you've written so far that may be a matter of you not realising the situation simply doesn't comform with your belief. :-)
> Anyway, by definition, such an 'imaginary' peak has to be > sinusoidal,
No. Quite incorrect, I'm afraid. Your comments do strenghten my feeling that you have not yet understood this.
> >for a detailed discussion/analysis of this, plus some real-world > >examples from commercial CDs. And what I have dubbed "The Waveform From > >Hell" as an extreme case for conventional LPCM. 8-]
> >So inter-sample overshoots can arise when an LPCM series of values is > >used to convey a continuous waveform that has been bandwidth limited in > >accord with the Sampling Theorem. > Yes, but they can't be very big, unless you're applying some > non-real-world source material, for example 19.95kHz bursts at +9.5dB > (arbitrarily assuming +10dB = 100% mod).
Have you read and understood the above page yet? Your comment seems to show you hadn't when you wrote it. What you say isn't what I have been talking about. The point here is that all the LPCM samples can have values below 0dBFs you define a waveform whose peaks are quite some way above 0dBFS. As shown in some real commercial CD examples on the page as well as for some test patterns.
> >Not quite. If the reconstruction system (decoder + DAC + image > >filtering) works 'correctly' it should cheerfully produce the defined > >waveforms *including* any parts required to go *above* 0dBFS. > Hang on a minute! If it's obviously going to peak above 100%, I'll be > manually adjusting it (remember, I'm catching anything >2 samples flat, > including at 100%).
The problem is that from what you say the overshoot may not be "obvious" to you because you are not understanding how it will arise and that it isn't simply one of the sample values or a low order interpolation between two of them.
> >The problem is that in practice you can't assume the designer of the > >reconstruction system had a clue about this, or cared. So the output > >may be distorted in a way that varies from one reconstruction system to > >another. > Indeed. There be dragons, and I have no intention of risking that sort > of effect.
Alas, your comments do seem to show that you are doing just that as a result of not actually understanding the nature of the problem and its causes.
> >This is unlikely to be flat top as that violates the implied Sampling > >theorem. > No it'll be a sinusoidal peak, with amplitude roughly inversely > proportional to the frequency of the wave, as indicated by the adjacent > samples.
Again, I'm afraid your comment shows you haven't understood.
The problem with overshoots beyond 0dBFS for a DAC system is that the behaviour of the DAC reconstruction will depend on how the DAC functions. So a DAC that uses one arrangement will misbehave in a different way to some other design. Meaurements do confirm this and you don't just get what you describe as a "sinusoidal peak" I'm afraid. So both theory and measurements do not agree with your assertion above.
> >Think yourself lucky that SACD/DSD never caught on, BTW. That had to be > >range limited for fear of related problems. See Stan Lipshitz work on > >this if curious. :-) > I think we're somewhat at cross purposes on all this. The stuff I'm > outputting is most emphatically not high fidelity. the procedure is > intended to make the most of poor bitrates etc. As I said, if fidelity > were the aim, I wouldn't be doing such drastic (and time consuming) > things.
I agree that we are at "cross purposes". :-) But this is because I'm afraid that you haven't understood what I have been explaining. Please read the webpage as it is intended to make this clear using examples, etc.
In article <50b4d85907no...@audiomisc.co.uk>, Jim Lesurf <no...@audiomisc.co.uk> writes
>In article <GA2tVJKTsI8KF...@marketing1.teknocraft.co.uk>, SpamTrapSeeSig ><no-...@nospam.demon.co.uk> wrote: >> I explained: I'm detecting (using an arithmetic model) then visually >> inspecting the peaks.
>Sorry, but that tells me nothing unless you specify the details of the >"arithmetic model" so that I could reproduce the same process for a series >of sample values and understand what it actually does to the data. Please >explain this "model" in terms of what it does with the data in a way I or >others could use to duplicate the process.
It's not at all complex. I simply look for samples above a certain magnitude (say 10% of full mod, but usually lower than that) and visually inspect them. The 'model' as such is what I imagine to be a very simple bit of code algorithm built into Sound Forge, but it's nothing complex.
>Sorry, but the actual interpeak levels for a series of LPCM values isn't a >matter of what is 'likely'. They are defined by the data series you have to >work with as input and knowing how the data were collected - i.e. the >filtering, etc, of the ADC input to conform to the Sampling Theorem. The >point of the Sampling Theorem is that the data series forms what it called >a 'complete record'. This means it defines the entire waveform at all >instants even those between samples. Matter for formal proof in terms of >Information Theory.
I understand, but my application is practical, not theoretical. In practice, samples can be altered without causing chaos.
>> I simply redraw the envelope at reduced amplitude.
>By what means?
With a virtual 'pencil', within the editing package, dragging the samples to new values. I expect you're horrified! :^)
>Envelope of what set of values? Afraid you still have not >explained that.How does your "mathematical model" find the interpeak levels >to let you form an "envelope" over them?
It doesn't. I'm looking for high value (read 'exceptional' if you will) actual samples, not interpolated values. Having found some, I then attempt to form an opinion as to the effect they might have. The intent being to end up with a waveform I can normalize to a reasonably high level prior to encoding.
>> For almost all circumstances, peaks either side of the offending one >> hold a clue as to what it should look like, and limiting (for that is >> effectively what it is) one transient rarely has audible effects.
>I'm afraid that reads as rather muddled to me. You don't have 'peaks' >either side. You have a series of LPCM values. For high order filtering or >equivalents the levels in between the samples are determined by many more >samples that just the two closest to the interpeak.
I think that's what I meant. If you look at the samples, you can see the patterns at various frequencies (and if desperate I can do a Fourier analysis to see the frequency distribution for a chunk of data around the offending spot - obviously this needs quite a lot of data, not just a couple of peaks).
As long as the transient in question is resonant, as opposed to percussive or explosive (things being suddenly hit or fired), it is practical to look at the audio peaks either side (no, not the samples immediately either side!), to see what's happening. Usually it's practical to take, say, 2dB out of the area around the high peak without introducing an audible effect.
>Indeed, in classical >sampling theory you need to take *all* the sample values in the set into >account. Fortunately most real cases use FIR system so you can limit this. >:-)
Quite. I think we're debating the difference between the engineering of a digital storage and reproduction system, and a craft skill. What I'm doing breaks many rules regarding fidelity, but works in practice rather well.
>> > The degree of the peaking intersample depends on the definition of the >> >recording system and the implied reconstruction then required for >> >conformance with the Information Theory.
>> Indeed so. For 16-bit linear sampling, however, at 44.1 or 48kHz, it's >> not a problem.
>I'm afraid that from what you've written so far that may be a matter of you >not realising the situation simply doesn't comform with your belief. :-)
I'm not deaf (yet). If it sounds nasty, I don't do it!
'Not a problem' is streets away from 'unfaithful to the original', somewhere down the bottom of the hill near the shanty town, I expect. My point being that I'm adapting the original to the output purpose, rather than trying to pass it through the system unchanged.
Incidentally, having looked through your page on CD overmodulation, I can't see anything that isn't blindingly obvious. I would add, that your 'waveform from hell' is amusing (and yes, I can see the point), but even there, the transients are sinusoidal.
The commercial examples you cite are simply cases of ignorance - those involved in the process not knowing how to use the equipment properly.
I'd also comment that allowing 3dB headroom on DAC output is sensible, as you say. Paying more attention to this, as opposed to rubber feet(!) could greatly improve the performance, but still wouldn't fix obvious poor engineering such as that Queen compilation.
I can cite similar examples, sadly. KT Tunstall's 'Eye to the Telescope" album is particularly badly recorded in places (unless horrible distortion was the effect she intended, which I doubt), although I think the distortion was introduced at some stage before mastering. As I write, the wife has it in the car, so I can't rip it to show you the waveform, but it's not nice.
>The problem with overshoots beyond 0dBFS for a DAC system is that the >behaviour of the DAC reconstruction will depend on how the DAC functions. >So a DAC that uses one arrangement will misbehave in a different way to >some other design. Meaurements do confirm this and you don't just get what >you describe as a "sinusoidal peak" I'm afraid. So both theory and >measurements do not agree with your assertion above.
The maximum frequency that can be encoded, by Nyquist, is
f/2-1, where f = sampling frequency.
Assuming proper filtering (without alias nor significant nasty artefacts), at that maximum frequency, the waveform, if present, is sinusoidal, because harmonics are out of band. Any peak falling between samples must therefore also be sinusoidal (although not necessarily with the peak evenly spaced between samples).
I understand your point about DAC misbehaviour being a function of design, but my whole intent is to adjust the recorded dynamic range such that it can be decoded _without_ overshoots but still peaks as high as practical.
And even your 'waveform from hell' looks sinusoidal to me, leastways in the places that matter (namely the spike)!
Crucially you don't say from whence your plot comes - if it's the source or the DAC output. I assume the latter, but if it's the former, the blue "bandwidth limited" square wave isn't bandwidth limited at all, it's ringing (as you'd expect if you tried to reproduce it via an analogue system)!
If it was _only_ bandwidth limited, for example of digital-domain-only construction, the rise-time (slope) would be affected and the corners rounded-off. It wouldn't ring.
If you intended the figure to illustrate DAC output, what are the grey bits on which the red and blue plots are superimposed, and what did the 'original' digital source look like? -- SimonM ----- TubeWiz.com ----- Video making/uploading that's easy to use & fun to share Try it today! (now with DFace blurring)
On 4 Nov, 20:25, SpamTrapSeeSig <no-...@nospam.demon.co.uk> wrote:
> The maximum frequency that can be encoded, by Nyquist, is
> f/2-1, where > f = sampling frequency.
No ;-) It's "less than f/2" - there's no "minus one". I'll grant you that (f/2)-1 _is_ less than f/2, but the correct definition is "anything less than f/2", which includes (f/2)-0.5, (f/2)-0.00001 etc.
>> The maximum frequency that can be encoded, by Nyquist, is
>> f/2-1, where >> f = sampling frequency.
>No ;-) It's "less than f/2" - there's no "minus one". I'll grant you >that (f/2)-1 _is_ less than f/2, but the correct definition is >"anything less than f/2", which includes (f/2)-0.5, (f/2)-0.00001 etc.
Well you get marks for pedantry, but you know the point I was making, namely that any signal at the highest frequency is by definition sinusoidal.
If a peak occurs between two samples then you can only assume there is a fragment of a sine wave. The peak may not occur symmetrically between the adjacent sample points (unless they're identical values), but that doesn't matter. It's still sinusoidal. -- SimonM ----- TubeWiz.com ----- Video making/uploading that's easy to use & fun to share Try it today! (now with DFace blurring)
> >> The maximum frequency that can be encoded, by Nyquist, is
> >> f/2-1, where > >> f = sampling frequency.
> >No ;-) It's "less than f/2" - there's no "minus one". I'll grant you > >that (f/2)-1 _is_ less than f/2, but the correct definition is > >"anything less than f/2", which includes (f/2)-0.5, (f/2)-0.00001 etc.
> Well you get marks for pedantry, but you know the point I was making, > namely that any signal at the highest frequency is by definition > sinusoidal.
> If a peak occurs between two samples then you can only assume there is a > fragment of a sine wave. The peak may not occur symmetrically between > the adjacent sample points (unless they're identical values), but that > doesn't matter. It's still sinusoidal.
Not sure I've followed the point of your discussion - in a Nyquist sampled system, all moments _between_ sample points are completely and uniquely defined (in theory; still true near as damn it with practical reconstruction filters) - and that applies whether they go above digital full scale or not.
If you really care about that issue, you can either take a blind guess at what level of reduction will "probably" avoid it or calculate it properly. The reduction can be a simple gain change across the board, a dynamic compressor (e.g. limiter), or re-drawing it with a pencil as you like to do!
Be aware though that, with care, you could set up a dynamics processor to do exactly what you're doing with your pencil - saving a lot of time! Also be aware that, where it's a transient non-tonal peak (e.g. a hand clap, rather than a peak of a tonal component that happens to shoot high for a moment), you could just clip it and no one would ever notice.
In article <4bf718d3-50ce-45f0-8ce3-bdc091513...@d10g2000yqh.googlegroups.com>, davidrobin...@postmaster.co.uk <davidrobin...@postmaster.co.uk> wrote:
> On 4 Nov, 20:25, SpamTrapSeeSig <no-...@nospam.demon.co.uk> wrote: > > The maximum frequency that can be encoded, by Nyquist, is
> > f/2-1, where f = sampling frequency. > No ;-) It's "less than f/2" - there's no "minus one". I'll grant you > that (f/2)-1 _is_ less than f/2, but the correct definition is "anything > less than f/2", which includes (f/2)-0.5, (f/2)-0.00001 etc.
In lectures I tend to explain this to undergrads by saying that you can get to within a half-cycle of fs/2 for a given duration of recording. So fitting a half cycle less than fs/2 would into the duration. But I say this is an example of how close you can get and IT still allows it to be a complete record without ambiguity or aliasing problems. In practice it tends to me more a matter of how good the filtering at/prior to sampling may be.
> >> The maximum frequency that can be encoded, by Nyquist, is
> >> f/2-1, where f = sampling frequency.
> >No ;-) It's "less than f/2" - there's no "minus one". I'll grant you > >that (f/2)-1 _is_ less than f/2, but the correct definition is > >"anything less than f/2", which includes (f/2)-0.5, (f/2)-0.00001 etc. > Well you get marks for pedantry, but you know the point I was making, > namely that any signal at the highest frequency is by definition > sinusoidal. > If a peak occurs between two samples then you can only assume there is a > fragment of a sine wave.
That is a basic error on your part, I'm afraid. The actual waveform shape is defined by the series of values, not just the two either side. And the shape can easily *not* be a section of a sinusoid.
> The peak may not occur symmetrically between > the adjacent sample points (unless they're identical values), but that > doesn't matter. It's still sinusoidal.
<no-...@nospam.demon.co.uk> wrote: > In article <50b4d85907no...@audiomisc.co.uk>, Jim Lesurf > <no...@audiomisc.co.uk> writes > >In article <GA2tVJKTsI8KF...@marketing1.teknocraft.co.uk>, > >SpamTrapSeeSig <no-...@nospam.demon.co.uk> wrote: > >> I explained: I'm detecting (using an arithmetic model) then visually > >> inspecting the peaks.
> >Sorry, but that tells me nothing unless you specify the details of the > >"arithmetic model" so that I could reproduce the same process for a > >series of sample values and understand what it actually does to the > >data. Please explain this "model" in terms of what it does with the > >data in a way I or others could use to duplicate the process. > It's not at all complex. I simply look for samples above a certain > magnitude (say 10% of full mod, but usually lower than that) and > visually inspect them. The 'model' as such is what I imagine to be a > very simple bit of code algorithm built into Sound Forge, but it's > nothing complex.
Sorry, you still haven't explained what this "model" is and what it actually does, or how.
> >Sorry, but the actual interpeak levels for a series of LPCM values > >isn't a matter of what is 'likely'. They are defined by the data series > >you have to work with as input and knowing how the data were collected > >- i.e. the filtering, etc, of the ADC input to conform to the Sampling > >Theorem. The point of the Sampling Theorem is that the data series > >forms what it called a 'complete record'. This means it defines the > >entire waveform at all instants even those between samples. Matter for > >formal proof in terms of Information Theory. > I understand, but my application is practical, not theoretical. In > practice, samples can be altered without causing chaos.
And the problems I have been explaining to you do occur in practice. As demonstrated by some examples I show on the webpage I referred to. So in practice you can expect your own data will have the problem at times.
If you are just altering individual samples by hand then almost anything could happen to the waveform in the period around those samples. if you don't look at the reconstructed waveform in a way to find intersample peaks then you may have no idea what will be happening I'm afraid.
> >> I simply redraw the envelope at reduced amplitude.
> >By what means? > With a virtual 'pencil', within the editing package, dragging the > samples to new values. I expect you're horrified! :^)
Not really. It is consistent with what you have been saying. The result is, I'm afraid, that despite your beliefs you actually have no clear idea what the results may be, and that as a result you may well be causing problems which could be avoided if you understood the problem.
> >Envelope of what set of values? Afraid you still have not explained > >that.How does your "mathematical model" find the interpeak levels to > >let you form an "envelope" over them? > It doesn't. I'm looking for high value (read 'exceptional' if you will) > actual samples, not interpolated values. Having found some, I then > attempt to form an opinion as to the effect they might have. The intent > being to end up with a waveform I can normalize to a reasonably high > level prior to encoding.
As I've explained, you can't reliably and safely do that simply by a visual inspection of the data values as 'points' or 'dots connected by straight lines'. That would only be safe if you ensure no sample value gets larger than around -5dBFS for LPCM. Anything above that and there can be problems which you won't see in front of you on your display I'm afraid.
[snip to avoid repeating the above]
> >Indeed, in classical sampling theory you need to take *all* the sample > >values in the set into account. Fortunately most real cases use FIR > >system so you can limit this. > >:-) > Quite. I think we're debating the difference between the engineering of > a digital storage and reproduction system, and a craft skill. What I'm > doing breaks many rules regarding fidelity, but works in practice rather > well.
I'm afraid that to me we seem to be discussing the difference between knowing what you are doing and just assuming you do. :-)
As yet I've seen no sign in your replies that you actually understand the nature of the problem I've been describing, or that it is a real one that does occur in practice. Nor - as David has also been warning - that the problem can become worse when you then employ lossy encoding with low rates as that makes more changes to the decoded output.
> >> > The degree of the peaking intersample depends on the definition of > >> >the recording system and the implied reconstruction then required > >> >for conformance with the Information Theory.
> >> Indeed so. For 16-bit linear sampling, however, at 44.1 or 48kHz, > >> it's not a problem.
> >I'm afraid that from what you've written so far that may be a matter of > >you not realising the situation simply doesn't comform with your > >belief. :-) > I'm not deaf (yet). If it sounds nasty, I don't do it!
I've not been wondering about your hearing, and I appreciate you have been talking about material that may sound poor anyway. But that does not strike me as a reason to cause more damage because you don't understand the problem and see that you can easily avoid it. :-)
> 'Not a problem' is streets away from 'unfaithful to the original', > somewhere down the bottom of the hill near the shanty town, I expect. My > point being that I'm adapting the original to the output purpose, rather > than trying to pass it through the system unchanged. > Incidentally, having looked through your page on CD overmodulation, I > can't see anything that isn't blindingly obvious.
+2dB or more "isn't blindingly obvious" to you? I guess that should not surprise me at this point. :-)
> I would add, that your 'waveform from hell' is amusing (and yes, I can > see the point), but even there, the transients are sinusoidal.
They are not sinusoidal. You seem to be assuming that any smooth curve is "sinusoidal".
> The commercial examples you cite are simply cases of ignorance - those > involved in the process not knowing how to use the equipment properly.
Sorry you said that as in essence they duplicate your own approach. :-)
> I'd also comment that allowing 3dB headroom on DAC output is sensible, > as you say. Paying more attention to this, as opposed to rubber feet(!) > could greatly improve the performance, but still wouldn't fix obvious > poor engineering such as that Queen compilation.
And then knowing that many DACs may not cope with this, the logic is that as the person providing the source material you can choose to ensure that the level avoids overshoots to above 0dBFS.
2dB is about the limit of what people notice as a change in loudness in general. So it makes almost no difference to give you *listeners* this margin
> >The problem with overshoots beyond 0dBFS for a DAC system is that the > >behaviour of the DAC reconstruction will depend on how the DAC > >functions. So a DAC that uses one arrangement will misbehave in a > >different way to some other design. Meaurements do confirm this and you > >don't just get what you describe as a "sinusoidal peak" I'm afraid. So > >both theory and measurements do not agree with your assertion above. > The maximum frequency that can be encoded, by Nyquist, is > f/2-1, where f = sampling frequency.
As David as pointed out this is incorrent and that in theory any frequency less than f/2 is allowed. In principle it is safer to assume the max is a half cycle short over the entire recorded duration as the extreme. In practice to keep below that as the filtering won't be ideal.
> Assuming proper filtering (without alias nor significant nasty > artefacts), at that maximum frequency, the waveform, if present, is > sinusoidal, because harmonics are out of band. Any peak falling between > samples must therefore also be sinusoidal (although not necessarily with > the peak evenly spaced between samples).
Sorry, but you are still being muddled by the false idea that we are only talking about sine waves. Real signals may have peak shapes with a sharper peak and a higher crest factor yet still have all their components in-band and the sample satisfy the sampling theorem.
> I understand your point about DAC misbehaviour being a function of > design, but my whole intent is to adjust the recorded dynamic range such > that it can be decoded _without_ overshoots but still peaks as high as > practical.
And I am pointing out that your approach doesn't ensure you have avoided overshoots. Primarily because - as your comments show - you have not yet actually understood the nature of the problem.
> And even your 'waveform from hell' looks sinusoidal to me, leastways in > the places that matter (namely the spike)!
The problem being that it is *not* 'sinusoidal'. Thus your error here. You are seeing what you assume must be true to fit your (incorrect) assumptions I'm afraid.
> Crucially you don't say from whence your plot comes - if it's the source > or the DAC output. I assume the latter, but if it's the former, the blue > "bandwidth limited" square wave isn't bandwidth limited at all, it's > ringing (as you'd expect if you tried to reproduce it via an analogue > system)!
You may need to re-read the page. :-)
The waveforms between the input data sample series were generated by modelling a standard TDA filter that oversamples to obtain the required reconstruction of the waveform. This uses the common quasi-sinc shape. if you measure many CD players, etc, with a fast enough scope you would see shapes like the ones I plot when using the data series.
> If it was _only_ bandwidth limited, for example of digital-domain-only > construction, the rise-time (slope) would be affected and the corners > rounded-off. It wouldn't ring.
In article <726c088d-4c61-40a8-878a-f8577f339...@g27g2000yqn.googlegroups.com>, "davidrobin...@postmaster.co.uk" <davidrobin...@postmaster.co.uk> writes
>Not sure I've followed the point of your discussion - in a Nyquist >sampled system, all moments _between_ sample points are completely and >uniquely defined (in theory; still true near as damn it with practical >reconstruction filters) - and that applies whether they go above >digital full scale or not.
I quite understand.
My point about Jim's stuff is that the overswings he's exercised about can in practice only occur at frequencies very close to or at the Nyquist maximum (s/2 - a tiny bit), because it's only at that frequency you can have an intersample peak of high amplitude WRT adjacent actual measured samples.
In real life that hardly ever occurs (on wanted programme material) for all sorts of reasons - filtering in the chain, and just that not much produces high-level HF (Stradivarii notwithstanding!). Even in the case of violins, notorious for their ultrasonic output, the effect is firstly very directional and secondly diminishes rapidly with distance (air absorbs ultrasonics better than human-audible sound).
That leaves transients such as drums (in music), explosions, gunshots, and things having an impact on other things generally. It's long been established that some element of 'infidelity' there is tolerable, and for drums and the movies, possibly even desirable. It's also very hard to capture the waveform of these things, precisely, as recording equipment doesn't have the dynamic range (it's usually a limitation that shows up first in the analogue part of the chain).
>If you really care about that issue, you can either take a blind guess >at what level of reduction will "probably" avoid it or calculate it >properly. The reduction can be a simple gain change across the board, >a dynamic compressor (e.g. limiter), or re-drawing it with a pencil as >you like to do!
I ended up with the 'process' I have because mostly the peaks I need to deal with throw off automatic systems. The objective is the opposite of a simple gain change downwards - to reduce any 'spurious' peaks, so that the gain can be increased.
>Be aware though that, with care, you could set up a dynamics processor >to do exactly what you're doing with your pencil - saving a lot of >time!
Not easily. Most of them are designed along the lines outlined above - to let transients through ('attack time'), rather than just clamp the transient and ignore the rest. False (unwanted) triggering is the issue. It's easier to make a couple of passes through checking the peaks by eye, then to apply a compressor carefully.
> Also be aware that, where it's a transient non-tonal peak (e.g. >a hand clap, rather than a peak of a tonal component that happens to >shoot high for a moment), you could just clip it and no one would ever >notice.
True. The 'nuisance' peaks tend to be odd resonances, etc. though. Most of this is speech processing and dialogue, not music. Stuff recorded under well controlled conditions usually doesn't have the same problems.
Another technique I use is to apply quite drastic EQ over very small sections of a recording - quite high-Q filtration can be very effective in removing the 'curse' on sibilance, mic blasting etc., if you just apply it to the offending 'whatever', and not the whole recording. Ironically, it's one case where, for this to work well, you want the original to have been under-recorded, such that when you strip out the thump, there's still something left above it to use.
It has to be said though that digital techniques have utterly transformed speech editing for me. I'm not sure even now that it's faster than tape and a razor blade, but one certainly succeeds with far nastier edits than you could ever manage with analogue kit.
Regards,
S. -- SimonM ----- TubeWiz.com ----- Video making/uploading that's easy to use & fun to share Try it today! (now with DFace blurring)
> In article > <726c088d-4c61-40a8-878a-f8577f339...@g27g2000yqn.googlegroups.com>, > "davidrobin...@postmaster.co.uk" <davidrobin...@postmaster.co.uk> writes
> >Not sure I've followed the point of your discussion - in a Nyquist > >sampled system, all moments _between_ sample points are completely and > >uniquely defined (in theory; still true near as damn it with practical > >reconstruction filters) - and that applies whether they go above > >digital full scale or not.
> I quite understand.
> My point about Jim's stuff is that the overswings he's exercised about > can in practice only occur at frequencies very close to or at the > Nyquist maximum (s/2 - a tiny bit), because it's only at that frequency > you can have an intersample peak of high amplitude WRT adjacent actual > measured samples.
Not true. fs/4 can have "real" peaks 3dB above the peak sample value. fs/8 can have "real" peaks 0.69dB above the peak sample value. Contrived examples, true, of particular frequency and phase - but similar things can happen in practice.
Also (back onto the topic of encoders) brick wall limited content can have a roughly white spectrum. Low pass filtering it at, say, 18kHz may be inaudible to most people and technically _remove_ energy, but it'll increase the peak amplitude by a surprising amount...
> >Be aware though that, with care, you could set up a dynamics processor > >to do exactly what you're doing with your pencil - saving a lot of > >time!
> Not easily. Most of them are designed along the lines outlined above - > to let transients through ('attack time'), rather than just clamp the > transient and ignore the rest. False (unwanted) triggering is the issue. > It's easier to make a couple of passes through checking the peaks by > eye, then to apply a compressor carefully.
I agree it's hard, and I agree false triggering (clamping things you wouldn't clamp yourself) is a problem - but you can set all the time constants, look ahead time etc as you see fit. I think the reason it often sounds worse is that when it's automated there's a tendency to over do it - the machine _will_ use the parameters you dial in, even if it shreds the audio - whereas with your pencil, you'll get a sense that you're doing too much and implicitly adjust your "threshold" for tinkering if necessary. Well, that's what I think happens with me anyway.
> It has to be said though that digital techniques have utterly > transformed speech editing for me. I'm not sure even now that it's > faster than tape and a razor blade, but one certainly succeeds with far > nastier edits than you could ever manage with analogue kit.
That's everything do to with PC's though, isn't it? They're supposed to make things quicker and easier - but they also allow you to do so much more, so you end up spending more time on the thing overall!
In article <egwr9kCL$q8KF...@marketing1.teknocraft.co.uk>, SpamTrapSeeSig
<no-...@nospam.demon.co.uk> wrote: > In article > <726c088d-4c61-40a8-878a-f8577f339...@g27g2000yqn.googlegroups.com>, > "davidrobin...@postmaster.co.uk" <davidrobin...@postmaster.co.uk> writes > >Not sure I've followed the point of your discussion - in a Nyquist > >sampled system, all moments _between_ sample points are completely and > >uniquely defined (in theory; still true near as damn it with practical > >reconstruction filters) - and that applies whether they go above > >digital full scale or not. > I quite understand. > My point about Jim's stuff is that the overswings he's exercised about > can in practice only occur at frequencies very close to or at the > Nyquist maximum (s/2 - a tiny bit), because it's only at that frequency > you can have an intersample peak of high amplitude WRT adjacent actual > measured samples.
I'm afraid that belief is false for various reasons. (And shows you still have not actually understood what the webpage, etc, are about.)
David has already now explained to you that lower frequency sinusoids can still produce large overshoots between samples.
And the reality is that signal patterns composed from a number of in-band frequency components can generate *higher* intersample peaks than a single frequency sinusoid. As demonstrated by the examples on the webpage I directed you to. This depends on things like their phase relationship in ways a power-frequency spectrum won't show you. Nor will just looking at the samples if you don't already have an eye for trouble by understanding this. :-)
> In real life that hardly ever occurs (on wanted programme material) for > all sorts of reasons - filtering in the chain, and just that not much > produces high-level HF (Stradivarii notwithstanding!). Even in the case > of violins, notorious for their ultrasonic output, the effect is firstly > very directional and secondly diminishes rapidly with distance (air > absorbs ultrasonics better than human-audible sound).
Again, I'm afraid you are simply misleading yourself due to your narrow focus on thinking in terms of looking at individual samples and the patterns as if they were simple sinusoids, etc.
In particular the Kogan Violin examples partway down the page. Note the series of high crest factor peaks.
It is quite misleading to simply think of these as being just a power spectrum. The phase relationship of the components generates quite large peaks that are quite 'sharp'.
> It has to be said though that digital techniques have utterly > transformed speech editing for me. I'm not sure even now that it's > faster than tape and a razor blade, but one certainly succeeds with far > nastier edits than you could ever manage with analogue kit.
Alas, it is hard to know what damage you may be doing unless you understand the points that have been explained to you.
Bringing computers into home graphic design and desktop publishing did allow people much more freedom to layout their own documents. Alas that also gave them the ability to generate eye-wateringly bad layouts and font and/or colour choices. :-)
Much the same seems to be the case for digital recording and processing with audio. The ability in manipulate samples at a detailed level does not guarantee the person doing so actually realises the effect it will have on the final result. :-)
The message <50b561ea58no...@audiomisc.co.uk> from Jim Lesurf <no...@audiomisc.co.uk> contains these words:
====big snip====
Sorry to butt in, but I think this might help:-
> As I've explained, you can't reliably and safely do that simply by a visual > inspection of the data values as 'points' or 'dots connected by straight > lines'. That would only be safe if you ensure no sample value gets larger > than around -5dBFS for LPCM. Anything above that and there can be problems > which you won't see in front of you on your display I'm afraid.
Not if he's using CoolEdit Pro. This does indeed show the effect you're trying to describe. It doesn't simply "Join The Dots" with straight lines, it shows sinusoidal curves exactly as your own examples show.
I'd have thought all such wave editing software would display in this fashion but if the software being used by Simon doesn't, he needs to find another wave editor that does.
-- Regards, John.
Please remove the "ohggcyht" before replying. The address has been munged to reject Spam-bots.
> The message <50b561ea58no...@audiomisc.co.uk> > from Jim Lesurf <no...@audiomisc.co.uk> contains these words:
> ====big snip====
> Sorry to butt in, but I think this might help:-
> > As I've explained, you can't reliably and safely do that simply by a visual > > inspection of the data values as 'points' or 'dots connected by straight > > lines'. That would only be safe if you ensure no sample value gets larger > > than around -5dBFS for LPCM. Anything above that and there can be problems > > which you won't see in front of you on your display I'm afraid.
> Not if he's using CoolEdit Pro. This does indeed show the effect you're > trying to describe. It doesn't simply "Join The Dots" with straight > lines, it shows sinusoidal curves exactly as your own examples show.
He said redrawing it with the "pencil". CEP doesn't have a "pencil" - you can just drag individual samples. I don't know if newer versions have a "pencil".
> I'd have thought all such wave editing software would display in this > fashion but if the software being used by Simon doesn't, he needs to > find another wave editor that does.
If you've been spoilt by using CEP (and I have too!) you probably can't imagine what junk is out there. Lots of software fails to abide by the most basic rules of audio! Mind you, CEP has fundamental faults too: it's square wave generation has a much aliasing as real signal!
In article <31303030373730364AF33A2...@plugzetnet.co.uk>, Johnny B Good
<jcs.computersb...@plugzetnet.co.uk> wrote: > The message <50b561ea58no...@audiomisc.co.uk> from Jim Lesurf > <no...@audiomisc.co.uk> contains these words: > ====big snip==== > Sorry to butt in, but I think this might help:- > > As I've explained, you can't reliably and safely do that simply by a > > visual inspection of the data values as 'points' or 'dots connected by > > straight lines'. That would only be safe if you ensure no sample value > > gets larger than around -5dBFS for LPCM. Anything above that and there > > can be problems which you won't see in front of you on your display > > I'm afraid. > Not if he's using CoolEdit Pro. This does indeed show the effect you're > trying to describe. It doesn't simply "Join The Dots" with straight > lines, it shows sinusoidal curves exactly as your own examples show.
Erm... as I've been trying to explain, the wavform shape in general is *not* a series of "sinusoidal curves" between the samples.
Fitting a spline of sinusoids would be likely to be better than simple linear interpolations. But it still won't be reliable for the cases where this problem can arise most severely.
OTOH *if* the software he uses applies something like a high order TDA using a standard like (modified) sinc then it could be very close to correct and thus give a reliable guide. The problem is that I have no idea if this is so at present. I did ask Simon earlier to explain this "mathematical" process he had mentioned, but the reply I got seemed to indicate that he didn't know how it was done. If so he is trusting software to cope with a problem he seems not to understand.
> I'd have thought all such wave editing software would display in this > fashion but if the software being used by Simon doesn't, he needs to > find another wave editor that does.
If software is to be employed in this way for professional use then it does really need to employ the correct method to display the waveform shapes in between samples. The user should also know *how* this is being done if they are relying on it to avoid problems which are 'hidden' from them by software imperfections.
Afraid this may bring me back to a general point that tends to worry me when I have my 'academic' hat on. That people often seem happy to assume that they software they use is doing whatever they assume is 'correct' without knowing what it is actually doing.
I've noticed this in the rise of engineers who use Mathmatica, Mathcad, etc, but who then have no idea how these are working out the various results. Hence the comments I made as general ones in a previous posting about the misuse of desktop publishing, etc. People are using tools without knowing how they work, or what may then be going wrong.
In article <88f7f260-d1e4-4558-b8db-9bc926afa...@k19g2000yqc.googlegroups.com>, davidrobin...@postmaster.co.uk <davidrobin...@postmaster.co.uk> wrote:
> On 5 Nov, 20:48, Johnny B Good <jcs.computersb...@plugzetnet.co.uk> > wrote:
[snip interesting details]
> > I'd have thought all such wave editing software would display in this > > fashion but if the software being used by Simon doesn't, he needs to > > find another wave editor that does. > If you've been spoilt by using CEP (and I have too!) you probably can't > imagine what junk is out there. Lots of software fails to abide by the > most basic rules of audio! Mind you, CEP has fundamental faults too: > it's square wave generation has a much aliasing as real signal!
I should explain that I never have really used the common user software like CEP or Audacity, etc. I have tended to write all my own signal generation and analysis software in 'C'. This is because my background tends to make me want to ensure I know what the software is doing, and how, to ensure it is operating as it should.
So although I'm aware of some of the features the general software offers I've not explored in detail what their failings may be. However given other things I've encountered, and what has been said in this thread, my nervousness about what these common programs may do without user awarness is strengthened!
Your point about squarewaves is interesting as I also quickly realised a while ago that generation of some - apparently simple - periodic waves was actually a minefield if you wanted the results to genuinely represent reliable band-limited versions. In particular, generating squarewaves, etc, that have periods of an even integer number of samples is much easier than ones whose periods don't fit this special condition.
In fact that does remind me of Simon's comments about the 'Waveform from Hell' example. He seems not to have understood that a squarewave that has been band limited with time symmetric filtering *will* often have 'ringing' if its frequency is low enough for any of its non-zero harmonics to be in-band. And this ringing will show on the 'leading' side of the transitions just as much as on the 'trailing' side due to the time symmetry. The classic sinc/top-hat filter does exactly this. As demonstrated in domestic digital audio since the days of the first Philips chipsets that used this form of filtering and made it a common standard.
I guess people tend to see on a 'scope examples like a squarewave filtered by something like a simple RC time-constant LPF and assume the result should be curved in that pattern. But the behaviour of the relevant band limiting filters simply isn't the same as a this analogue RC case.
> In article <31303030373730364AF33A2...@plugzetnet.co.uk>, Johnny B Good
> <jcs.computersb...@plugzetnet.co.uk> wrote: > > The message <50b561ea58no...@audiomisc.co.uk> from Jim Lesurf > > <no...@audiomisc.co.uk> contains these words: > > ====big snip==== > > Sorry to butt in, but I think this might help:- > > > As I've explained, you can't reliably and safely do that simply by a > > > visual inspection of the data values as 'points' or 'dots connected by > > > straight lines'. That would only be safe if you ensure no sample value > > > gets larger than around -5dBFS for LPCM. Anything above that and there > > > can be problems which you won't see in front of you on your display > > > I'm afraid. > > Not if he's using CoolEdit Pro. This does indeed show the effect you're > > trying to describe. It doesn't simply "Join The Dots" with straight > > lines, it shows sinusoidal curves exactly as your own examples show.
> Erm... as I've been trying to explain, the wavform shape in general is > *not* a series of "sinusoidal curves" between the samples.
CEP uses a very good approximation to the correct (optimal) sync filter.
You have to zoom down to the sample level* though. Zoomed out, it just shows the envelope of the sample points themselves.
*Actually, the limit is about 2 pixels per sample. Zoom out more, and you just get (the envelope of) the sample points. Zoom in more, and you get the interpolation. Zoom in further still, and the individual samples are superimposed on top of the interpolation. You can drag these individual samples, and see the effect on the reconstructed waveform.
> On 6 Nov, 09:40, Jim Lesurf <no...@audiomisc.co.uk> wrote: > > In article <31303030373730364AF33A2...@plugzetnet.co.uk>, Johnny B Good
> > <jcs.computersb...@plugzetnet.co.uk> wrote: > > > The message <50b561ea58no...@audiomisc.co.uk> from Jim Lesurf > > > <no...@audiomisc.co.uk> contains these words: ====big snip==== > > > Sorry to butt in, but I think this might help:- > > > > As I've explained, you can't reliably and safely do that simply by > > > > a visual inspection of the data values as 'points' or 'dots > > > > connected by straight lines'. That would only be safe if you > > > > ensure no sample value gets larger than around -5dBFS for LPCM. > > > > Anything above that and there can be problems which you won't see > > > > in front of you on your display I'm afraid. > > > Not if he's using CoolEdit Pro. This does indeed show the effect > > > you're trying to describe. It doesn't simply "Join The Dots" with > > > straight lines, it shows sinusoidal curves exactly as your own > > > examples show.
> > Erm... as I've been trying to explain, the wavform shape in general is > > *not* a series of "sinusoidal curves" between the samples. > CEP uses a very good approximation to the correct (optimal) sync filter.
OK, thanks. Didn't know that as I don't use it. So it only shows sinusoidal curves when the actual input series is for a sinusoid. Sorry, I misunderstood what you'd wrote and thought you were echoing the idea that any curve between samples will be a part of a sinusoid as a general result.
My own examples are *not* all sinusoidal curves, so I assumed you were saying that they were - at least in terms if some kind of splne fit to a series of intersample sinusoidal segements. Hence my response.
> You have to zoom down to the sample level* though. Zoomed out, it just > shows the envelope of the sample points themselves.
OK. So if Simon is using CEP and ensuring he *is* at the optimum 'zoom' level then he will see a reconstructed waveform that is close to the result using a nominal sinc function using a decent subset of values. In that case the "mathematical" process he mentioned but didn't explain should give results that would provide a decent warning of any overshoots for LPCM.
On that basis we're back to any problems that using lossy encoding will subsequently generate as a consequence of the alterations it would make to the defined waveform.
In article <31303030373730364AF33A2...@plugzetnet.co.uk>, Johnny B Good
<jcs.computersb...@plugzetnet.co.uk> wrote: > The message <50b561ea58no...@audiomisc.co.uk> from Jim Lesurf > <no...@audiomisc.co.uk> contains these words: > ====big snip==== > Sorry to butt in, but I think this might help:- > > As I've explained, you can't reliably and safely do that simply by a > > visual inspection of the data values as 'points' or 'dots connected by > > straight lines'. That would only be safe if you ensure no sample value > > gets larger than around -5dBFS for LPCM. Anything above that and there > > can be problems which you won't see in front of you on your display > > I'm afraid. > Not if he's using CoolEdit Pro. This does indeed show the effect you're > trying to describe. It doesn't simply "Join The Dots" with straight > lines, it shows sinusoidal curves exactly as your own examples show.
Come to think of it, I'm now puzzled by the above. Which "your own examples" were you referring to?
Please note that none of the examples on the 'Over The Top' webpage whose URL I gave are sinusoidal. And none of them have parts of 'sinusoidal curves' between adjacent samples as a form of 'fit' or 'smooth interpolation'. That method only works well *if* you have the special case where the waveform to be reconstructed *is* a pure sinusoid.
They all use a modified sinc TDA approach to duplicate the common FIR methods used by domestic DACs. This is based on what Information Theory tells us is the formally correct method for reconstruction. It isn't a form of trying to get a 'smooth fit' but the method required to get the correct output.
As I explained previously, I'd assumed you were meaning that the waveforms you were referring to had 'sinusoidal curves' as smooth shapes between samples. Hence my initial response. But if you were talking about genuine sinusoidal examples, then I don't now know what page you were referring to.
In message <50b561ea58no...@audiomisc.co.uk>, Jim Lesurf
<no...@audiomisc.co.uk> writes: >In article <fDnbFtdWMe8KF...@marketing1.teknocraft.co.uk>, >SpamTrapSeeSig ><no-...@nospam.demon.co.uk> wrote: [] >> The maximum frequency that can be encoded, by Nyquist, is
>> f/2-1, where f = sampling frequency.
>As David as pointed out this is incorrent and that in theory any frequency >less than f/2 is allowed. In principle it is safer to assume the max is a >half cycle short over the entire recorded duration as the extreme. In >practice to keep below that as the filtering won't be ideal.
[] Yes, the "-1" is not a good way of ensuring you stay below f/2, if only because it isn't consistent in units: for any given sampling frequency, "f/2 - 1" would give a different value depending on whether you were measuring (thinking) in Hertz, radians per second, cycles per minute, or whatever.
I hadn't come across Jim's "over the entire recording" before - true in principle as he says! In practice, I filter at well below (I tend to do it arbitrarily, but if pushed would say somewhere around 90-95%, with a more brickwall filter than the purists would like) the new f(s)/2, if I'm downsampling, which I often do before mp3 coding, especially of older material, where there's little _useful_ information at the top anyway. (This is probably OT for _broadcast_, though is an aspect I think often ignored in discussions of what is an acceptable bitrate for mp3 - the sample rate.) -- J. P. Gilliver. UMRA: 1960/<1985 MB++G.5AL-IS-P--Ch++(p)Ar@T0H+Sh0!:`)DNAf ** http://www.soft255.demon.co.uk/G6JPG-PC/JPGminPC.htm for ludicrously outdated thoughts on PCs. **
<G6...@soft255.demon.co.uk> wrote: > In message <50b561ea58no...@audiomisc.co.uk>, Jim Lesurf > <no...@audiomisc.co.uk> writes: > >In article <fDnbFtdWMe8KF...@marketing1.teknocraft.co.uk>, > >SpamTrapSeeSig <no-...@nospam.demon.co.uk> wrote: > [] > >> The maximum frequency that can be encoded, by Nyquist, is
> >> f/2-1, where f = sampling frequency.
> >As David as pointed out this is incorrent and that in theory any > >frequency less than f/2 is allowed. In principle it is safer to assume > >the max is a half cycle short over the entire recorded duration as the > >extreme. In practice to keep below that as the filtering won't be ideal. > [] Yes, the "-1" is not a good way of ensuring you stay below f/2, if > only because it isn't consistent in units: for any given sampling > frequency, "f/2 - 1" would give a different value depending on whether > you were measuring (thinking) in Hertz, radians per second, cycles per > minute, or whatever. > I hadn't come across Jim's "over the entire recording" before - true in > principle as he says! In practice,
I've tended to find it is a memorable way to explain this to students. Particularly in a context where 2N-1 values gets discussed as being relevant for descrete Fourier Transforms when trying to explain the Sampling Theorem without baffling them with too much maths that drowns being able to understand on a conceptual level! It then lets me point of that fs/2 is a 'pathalogical case' which is at the boundary of being < f2/s and then point out that just *one* more item of data then can resolve this (in effect like adding another data sample).
> I filter at well below (I tend to do it arbitrarily, but if pushed would > say somewhere around 90-95%, with a more brickwall filter than the > purists would like) the new f(s)/2, if I'm downsampling, which I often > do before mp3 coding, especially of older material, where there's little > _useful_ information at the top anyway.
In principle a good process for downsampling (the sampling rate) should also do the filtering. But we tend to get behaviour all too familiar to engineers...
In theory, theory and practice agree. But in practice they usually don't. :-)
Similarly, in theory all CD players and DTTV receivers produce identical output waveforms (or series of values) when fed the same source data. But in practice... :-)
I also tend to prefer filtering to have a decent roll-down before you really get to fs/2. But these things all have their trade-offs.
> (This is probably OT for _broadcast_, though is an aspect I think often > ignored in discussions of what is an acceptable bitrate for mp3 - the > sample rate.)
Well, given that TV and radio (and internet) now use lossy compression I wonder how many in the TV biz understand these issues. Which of course also apply to video albeit in slightly different ways.
I do recall seeing more than once obvious aliasing problems on TV images (I use a scart fed CRT so this isn't the display). Makes me wonder if everyone knows and follows the sampling theorem, or if they just prefer 'a nice sharp looking picture'. ;->
>In principle a good process for downsampling (the sampling rate) should >also do the filtering. But we tend to get behaviour all too familiar to >engineers...
I think some of the common resampling algorithms just average across the samples, which of course gives aliasing. []
>I do recall seeing more than once obvious aliasing problems on TV images (I >use a scart fed CRT so this isn't the display). Makes me wonder if everyone >knows and follows the sampling theorem, or if they just prefer 'a nice >sharp looking picture'. ;->
> In article > <4dedefe2-b78f-4766-a12a-91aa779bc...@s15g2000yqs.googlegroups.com>, > davidrobin...@postmaster.co.uk <davidrobin...@postmaster.co.uk> wrote: > > On 6 Nov, 09:40, Jim Lesurf <no...@audiomisc.co.uk> wrote: > > > In article <31303030373730364AF33A2...@plugzetnet.co.uk>, Johnny B > > > Good
> > > Erm... as I've been trying to explain, the wavform shape in general > > > is *not* a series of "sinusoidal curves" between the samples. > > CEP uses a very good approximation to the correct (optimal) sync > > filter.
I'm now also curious to know - how did you establish CEP does use sync? Is this documented? Since I don't use it I don't know about it.
Having become curious about this general matter I've been asking about it on uk.rec.audio as at least one engineer there uses CEP. They don't know how it displays a waveform. One professional has also reported that he's had files submitted which were said to be 'clean' by a CEP user but had to be rejected as the waveforms went out of range. However as things stand I have no direct experience of it.