There is common perception that all kinds of clipping are bad. But they are not bad, as far as your brain can't notice them.
Highest number of samples at maximum amplitude on both sides of the y axis on all channels shouldn't be more than 2. This gives the cubic spline interpolation some idea to reconstruct the clipped part and not mess it up too much.
clipping clipping
------_,O---O._-----------------------_,O._-------------
O---O' 'O---O- _,O' 'O
\ _,O---O'
-O'
With increasing samplerate, the time that the DAC is outputting the highest possible level, decreases, therefore smaller samplerates can be relatively clipped more before looking like the masterer did a poor job. But this also introduces some distortion on samplerates below around 20 kHz, although not that high, as usually done with compressors and limiters on many commercial recordings.
If the audiophiles took a look on the waveform of samples used in various MODs (Like sound modules - mainly 70's and 80's kids domain, software like Protracker, OctaMED, Screamtracker, Fasttracker or Impulsetracker was popular in 90's), they would become shocked, because people didn't mind to clip the samples to get a higher volume, or downsample them to reduce size. Most of MODs from Amiga era use only 8-bit samples, that means only 48 db of dynamic range (16-bit PCM, as on CDs, has 96 db), not taking account of noise-shaped dithering. But as the samples mix together during playback, the low samplerate (8363 Hz on C-5) of the samples is not that audible, when the output is set to something like 96 kHz. As even volume controllers are used, even the 8-bit sample depth of the samples starts to be acceptable, when the output is set to be at least 16-bit. The clipped parts get noised over by the sounds of other samples. Together is sounds like a audio cassette.
Another mandatory choice is the interpolation method. There are some:
None (each sample gets repeated until another one comes)
2-point Nearest Neighbor (slightly offset and more accurate None interpolation)
2-point Linear (just a straight line between the samples)
2-point Cosine (raised cosine between samples, kind of hybrid of Linear and Nearest Neighbor)
3-point Cubic Spline (my favorite, has nice treble, enhancing low quality samples - sort of aid for my 2.1 speakers)
Polynomials, polyphases etc. (Less treble than cubic spline, 8-kHz samples sound like from a very old tape)
2^n-point Sinc (gives the highest quality, but is very performance-demanding - 16/64-point for real-time consuming nearly half of my CPU, 256/1024-point for rendering lasting for hours)
I recommend to use the Cubic spline for real-time playback and Sinc for exporting. If you have some computing power left, you should opt for 16-point Sinc, it sound kind of better. Cubic spline creates a hill between 2 highest/lowest sample values. Cosine does a smooth hill/valley too, but with top/bottom at the sample. The actual hill/valley might be (and usually is) somewhere in the middle. While Nearest Neighbor and None produce kind of a cool dirty spiky noise when downsampling, linear sounds like excrement, because it's something in between, but still better than None when you want it to sound somewhat real. Cosine isn't often implemented in most of the software, although it might not sound bad.
All of the above can be generalized to more dimensions, but for pictures, the Bilinear or Bicosine interpolation is often better than Bicubic, because the B-spline causes the magnified image to appear more blurry than original and introduces various artifacts. For terrain interpolating, bilinear and None/Nearest (Hey there, Minecraft!) sucks, if you want it to look realistic. In 3D data matrix, tripolyphase might be the best one (speaking about for example temperature or air pressure), but I haven't done any experiments with it yet.
Highest number of samples at maximum amplitude on both sides of the y axis on all channels shouldn't be more than 2. This gives the cubic spline interpolation some idea to reconstruct the clipped part and not mess it up too much.
clipping clipping
------_,O---O._-----------------------_,O._-------------
O---O' 'O---O- _,O' 'O
\ _,O---O'
-O'
With increasing samplerate, the time that the DAC is outputting the highest possible level, decreases, therefore smaller samplerates can be relatively clipped more before looking like the masterer did a poor job. But this also introduces some distortion on samplerates below around 20 kHz, although not that high, as usually done with compressors and limiters on many commercial recordings.
If the audiophiles took a look on the waveform of samples used in various MODs (Like sound modules - mainly 70's and 80's kids domain, software like Protracker, OctaMED, Screamtracker, Fasttracker or Impulsetracker was popular in 90's), they would become shocked, because people didn't mind to clip the samples to get a higher volume, or downsample them to reduce size. Most of MODs from Amiga era use only 8-bit samples, that means only 48 db of dynamic range (16-bit PCM, as on CDs, has 96 db), not taking account of noise-shaped dithering. But as the samples mix together during playback, the low samplerate (8363 Hz on C-5) of the samples is not that audible, when the output is set to something like 96 kHz. As even volume controllers are used, even the 8-bit sample depth of the samples starts to be acceptable, when the output is set to be at least 16-bit. The clipped parts get noised over by the sounds of other samples. Together is sounds like a audio cassette.
Another mandatory choice is the interpolation method. There are some:
None (each sample gets repeated until another one comes)
2-point Nearest Neighbor (slightly offset and more accurate None interpolation)
2-point Linear (just a straight line between the samples)
2-point Cosine (raised cosine between samples, kind of hybrid of Linear and Nearest Neighbor)
3-point Cubic Spline (my favorite, has nice treble, enhancing low quality samples - sort of aid for my 2.1 speakers)
Polynomials, polyphases etc. (Less treble than cubic spline, 8-kHz samples sound like from a very old tape)
2^n-point Sinc (gives the highest quality, but is very performance-demanding - 16/64-point for real-time consuming nearly half of my CPU, 256/1024-point for rendering lasting for hours)
I recommend to use the Cubic spline for real-time playback and Sinc for exporting. If you have some computing power left, you should opt for 16-point Sinc, it sound kind of better. Cubic spline creates a hill between 2 highest/lowest sample values. Cosine does a smooth hill/valley too, but with top/bottom at the sample. The actual hill/valley might be (and usually is) somewhere in the middle. While Nearest Neighbor and None produce kind of a cool dirty spiky noise when downsampling, linear sounds like excrement, because it's something in between, but still better than None when you want it to sound somewhat real. Cosine isn't often implemented in most of the software, although it might not sound bad.
All of the above can be generalized to more dimensions, but for pictures, the Bilinear or Bicosine interpolation is often better than Bicubic, because the B-spline causes the magnified image to appear more blurry than original and introduces various artifacts. For terrain interpolating, bilinear and None/Nearest (Hey there, Minecraft!) sucks, if you want it to look realistic. In 3D data matrix, tripolyphase might be the best one (speaking about for example temperature or air pressure), but I haven't done any experiments with it yet.



.jpg)

