深入一音频信号及其数字信号处理流程

翻译 ALLEN ⋅ 于 2020-04-25 21:30:00 ⋅ 12 阅读

这是一篇协同翻译


In this post, I'll look at the benefits of using multiple perspectives when handling signals.

A PRE-EXISTING AUDIO FILE

Let's say we have an audio file of interest. Let's load it into Audacity and zoom in a little (using View → Zoom → Zoom In, multiple times). The figure illustrates the audio signal: just a basic single-tone signal.
file

By continuing to zoom into the signal, we eventually get to the point of seeing individual samples as illustrated below. Notice that I've marked one of the samples in the figure. We'll look at this sample more detail later.
file
Looking at the signal in the neighborhood marked above we can now look at the three leftmost samples:
file
In the figure, we have three audio samples. Based on the vertical scale on the left, we can see that the leftmost sample seems to have has the value zero, right? The second and third samples have values greater than zero and less than 0.5 respectively.


Using a C++ application, I extract the first four values from the signal. So, the listing below illustrates the first four signal values as they are read in from the WAV file.

Value of signal data[0] 0.000031

Value of signal data[1] 0.136047

Value of signal data[2] 0.268311

Value of signal data[3] 0.392517

Notice in the listing, that the WAV data tells a slightly different story from Audacity. Namely, that the first sample is in fact not zero. It has the value 0.000031.

Again, this shows the merit of using different perspectives. One tool (i.e., Audacity) gives us one perspective, but another, in this case, handcrafted C++ tool gives us a more accurate view of the same data.

Let's take the experiment a little further and include some more data (7 points) in the excerpt as illustrated in the following figure.


file

What does the C++ program output for the data in this figure look like? The following listing provides the details.

Value of signal data[0] 0.000031

Value of signal data[1] 0.136047

Value of signal data[2] 0.268311

Value of signal data[3] 0.392517

Value of signal data[4] 0.505493

Value of signal data[5] 0.603577

Value of signal data[6] 0.684082

More signal values

Notice in this listing that the last value is around the 0.684 mark.

In practice, it may not be necessary to delve into such fine detail. But, it's important to note that, with the right tooling, it is feasible to do so. Using multiple tools also facilitates the cross-checking of your signal data.

点赞
回复数量: 0
    暂无评论~~
    • 请注意单词拼写,以及中英文排版,参考此页
    • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`, 更多语法请见这里 Markdown 语法
    • 支持表情,使用方法请见 Emoji 自动补全来咯,可用的 Emoji 请见 :metal: :point_right: Emoji 列表 :star: :sparkles:
    • 上传图片, 支持拖拽和剪切板黏贴上传, 格式限制 - jpg, png, gif
    • 发布框支持本地存储功能,会在内容变更时保存,「提交」按钮点击时清空
      请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!
    Ctrl+Enter