Page 1 of 2

Choosing samplerates

Posted: Thu Nov 05, 2009 2:15 am
by pollux
Hi,

after a discussion in the Sonar forums regarding sample rates, I did some reserach about the Nyquist - Shannon theorem, in which both, analog audio digitizing, and digital audio restoring to analog, are based.

What it basically says, it's that higher sample rate does not mean better resolution, and that samplerate should be chosen based on the required bandwidth (twice the required bandwidth).
Given that the huma ear cannot hear above 22KHz, a 44.1KHz samplerate is perfectly enough, and there will not be any true benefit from higher sample rates (it's even worse because higher samplerates are less accurate).
this article explains it very well.


It also explains why sampling at higher rates is not necessaily the best solution, and also explains the difference between samplig rate and oversampling.


Have a good reading :)

Re: Choosing the right samplerate

Posted: Thu Nov 05, 2009 2:33 am
by dawman
I have always used 44.1 but w/the XITE-1 I have noticed the 96k rate allows a really large mix of ASIO channels with much more clarity. But I am basing this on the sampled sounds which were recorded at 44.1 that are converted.
I fired up the rig at the gig one night and was tripping because everything sounded different to me and I couldn't put my finger on the problem. Then I used the B2003 for a different setting other than the Tarkus setting which has no Scanner Vibrato and whoah...The Vibrato now sounded twice as loud and had a mono sound to it.
On the break I realized I was using 32k and immediately switched back to 44.1.
I will never change that setting again. I believe I was trying to get a huge mix to fit on a single chip...
Nice Links
Ankyu

Re: Choosing the right samplerate

Posted: Thu Nov 05, 2009 5:01 am
by pollux
stardust wrote:This is again the kind of magic and vodoo that usually only trained ears will hear and typically also only in A/B comparisons.
There have been several blind A/B tests done in treated rooms with high end equipment, and well trained ears were not able to distinguish 48 KHz from 96 KHz :)

Anyway, I don't intend to start yet another my <<put whatever you want here>> is bigger than yours war or anything like that.. ultimate judge can only be the ears.. :)

I just found the reading interesting and wanted to share it :)

Re: Choosing the right samplerate

Posted: Thu Nov 05, 2009 6:38 am
by petal
Well, you may not be able to tell a 96khz recording from a 44.1khz recording, but this isn't the only issue to consider.

There's also the benefits of working and producing at a higher samplerate, where you tend to use quite a few effects. If you use effects at a higher samplerate the end result will have less unwanted artifacts, because the samplerate area where they are usually produced when you are fx filtering a signal, are moved well up above frequencies that you can actually hear.

Also oscilators working at a higher samplerate, tend to be more smooth and refined in it's quality. Just try to hear the difference between 44.1Khz and 96Khz in modular on a simple filtered saw-oscilater - Everybody will be able to tell the difference there, even if both results are recorded at 44.1 Khz.

Re: Choosing the right samplerate

Posted: Thu Nov 05, 2009 6:55 am
by pollux
this article talks about digitalizing a signal, and restoring it back to analog from the samples.

digital oscillators are a different thing, and they probably benefit from higher sample rates, as they are running a math function to produce a signal, not running a math function to restore audio from samples.

As for FX, it's also true that some FX, like EQs and resonant filters will work better with higher sample-rates, because they need "infinite" bandwidth:
http://emusician.com/mag/emusic_debunking_digitalaudio_myths/ wrote: Analog audio has a theoretically infinite frequency range, whereas digital audio (software and hardware) has a hard limit on high frequencies, as determined by the sample rate.

Many analog processes take “infinite” frequency range for granted, but they can't do the same in the digital domain. For example, a standard analog peaking EQ has a bell curve that is symmetrical around the center frequency; one side slopes to 0 Hz, and the other slopes toward infinite Hz.

You can implement the same EQ in the digital domain, but infinity is suddenly much closer. In fact, what was infinite Hz is now the Nyquist frequency (half the sampling rate) or 22.05 kHz at a sampling rate of 44.1 kHz. This difference in the proximity of infinity results in an EQ curve with a dramatically lopsided shape (see Fig. 6).

Things can get stranger as the EQ's center frequency approaches the Nyquist frequency. At those high frequencies, I've seen digital EQs that started to take on weird globular shapes and even go down in actual frequency as I turned up the frequency knob. I've even encountered a peaking EQ that looked much more like a resonant highpass filter.

Those problems can be avoided or at least minimized by clever programming. The degree to which the programmer is successful defines, to a great extent, the differences between good and bad digital EQs.

...

Compressors and limiters also have frequency-related issues. You're probably familiar with aliasing — it causes audio artifacts when sampled audio contains frequencies higher than the Nyquist frequency. Aliasing doesn't occur only during sampling, however; it can also happen entirely within the digital domain.

For instance, compression and limiting work by modulating one audio-rate signal (the input) with another audio-rate signal (the compressor or limiter's automatic gain control, which operates in the audio range when the attack and release envelope times are fast). When you modulate one audio-rate signal with another, it has the effect of adding the two signals' frequencies; if the total exceeds the Nyquist frequency, you'll get some aliasing.

A full-bandwidth audio signal processed with a limiter or a compressor with fast attack or decay times falls into that category; the faster the attack or release and the greater the compression or limiting amount, the more aliasing you hear. That is the cause of the crunchiness many people hear in digital-dynamics processors. Again, clever programming, especially oversampling, can minimize these aliasing artifacts.

You'll find similar predicaments in synths. Resonant filters suffer from the same infinity-is-much-too-close syndrome as digital EQs, and various synths differ widely in their success at addressing the problem. For instance, standard Chamberlin digital filters (the most common type) only work correctly to about one-sixth of the sampling rate. For a synthesizer running at 44.1 kHz, that means the resonance tops out at about 7 kHz.

Oscillators have problems similar to compressors. For example, a square wave at, say, 4 kHz is actually generating frequencies well above the Nyquist limit, because of the waveform's sharp edges. Untamed, that can cause excruciating aliasing, especially toward the top of the keyboard (as you can hear in some popular products). Similar aliasing can also happen when samples are transposed above their original pitches. Techniques for dealing with these complications vary and account for some of the sonic differences among synthesizers.

This said, nothing prevents from recording at 48, and oversampling at 96 ;)

Re: Choosing samplerates

Posted: Thu Nov 05, 2009 12:02 pm
by basati
for me it is a miracle how the human ears tell us a 10 khz frequency sounds nice -
only digitaly reproduced by 4,41 samples at 44khz
:-? :roll:

that is very far away from a analog (sinus-) wave...


the "miracle" scope for me sounds very well at every samplerate. 8)

Re: Choosing samplerates

Posted: Fri Nov 06, 2009 6:43 am
by astroman
You think you can tell a 10khz sine from a 10khz square ? :lol:
get a hi-q signal generator and try it yourself - you'll be amazed... :o
to save you the effort:
one can't tell any waveform from another witout at least one or two harmonics
it's the overtone spectrum that allows us to classify and to distinguish.

