Sampling (signal processing): Difference between revisions

Content deleted Content added
Zbiggy (talk | contribs)
Tag: Reverted
Rescuing 4 sources and tagging 0 as dead.) #IABot (v2.0.9.5
 
(15 intermediate revisions by 8 users not shown)
Line 16:
Functions of space, time, or any other dimension can be sampled, and similarly in two or more dimensions.
 
For functions that vary with time, let <math>s(t)</math> be a continuous function (or "signal") to be sampled, and let sampling be performed by measuring the value of the continuous function every <math>T</math> seconds, which is called the '''sampling interval''' or '''sampling period'''.<ref>{{cite book | title = Communications Standard Dictionary | author = Martin H. Weik | publisher = Springer | year = 1996 | isbn = 0412083914 | url = https://books.google.com/books?id=jxXDQgAACAAJ&q=Communications+Standard+Dictionary }}</ref><ref name=Moir>{{cite book | title = Rudiments of Signal Processing and Systems | author = Tom J. Moir | publisher = Springer International Publishing AG | year = 2022|pages=459 | isbn = 9783030769475 | url = https://public.ebookcentral.proquest.com/choice/publicfullrecord.aspx?p=6809637|doi=10.1007/978-3-030-76947-5 }}</ref> Then the sampled function is given by the sequence:
: <math>s(nT)</math>, for integer values of <math>n</math>.
{{anchor|Sampling rate}}The '''sampling frequency''' or '''sampling rate''', <math>f_s</math>, is the average number of samples obtained in one second, thus <math>f_s=1/T</math>, with the unit ''samples per second'', sometimes referred to as [[hertz]], for example 48&nbsp;kHz is 48,000 ''samples per second''.
Line 60:
}}</ref> such as when recording music or many types of acoustic events, audio waveforms are typically sampled at 44.1&nbsp;kHz ([[Compact Disc Digital Audio|CD]]), 48&nbsp;kHz, 88.2&nbsp;kHz, or 96&nbsp;kHz.<ref>{{cite book |url=https://books.google.com/books?id=WzYm1hGnCn4C&pg=PT200 |pages=200, 446 |last=Self |first=Douglas |title=Audio Engineering Explained |publisher=Taylor & Francis US |year=2012 |isbn=978-0240812731}}</ref> The approximately double-rate requirement is a consequence of the [[Nyquist theorem]]. Sampling rates higher than about 50&nbsp;kHz to 60&nbsp;kHz cannot supply more usable information for human listeners. Early [[professional audio]] equipment manufacturers chose sampling rates in the region of 40 to 50&nbsp;kHz for this reason.
 
There has been an industry trend towards sampling rates well beyond the basic requirements: such as 96&nbsp;kHz and even 192&nbsp;kHz<ref>{{cite web |url=http://www.digitalprosound.com/Htm/SoapBox/soap2_Apogee.htm |title=Digital Pro Sound |access-date=8 January 2014 |archive-date=20 October 2008 |archive-url=https://web.archive.org/web/20081020231427/http://www.digitalprosound.com/Htm/SoapBox/soap2_Apogee.htm |url-status=dead }}</ref> Even though [[Ultrasound|ultrasonic]] frequencies are inaudible to humans, recording and mixing at higher sampling rates is effective in eliminating the distortion that can be caused by [[Aliasing#Folding|foldback aliasing]]. Conversely, ultrasonic sounds may interact with and modulate the audible part of the frequency spectrum ([[intermodulation distortion]]), ''degrading'' the fidelity.<ref>{{cite journal|last=Colletti|first=Justin|date=February 4, 2013|title=The Science of Sample Rates (When Higher Is Better—And When It Isn't)|url=https://sonicscoop.com/2016/02/19/the-science-of-sample-rates-when-higher-is-better-and-when-it-isnt/?singlepage=1|journal=Trust Me I'm a Scientist|access-date=February 6, 2013|quote=in many cases, we can hear the sound of higher sample rates not because they are more transparent, but because they are less so. They can actually introduce unintended distortion in the audible spectrum}}</ref> One advantage of higher sampling rates is that they can relax the low-pass filter design requirements for [[analog-to-digital converter|ADCs]] and [[digital-to-analog converter|DACs]], but with modern oversampling [[Delta-sigma modulation|delta-sigma-converters]] this advantage is less important.
 
The [[Audio Engineering Society]] recommends 48&nbsp;kHz sampling rate for most applications but gives recognition to 44.1&nbsp;kHz for CD and other consumer uses, 32&nbsp;kHz for transmission-related applications, and 96&nbsp;kHz for higher bandwidth or relaxed [[anti-aliasing filter]]ing.<ref name=AES5>{{citation |url=http://www.aes.org/publications/standards/search.cfm?docID=14 |title=AES5-2008: AES recommended practice for professional digital audio – Preferred sampling frequencies for applications employing pulse-code modulation |publisher=Audio Engineering Society |year=2008 |access-date=2010-01-18}}</ref> Both Lavry Engineering and J. Robert Stuart state that the ideal sampling rate would be about 60&nbsp;kHz, but since this is not a standard frequency, recommend 88.2 or 96&nbsp;kHz for recording purposes.<ref>{{Cite web|url=http://www.lavryengineering.com/pdfs/lavry-white-paper-the_optimal_sample_rate_for_quality_audio.pdf|title=The Optimal Sample Rate for Quality Audio|last=Lavry|first=Dan|date=May 3, 2012|website=Lavry Engineering Inc.|quote=Although 60&nbsp;KHz would be closer to the ideal; given the existing standards, 88.2&nbsp;KHz and 96&nbsp;KHz are closest to the optimal sample rate.}}</ref><ref>{{Cite web|url=https://www.gearslutz.com/board/showpost.php?p=7883017&postcount=15&s=b05e50b41d1789054724882582d8351b|title=The Optimal Sample Rate for Quality Audio|last=Lavry|first=Dan|website=Gearslutz|language=en|access-date=2018-11-10|quote=I am trying to accommodate all ears, and there are reports of few people that can actually hear slightly above 20KHz. I do think that 48&nbsp;KHz is pretty good compromise, but 88.2 or 96&nbsp;KHz yields some additional margin.}}</ref><ref>{{Cite web|url=https://www.gearslutz.com/board/showpost.php?p=1234224&postcount=74|title=To mix at 96k or not?|last=Lavry|first=Dan|website=Gearslutz|language=en|access-date=2018-11-10|quote=Nowdays [sic] there are a number of good designers and ear people that find 60-70KHz sample rate to be the optimal rate for the ear. It is fast enough to include what we can hear, yet slow enough to do it pretty accurately.}}</ref><ref>{{Cite book|title=Coding High Quality Digital Audio|last=Stuart|first=J. Robert|date=1998|quote=both psychoacoustic analysis and experience tell us that the minimum rectangular channel necessary to ensure transparency uses linear PCM with 18.2-bit samples at 58&nbsp;kHz. ... there are strong arguments for maintaining integer relationships with existing sampling rates – which suggests that 88.2&nbsp;kHz or 96&nbsp;kHz should be adopted.|citeseerx = 10.1.1.501.6731}}</ref>
Line 70:
! Sampling rate
! Use
|-
|5,512.5&nbsp;Hz
|Supported in [[Adobe Flash|Flash]].<ref>{{Cite web |date=2013 |title=SWF File Format Specification - Version 19 |url=https://open-flash.github.io/mirrors/swf-spec-19.pdf}}</ref>
|-
| 8,000&nbsp;Hz
Line 89 ⟶ 92:
| [[CD-ROM#CD-ROM XA extension|CD-XA audio]]
|-
| 44,056055.9&nbsp;Hz
| Used by digital audio locked to [[NTSC]] ''color'' video signals (3 samples per line, 245 lines per field, 59.94 fields per second = 29.97 [[frames per second]]).
|-
| [[44,100&nbsp;Hz]]
| [[Audio CD]], also most commonly used with [[MPEG-1]] audio ([[VCD]], [[SVCD]], [[MP3]]). Originally chosen by [[Sony]] because it could be recorded on modified video equipment running at either 25 frames per second (PAL) or 30 frame/s (using an NTSC ''monochrome'' video recorder) and cover the 20&nbsp;kHz bandwidth thought necessary to match professional analog recording equipment of the time. A [[PCM adaptor]] would fit digital audio samples into the analog video channel of, for example, [[PAL]] video tapes using 3 samples per line, 588 lines per frame, 25 frames per second. Practical frequency response for 44,100&nbsp;Hz sample rate is: 2 Hz - 20 kHz
|-
| 47,250&nbsp;Hz
Line 99 ⟶ 102:
|-
| [[48,000&nbsp;Hz]]
| The standard audio sampling rate used by professional digital video equipment such as tape recorders, video servers, vision mixers and so on. This rate was chosen because it could reconstruct frequencies up to 22&nbsp;kHz and work with 29.97&nbsp;frames per second NTSC video – as well as 25&nbsp;frame/s, 30&nbsp;frame/s and 24&nbsp;frame/s systems. With 29.97&nbsp;frame/s systems it is necessary to handle 1601.6 audio samples per frame delivering an integer number of audio samples only every fifth video frame.<ref name=AES5/> Also used for sound with consumer video formats like DV, [[digital TV]], [[DVD]], and films. The professional [[serial digital interface]] (SDI) and High-definition Serial Digital Interface (HD-SDI) used to connect broadcast television equipment together uses this audio sampling frequency. Most professional audio gear uses 48&nbsp;kHz sampling, including [[mixing console]]s, and [[digital recording]] devices. Practical frequency response for 48,000&nbsp;Hz sample rate is: 2 Hz - 22 kHz
|-
| 50,000&nbsp;Hz
Line 108 ⟶ 111:
|-
| 64,000&nbsp;Hz
| Uncommonly used, but supported by some hardware<ref>{{Cite web|url=http://www.rme-audio.de/en/products/hdsp_9632.php|title=RME: Hammerfall DSP 9632|website=www.rme-audio.de|access-date=2018-12-18|quote=Supported sample frequencies: Internally 32, 44.1, 48, 64, 88.2, 96, 176.4, 192&nbsp;kHz.}}</ref><ref>{{Cite web|url=https://www.pioneer-audiovisual.eu/uk/products/sx-s30dab|title=SX-S30DAB {{!}} Pioneer|website=www.pioneer-audiovisual.eu|access-date=2018-12-18|quote=Supported sampling rates: 44.1&nbsp;kHz, 48&nbsp;kHz, 64&nbsp;kHz, 88.2&nbsp;kHz, 96&nbsp;kHz, 176.4&nbsp;kHz, 192&nbsp;kHz|archive-date=2018-12-18|archive-url=https://web.archive.org/web/20181218145630/https://www.pioneer-audiovisual.eu/uk/products/sx-s30dab|url-status=dead}}</ref> and software.<ref>{{Cite web|url=https://steinberg.help/wavelab_pro/v9.5/en/wavelab/topics/master_section/master_section_customize_sample_rate_menu_dialog_r.html|title=Customize Sample Rate Menu|last1=Cristina Bachmann|first1=Heiko Bischoff|last2=Schütte|first2=Benjamin|website=Steinberg WaveLab Pro|language=en-US|access-date=2018-12-18|quote=Common Sample Rates: 64 000 Hz}}</ref><ref>{{Cite web|url=https://getsatisfaction.com/m-audio/topics/m-track-2x2m-cubase-pro-9-can-t-change-sample-rate|title=M Track 2x2M Cubase Pro 9 can ́t change Sample Rate|website=M-Audio|language=en-US|access-date=2018-12-18|quote=[Screenshot of Cubase]|archive-date=2018-12-18|archive-url=https://web.archive.org/web/20181218102147/https://getsatisfaction.com/m-audio/topics/m-track-2x2m-cubase-pro-9-can-t-change-sample-rate|url-status=dead}}</ref>
| 64 kHz sample rate is regarded by professional DAC designers as an optimal sample rate: it is fast enough to include what we can hear, yet slow enough to do it pretty accurately. Faster rate means less accuracy. 64 kHz sample rate is also the closest one to the recommended 58 kHz<ref>{{Cite book|title=Coding High Quality Digital Audio|last=Stuart|first=J. Robert|date=1998|quote=both psychoacoustic analysis and experience tell us that the minimum rectangular channel necessary to ensure transparency uses linear PCM with 18.2-bit samples at 58&nbsp;kHz. ... there are strong arguments for maintaining integer relationships with existing sampling rates – which suggests that 88.2&nbsp;kHz or 96&nbsp;kHz should be adopted.|citeseerx = 10.1.1.501.6731}}</ref> by J. Robert Stuart and 60-70 kHz<ref>{{Cite web|url=https://www.gearslutz.com/board/showpost.php?p=1234224&postcount=74|title=To mix at 96k or not?|last=Lavry|first=Dan|website=Gearslutz|language=en|access-date=2018-11-10|quote=Nowdays [sic] there are a number of good designers and ear people that find 60-70KHz sample rate to be the optimal rate for the ear. It is fast enough to include what we can hear, yet slow enough to do it pretty accurately.}}</ref>by Dan Lavry from Lavry Engineering, Inc.
Advantages:
* double of 32 kHz standard sampling frequency
* 1/3 of 192 kHz sampling frequency
* the same crystal oscillator can be used which drives 32, 48, 96, 128, 192, 256, 384 kHz sample rates so no additional cost
The conclusion of this section, then, is that both psychoacoustic analysis and experience tell us that the minimum rectangular channel necessary to ensure transparency uses linear PCM with 18.2-bit samples at 58kHz.<ref>{{cite web |last1=Stuart |first1=J. Robert |title=Coding High Quality Digital Audio |url=http://decoy.iki.fi/dsound/ambisonic/motherlode/source/coding2.pdf |publisher=Meridian Audio Ltd, Stonehill, Stukeley Meadows, Huntingdon, PE18 6ED, United Kingdom |access-date=26 January 2025}}</ref>
 
Uncommonly used, but supported by some hardware<ref>{{Cite web|url=http://www.rme-audio.de/en/products/hdsp_9632.php|title=RME: Hammerfall DSP 9632|website=www.rme-audio.de|access-date=2018-12-18|quote=Supported sample frequencies: Internally 32, 44.1, 48, 64, 88.2, 96, 176.4, 192&nbsp;kHz.}}</ref><ref>{{Cite web|url=https://www.pioneer-audiovisual.eu/uk/products/sx-s30dab|title=SX-S30DAB {{!}} Pioneer|website=www.pioneer-audiovisual.eu|access-date=2018-12-18|quote=Supported sampling rates: 44.1&nbsp;kHz, 48&nbsp;kHz, 64&nbsp;kHz, 88.2&nbsp;kHz, 96&nbsp;kHz, 176.4&nbsp;kHz, 192&nbsp;kHz}}</ref> and software.<ref>{{Cite web|url=https://steinberg.help/wavelab_pro/v9.5/en/wavelab/topics/master_section/master_section_customize_sample_rate_menu_dialog_r.html|title=Customize Sample Rate Menu|last1=Cristina Bachmann|first1=Heiko Bischoff|last2=Schütte|first2=Benjamin|website=Steinberg WaveLab Pro|language=en-US|access-date=2018-12-18|quote=Common Sample Rates: 64 000 Hz}}</ref><ref>{{Cite web|url=https://getsatisfaction.com/m-audio/topics/m-track-2x2m-cubase-pro-9-can-t-change-sample-rate|title=M Track 2x2M Cubase Pro 9 can ́t change Sample Rate|website=M-Audio|language=en-US|access-date=2018-12-18|quote=[Screenshot of Cubase]}}</ref>
|-
| 88,200&nbsp;Hz
Line 121 ⟶ 117:
|-
| 96,000&nbsp;Hz
| [[DVD-Audio]], some [[LPCM]] DVD tracks, [[BD-ROM]] (Blu-ray Disc) audio tracks, [[HD DVD]] (High-Definition DVD) audio tracks. Some professional recording and production equipment is able to select 96&nbsp;kHz sampling. This sampling frequency is twice the 48&nbsp;kHz standard commonly used with audio on professional equipment. Practical frequency response for 96,000&nbsp;Hz sample rate is: 2 Hz - 44 kHz
|-
|-
| 176,400&nbsp;Hz
Line 155 ⟶ 150:
{{See also|Audio bit depth}}
 
Audio is typically recorded at 8-, 16-, and 24-bit depth,; which yield a theoretical maximum [[signal-to-quantization-noise ratio]] (SQNR) for a pure [[sine wave]] of, approximately,; 49.93&nbsp;[[Decibel|dB]], 98.09&nbsp;dB, and 122.17&nbsp;dB.<ref>{{cite web |url=http://www.analog.com/static/imported-files/tutorials/MT-001.pdf |title=MT-001: Taking the Mystery out of the Infamous Formula, "SNR=6.02N + 1.76dB," and Why You Should Care |access-date=2010-01-19 |archive-date=2022-10-09 |archive-url=https://ghostarchive.org/archive/20221009/http://www.analog.com/static/imported-files/tutorials/MT-001.pdf |url-status=dead }}</ref> CD quality audio uses 16-bit samples. [[Thermal noise]] limits the true number of bits that can be used in quantization. Few analog systems have [[Signal-to-noise ratio|signal to noise ratios]] (SNR) exceeding 120&nbsp;dB. However, [[digital signal processing]] operations can have very high dynamic range, consequently it is common to perform mixing and mastering operations at 32-bit precision and then convert to 16- or 24-bit for distribution.
 
==== Speech sampling ====
Line 170 ⟶ 165:
* 60 / 1.001&nbsp;Hz ~= 59.94&nbsp;Hz&nbsp;– [[NTSC]] video
 
Video [[digital-to-analog converter]]s operate in the megahertz range (from ~3&nbsp;MHz for low quality composite video scalers in early gamesgame consoles, to 250&nbsp;MHz or more for the highest-resolution VGA output).
 
When analog video is converted to [[digital video]], a different sampling process occurs, this time at the pixel frequency, corresponding to a spatial sampling rate along [[scan line]]s. A common pixel sampling rate is: