音频重新$ P $如何psented用数字? [英] How is audio represented with numbers?

查看:168
本文介绍了音频重新$ P $如何psented用数字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢对一切事物如何能和重新用数字psented $ P $。例如,明文是由code像ASCII psented重新$ P $和图像重新由RGB值psented $ P $。这些都是重新present文本和图像的最简单的方法。

I like thinking about how everything can be and is represented by numbers. For example, plaintext is represented by a code like ASCII, and images are represented by RGB values. These are the simplest ways to represent text and images.

那是什么声音可以重新与数字psented $ P $最简单的方法?我想学习如何编写音频工作,并认为这将是一个良好的开端方案。我似乎无法在互联网上找到任何好的解释,虽然。

What is the simplest way that audio can be represented with numbers? I want to learn how to write programs that work with audio and thought this would be a good way to start. I can't seem to find any good explanations on the internet, though.

推荐答案

在身体上,你可能知道,音频振动。通常情况下,我们
谈到approximitely在20Hz和20,000Hz之间的空气振动。
这意味着空气被向后移动并每要求20至20000倍
第二。

Physically, as you probably know, audio is a vibration. Typically, we're talking about vibrations of air between approximitely 20Hz and 20,000Hz. That means the air is moving back and forth 20 to 20,000 times per second.

如果你测量振动并将其转换成电信号
(比如,使用麦克风),你会得到的电信号
电压在相同的波形的声音变化。在我们的纯音
假设,该波形将匹配正弦函数的

If you measure that vibration and convert it to an electrical signal (say, using a microphone), you'll get an electrical signal with the voltage varying in the same waveform as the sound. In our pure-tone hypothetical, that waveform will match that of the sine function.

现在,我们有一个模拟信号的电压。还没数字。但我们
知道(例如)-1V和+ 1V之间的电压而变化。我们可以的
当然,附加电压表的电线和读取的电压。

Now, we have an analogue signal, the voltage. Still not digital. But, we know this voltage varies between (for example) -1V and +1V. We can, of course, attach a volt meter to the wires and read the voltage.

随意,我们将改变我们的电压表的规模。我们将多
伏由32767现在要求-1V的 -32767 的和+ 1V的 32767 的。哦,
它会四舍五入为最接近的整数。

Arbitrarily, we'll change the scale on our volt meter. We'll multiple the volts by 32767. It now calls -1V -32767 and +1V 32767. Oh, and it'll round to the nearest integer.

现在,我们勾我们伏特计到计算机,并指示计算机
查电表每秒44,100次。添加第二个电压表(适用于
其他的立体声道),而我们现在有那张音频数据
CD。

Now, we hook our volt meter to a computer, and instruct the computer to read the meter 44,100 times per second. Add a second volt meter (for the other stereo channel), and we now have the data that goes on an audio CD.

此格式被称为的立体声44,100赫兹,16位线性PCM 的。而且它真的是
只是一堆电压测量。

This format is called stereo 44,100 Hz, 16-bit linear PCM. And it really is just a bunch of voltage measurements.

这篇关于音频重新$ P $如何psented用数字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