which brings me back to the topic:
again it's the 'overtone spectrum' that makes all the difference between (say) 96 and 44.1k
The aliasing artifacts (as mentioned in Pollux' quote) are perceived as an alteration of the original spectrum.

You will judge an equally well built 96k system as 'more pronounced, more transparent' than it's 44.1 counterpart.
I once had the opportunity to listen to John Bowen's Solaris hardware synth (running at 96) and the different soundprint was immediately obvious (I have the Scope version).

cheers, Tom

Re: Choosing samplerates

Posted: Fri Nov 06, 2009 8:08 am
by dawman
That's the biggest selling point of Solaris IMHO. The software is an incredible sounding synth and has more advantages as far as the amount of Oscillators and endless RAM for the Wav ( Sample ) Oscillator, but once you play the hardware synth, it's quite a leap in terms of sound quality. But it's not just a boost to the audio, the entire signal path and internal processing is @ 96k. It loads faster, and all parameters respond in realtime as hardware should, and actually makes my old Oberheim XPander totally unnecessary. The fact it took on the XPanders UI and expanded the idea is another feature unavailable on other synths.
I am curious what the quality of the XITE-1 will sound like @ 96k if the hardware Solaris is routed via digital I/O and use the internal FX...? I am anxiuos. If it loses it's 96k shine my powered monitors have multiple I/O's and I can run it seperately along side of the XITE-1.
The 16 voices can be unison stacked also with a value of 2 for really thick natural detuning and still have 8 voices.
Anyone who owns a Bowen synth should be proud knowing they were directly/indirectly involved in this synths development. I believe 96k will be the next move for other hardware developers after hearing this.

Re: Choosing samplerates

Posted: Fri Nov 06, 2009 4:25 pm
by astroman
stardust wrote:Yes, for the generation part this is undoubted as said by pollux...
in fact I found that restriction quite irritating as (to a varying degree) aliasing is a part of any digital signal conversion.
Unless you define sample playback as an oscillator... which it is of course... after all :D
Anyway, what I mean is that the ear is much more sensitive (to spectral content) than one would expect in the first place
Tiny amounts of distortion folded back into the audible range are noticed quite well, though one usually cannot exactly describe what it is and bails out of the dilemma with a 'the sound is colored' statement.
Not all aliasing and distortion is necessarily bad, some is called 'character' ;)

cheers, Tom
the link is interesting, physics can be funny...

Re: Choosing samplerates

Posted: Sat Nov 07, 2009 10:51 am
by basati
to astromen


I never heard that hq signal generator-thing.
and overtones are also reproduced with a few samples...


I think the technic outwit the ears

I am amazed.

Re: Choosing samplerates

Posted: Sat Nov 07, 2009 4:04 pm
by astroman
basati, I had a signal generator as used for industrial measurement in mind, just to be sure that the output isn't spoiled by any side effects a simple circuit might produce.
But probably it doesn't make any difference at all.
On a 10k frequency the first harmonic is 20k, which I could hear easily as a schoolboy - today I have to crank up volume quite a bit to sense a pure 15k tone, beyond 16k there's definetely deafness on my side today... :D
From a theoretic point of view it shouldn't matter if you listen to an analog saw, sine or square even from a simple circuit.
Overtones by distortion are at the end of the audible spectrum or beyond.

