Sound — sampling and file size
แนะนำใหม่
21:52
ระบบตัวเลข & ข้อมูล
รูปนี้ เพลงนี้ วิดีโอนี้ ชื่อของคุณ ข้อความ ไฟล์ทุกไฟล์บนทุกอุปกรณ์ — ภายในคอมพิวเตอร์ ทั้งหมดนั้นคือเพียงเลขศูนย์และเลขหนึ่ง.…
บรรยายภาษาอังกฤษ · สลับคำบรรยายภาษาอังกฤษและภาษาจีนได้
ในบทเรียนนี้
| English | ความหมาย |
|---|---|
| analogue data/ˈænəlɒɡ ˈdeɪtə/ | ข้อมูลอนาล็อก |
| digital data/ˈdɪdʒɪtl ˈdeɪtə/ | ข้อมูลดิจิทัล |
| sampling/ˈsæmplɪŋ/ | การสุ่มตัวอย่าง |
| amplitude/ˈæmplɪtjuːd/ | แอมพลิจูด |
| sampling rate/ˈsæmplɪŋ reɪt/ | อัตราการสุ่มตัวอย่าง |
| sampling resolution/ˈsæmplɪŋ ˌrezəˈluːʃn/ | ความละเอียดของการสุ่มตัวอย่าง |
| quantisation noise/ˌkwɒntaɪˈzeɪʃn nɔɪz/ | สัญญาณรบกวนจากการทำควอนไทซ์ |
Why the phone makes you sound thin
- A telephone call samples your voice 8,000 times a second. A CD samples the same voice 44,100 times a second. Your voice has not changed; the phone simply throws away everything above about 3.4 kHz.
- That is why a phone call is perfectly intelligible and unmistakably thin: speech lives below 3.4 kHz, but the sparkle of a cymbal or a hard
ssound does not. - The choice was not laziness. It was a calculation: sample fast enough to carry speech, and no faster, because every extra sample costs bandwidth on every call in the country.
- This lesson is how a continuous sound becomes numbers, the two settings that control quality and size, and the calculation the exam asks for.
Analogue and digital
- Sound in the real world is a continuous pressure wave: analogue data 模拟数据, which varies smoothly and takes infinitely many values.
- A computer stores digital data 数字数据: discrete numbers. Converting one to the other is sampling 采样.
- Sampling measures the wave's amplitude 振幅, its height, at regular time intervals, and stores each measurement as a binary number.

The smooth wave becomes a row of numbers
Sampling ทำอะไร?
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
การสุ่มตัวอย่าง (Sampling) เปลี่ยนคลื่นอนาล็อกต่อเนื่องให้เป็นค่าดิจิทัลแบบไม่ต่อเนื่อง การกำจัดความถี่ที่หูไม่ได้ยินออกเป็นการบีบอัดแบบสูญเสียข้อมูล ซึ่งเป็นขั้นตอนที่แตกต่างกัน
The two settings
- Sampling rate 采样率 is the number of samples taken per second, measured in hertz. CD quality is 44.1 kHz; a telephone uses 8 kHz.
- Sampling resolution 采样分辨率 (sample bit depth) is the number of bits used to store each sample's amplitude. CD quality is 16 bits, giving 65,536 possible levels.
- The rate controls which pitches survive; the resolution controls how precisely each measurement is stored.
Sound sampling
y = a sin(bt + c)
การสุ่มตัวอย่างวัด คลื่นเสียง ในช่วงเวลาสม่ำเสมอ — อัตราที่สูงขึ้นจะบันทึกข้อมูลได้แม่นยำยิ่งขึ้น
อัตราการสุ่มตัวอย่างของเสียงดิจิทัลคือ:
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
อัตราการสุ่มตัวอย่าง = ตัวอย่างต่อวินาที (เฮิร์ตซ์) ส่วนจำนวนบิตต่อตัวอย่างคือความละเอียดของการสุ่มตัวอย่าง
เรียงลำดับขั้นตอนการแปลงเสียงให้เป็นไฟล์ดิจิทัล
ความยาก 3/5 · 200 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
อัตรากำหนดความถี่ในการวัด; ความละเอียดกำหนดความละเอียดในการปัดเศษของแต่ละการวัด และการปัดเศษนี้คือที่มาของสัญญาณรบกวนจากการปัดเศษ (quantisation noise)
Sound file size
- Mono is one channel; stereo is two, which doubles the size.
- A 5-second mono clip at 8 kHz and 8 bits: $8000 \times 8 \times 5 \times 1 = 320\,000$ bits, which is 40,000 bytes.
คลิปโมโนยาว 5 วินาที ถูกสุ่มตัวอย่างที่ $8000\ \text{Hz}$ ด้วยความละเอียด 8 บิต ขนาดเป็นบิตเท่าไหร่?
ความยาก 2/5 · 140 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
ขนาด $= 8000 \times 8 \times 5 \times 1 = 320\,000$ บิต
ขนาดไฟล์เสียง (บิต) = อัตราการสุ่มตัวอย่าง × ความละเอียดของการสุ่มตัวอย่าง × ระยะเวลา × ____.
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
โมโนมี 1 ช่อง, สเตอริโอมี 2 ช่อง การละเลยจำนวนช่องจะลดคำตอบของสเตอริโอลงครึ่งหนึ่ง
Worked example: a CD track
- A 10-second stereo clip is recorded at CD quality: 44.1 kHz, 16-bit. Find its size in MiB.
- $44\,100 \times 16 \times 10 \times 2 = 14\,112\,000$ bits.
- Divide by 8 for bytes: $1\,764\,000$. Divide by $1024^2$: 1.68 MiB.
- Every mark is in the working: the four factors, one division by 8, and a stated prefix. Forgetting the two channels halves the answer.
คลิปสเตอริโอยาว 10 วินาที ถูกสุ่มตัวอย่างที่ 44100 Hz ด้วยความละเอียด 16 บิต ต้องใช้จำนวนบิตเท่าไร?
ความยาก 2/5 · 140 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
$44\,100 \times 16 \times 10 \times 2 = 14\,112\,000$ บิต, ประมาณ $1.68\ \text{MiB}$ การละช่องสัญญาณทั้งสองจะลดคำตอบลงครึ่งหนึ่ง
การบันทึกแบบสเตอริโอมีขนาดใหญ่เป็นสองเท่าของการบันทึกแบบโมโนในอัตราและความละเอียดเดียวกัน
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
ช่องสัญญาณคูณขนาด: สองช่องมีจำนวนตัวอย่างสองเท่า จำนวนช่องอยู่ในสูตร
Changing the settings
- Higher sampling rate: higher pitches are captured, so the sound is more accurate, but the file is larger.
- Higher sampling resolution: each amplitude is stored in finer steps, so there is less quantisation noise 量化噪声, the roughness introduced when a smooth value is rounded to the nearest level; the file is larger.
- Lower of either: a smaller file and an audible loss of quality. As with images, answer in these terms, not "it sounds bad".
การเพิ่มอัตราการสุ่มตัวอย่างจะทำให้:
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
อัตราการสุ่มตัวอย่างที่สูงขึ้นจับความถี่ที่สูงขึ้น (คุณภาพดีขึ้น) แต่เพิ่มขนาดไฟล์
ความละเอียดการสุ่มตัวอย่างที่สูงขึ้น (บิตต่อตัวอย่างมากขึ้น) ลดสัญญาณรบกวนจากการปัดเศษ
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
บิตมากขึ้นให้ขั้นความเข้มละเอียดขึ้น ทำให้แต่ละตัวอย่างใกล้เคียงกับค่าจริงมากขึ้น — ลดเสียงรบกวนจากการตัดทอน (แต่ไฟล์ใหญ่ขึ้น)
จับคู่การเปลี่ยนแปลงแต่ละอย่างกับผลกระทบหลัก
ความยาก 2/5 · 140 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
อัตราสุ่มตัวอย่างกำหนดว่าระดับเสียงใดจะคงอยู่ได้ ความละเอียดกำหนดความแม่นยำในการจัดเก็บแต่ละตัวอย่าง
Worked example: how fast must you sample?
- The sampling rate must be at least twice the highest frequency you want to keep.
- Human hearing reaches about 20 kHz. What is the minimum rate to capture it? $2 \times 20\,000 = 40\,000$ Hz, which is why CD chose 44.1 kHz, a little above the minimum.
- A telephone samples at 8 kHz. What is the highest frequency it can carry? Half of 8 kHz, so 4 kHz, and in practice about 3.4 kHz. Speech fits; music does not.
เพื่อจับความถี่สูงสุดถึง $20\,000\ \text{Hz}$ อัตราการสุ่มตัวอย่างขั้นต่ำคือเท่าไหร่ (หน่วย Hz)?
ความยาก 2/5 · 140 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
อัตราการสุ่มตัวอย่างต้องอย่างน้อยสองเท่าของความถี่สูงสุด: $2 \times 20\,000 = 40\,000\ \text{Hz}$
โทรศัพท์สุ่มตัวอย่างที่ 8000 Hz ความถี่สูงสุดที่เป็นไปได้ตามหลักทฤษฎีคือกี่ Hz?
ความยาก 2/5 · 140 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
ครึ่งหนึ่งของอัตราการสุ่มตัวอย่าง เนื่องจากอัตราต้องอย่างน้อยสองเท่าของความถี่สูงสุดที่รักษาไว้ ในทางปฏิบัติโทรศัพท์รับส่งประมาณ 3.4 kHz
Trading quality against size
- Speech for a voice note: a low rate and resolution are enough, and the file is small.
- Music for distribution: CD settings or better, because listeners hear the difference.
- Live streaming: the rate and resolution are chosen to fit the available bandwidth, then lossy compression removes more.
- A "justify" answer names the setting, the effect on quality and the effect on size, tied to the use.
Marks that slip away
- Rate is samples per second; resolution is bits per sample. The question names one.
- Stereo is two channels. Leaving the channel count out of the formula halves every stereo answer.
- The minimum rate is twice the highest frequency wanted, not the same as it.
- Say quantisation noise, not "it sounds fuzzy". The syllabus term carries the mark.
You've got it
- sampling converts continuous analogue data into digital data by measuring the amplitude at regular intervals
- sampling rate = samples per second (CD 44.1 kHz), sampling resolution = bits per sample (CD 16)
- size in bits = rate $\times$ resolution $\times$ duration $\times$ channels; stereo doubles it
- a higher rate captures higher frequencies; a higher resolution reduces quantisation noise; either increases file size; the rate must be at least twice the highest frequency kept
เกิดปัญหาอะไรขึ้น? เฉพาะทีมเว็บไซต์เท่านั้นที่เห็นข้อมูลนี้