In article , Don Pearce
wrote:
On Sat, 07 Nov 2009 14:24:16 +0000 (GMT), Jim Lesurf
wrote:
[snip lots]
Another reason is to bear in mind that a waveform composed of a series
of harmonics can - with them in phase - generate very sharp peaks with
relatively little HF content. (And if you look at other measurements
these peaked waveforms certainly arise for some instruments like violin
or trumpet.)
OK, let me think about that. You're probably right, because you
obviously have thought about it - which has prompted your posts.
Or at least worried at this problem for some time! :-)
The difference isn't large in many practical cases *if* the user is
cautious and avoid scaling sample values into the region around or about
-2dBFS. But the problem seems to be that people *do* alter values in this
range. So may cause DAC problems they are unaware of.
Hard clipping is essentially an 'all or nothing' problem. So best avoided
entirely unless inevitable. And in this context less than a dB can make
the difference.
What I haven't (yet) done is compare 'sinusoidal spline fit' with sinc
to see how much they differ as I hadn't thought anyone would use that.
Have looked at quadratic interpolation and the distortion that causes,
though.
The problem with sine fitting is that it probably works very well indeed
*when* the input series if for a sinusoid! So may look great when tested
that way. But then not work well for other more general waveforms, like
music!
Actually I should have twigged this ages ago when I noticed that one
of the options with the ALSA (Linux) sound system is for resampling
to use a 'sine' fit. Should have rung warning bells, but I just decided
not to do that an find hardware which didn't need to resample at all.
Thus avoiding any errors due to resampling. Better if you can to avoid
processes that can introduce problems than to worry about minimising the
problems the processes can cause.
The problem with a programmer treating this as an exercise in 'getting
a smooth fit' is that this is *not* the basis in Information Theory. So
the result of a correct reconstruction may look 'less smooth' but
actually be the waveform the samples define.
I'll ask the person who said CEP does use sinc if this is stated in the
documentation for the program.
Remember that CEP started in days when processor power was at a bit of a
premium, and a programmer couldn't afford to waste cycles on errors
which were probably going to be contained within the width of the trace
for 99.99% of users.
Yes. That's fair enough. Indeed, I also often plot/display with 'join up
the dots' as it is a quick way to visualise the data sample series. It is a
quick way to see what you have.
Indeed, I have a feeling that many people didn't realise that the data can
generate peaks above all the samples until quite recently.
However I've known about the way this is a bit like a map with blank areas
on which should be stamped "Keep clear! Here be dragons!" :-) This was as
much as anything from working with data in contexts that are nowt to do
with audio. So with any recordings I make I avoid every getting any samples
above -4dBFS and then avoid scaling upwards. For me this is just good
practice.
But following the thread elsewhere (uk.tech.digital-tv) it has made me
think some people will be falling into the trap because the software
doesn't display the consequences properly and people don't know about the
problem. And some seem to feel you have to scale up to maximise the of all
the bits available, particularly when then using the result for lossy
reduction systems. Which might make the situation *worse* not better!
Slainte,
Jim
--
Please use the address on the audiomisc page if you wish to email me.
Electronics
http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio
http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc
http://www.audiomisc.co.uk/index.html