On a digital setup this may be different (I actually didn't try it yet), as harmonics may fold back aliasing products into the audible range. As these harmonics are different for different waveforms, the aliasing will provide some information to distinguish the waveforms.

Funny thing is that on a very sophisticated systems you'll have much more problems to distinguish the waves than on a dead cheap one with lots of distortion and aliasing ;) :D

The ear is an extremely sensitive instrument, that outperforms 98% of all 'technology'.
One of the best microphone preamps the Telefunken V72 has some 120 dB SNR (iirc), the ear's dynamic range is 4 times 'larger' if you assume 132 dB.
The (untrained) ear cannot quantify very well, but then telling numbers isn't the biggest fun in listening to music anyway...
Take a few different preamps with (almost) identical numeric specs and you ears will still be able to tell a difference.
It's difficult to specify (or name) the listening result, but you can clearly distinguish the amps.

To give you a less abstract idea of what I'm talking about check the audio examples in the preamp section of http://www.basstasters.com
Some (but not all) amplifiers have been recorded with the same bass, pickups and strings so you hear (mostly) the difference between the amps.

cheers, Tom

Re: Choosing samplerates

Posted: Sat Nov 07, 2009 7:28 pm
by Neutron
i have always noticed more difference with bit depth than bitrate, i use 44.1 so i can get more out of my cards. if i had an xite, i would probably use a higher rate on projects with a lot of cymbals or other high frequency content though.

what you might notice, when you have a very high note. even though we can not hear over a certain frequency, at 44.1 you can tell the difference between a sine wave and a square wave at the highest pitch you can hear, not because your ears could hear the difference with a natural sound, but because the samples do not "line up" perfectly with the waveform.

Some waves might have 2 samples at maximum then 3 at minimum, and a little later there might be 4 at maximum and 1 at minimum as this varies you would hear a subharmonic "beat frequency" (aliasing) which can not be completely gotten rid of except with a perfect (non existant) analog filter on the DAC output. fortunately music usually does not have steady high piched tones in it and is dynamic, but the output IS being distorted.

its only a very minor problem though and most people will never notice it unless they bough a walmart dvd player for $29.99

Re: Choosing samplerates

Posted: Sun Nov 08, 2009 3:10 am
by astroman
Neutron wrote:... what you might notice, when you have a very high note. even though we can not hear over a certain frequency, at 44.1 you can tell the difference between a sine wave and a square wave at the highest pitch you can hear, not because your ears could hear the difference with a natural sound, but because the samples do not "line up" perfectly with the waveform.

... you would hear a subharmonic "beat frequency" (aliasing) which can not be completely gotten rid of except with a perfect (non existant) analog filter on the DAC output. ...
exactly what I wrote about the tone generator, in case one would try it with Modular (or any other sound source in software)
but the non-existent perfect analogue filter is only needed at 44.1k

at 96k these mysterious side effect are entirely beyond the audible range and the filter can be very simple
more simple=less money
...that's the way they do it, that's the way... (Knopfler's guitar sets in) :D

I'm really convinced you don't hear any increase of a more 'precisely' processed waveform, but just the lack of the aliasing at 96k
Neutron wrote:i have always noticed more difference with bit depth than bitrate, i use 44.1 so i can get more out of my cards.
this is absolutely correct, if you have high dynamics on your track, even more with intended distortion... ;)

cheers, Tom

Re: Choosing samplerates

Posted: Sun Nov 08, 2009 9:11 am
by sharc
I always run at 44kHz as I've got several pieces of external gear connected via ADAT. I can also fit bigger projects on the DSP's that way. I've tried 24/96 settings in the past when mixing & recording internally on VDAT and it definitely sounds better, although I'm not sure if the downsampled end product would be better or worse than if it was recorded at 16/44. Probably would depend on chosen method/algo for downsampling.

I can remember many years ago I always preferred recording to DAT at 48kHz as A/B tests showed that it clearly sounded better, but then when I got the DAT 'professionally' mastered to CD it was a big disappointment.
stardust wrote:I found these excellent demos for what resampling aliasing can do with high frequency harmonics and in A/B comparisons you can hear it. :)
Interesting link there Stardust. I think I've seen that one before. Funnily enough I've never been that bothered about 'perfect' quality reproduction when it comes to samplers. I've always been more interested in character introduced by different samplers and their filters, especially grungy characteristics introduced by older lo-fi options. I suppose some people probably look at recording in the same way.

Re: Choosing samplerates

Posted: Sun Nov 08, 2009 11:04 am
by dawman
I also still enjoy hardware effects and samplers using 8bit & 12bit from the early '80's like the Ensoniq Mirage. But even better because of it's editablity was tha Akai S612.
That was a real FuzzBox.
I sold my ancient PrimeTime and I miss it. It had the best tails for a delay, also 10/12bit.

Re: Choosing samplerates

Posted: Sun Nov 08, 2009 11:10 am
by astroman
that's why I still prefer the original A16 with it's 18/16bit converters - for sure not the most transparent thing on earth... but sounds good to my ears :D

Re: Choosing samplerates

Posted: Sun Nov 08, 2009 12:32 pm
by astroman
imho one should have at least some acoustic 'picture' in mind when adding up sources to a track.
Only high end sound generators (synths, drum samples, instrument libs) from the same origin (usually) sounds boring to my ears.
I even have reserved a stereo pair to route back from SFP to a Rocktron Intellifex (delays, reverb, chorus) because it has a different sound print than Scope FX.
When I heard the unit for the first time I immediately fell in love with that tone.
Why should I tweak if there's something that provides it right out of the box ?

One of my basses has a rather dirty tone by nature, no need for ultra-transparency on that side.
I try to balance quality with character somehow.
The bass has an excellent (clean sound) preamp btw - when I find the time, I'll risk a channel or two of the A16 by connecting the preamp out directly to the converters, avoiding the internal opamps.
It's a transformer balanced thing, so no direct harm to expected... well at least that's my guess... :D

cheers, Tom