默认为 0db 声级作为绝对浮点值

发布于 2024-12-09 01:40:26 字数 191 浏览 0 评论 0原文

我目前正在用 c++ 在 Window 7 上构建类似小型软件音频合成器的东西。核心引擎正在运行,在接收到 MIDI 事件后,它会播放音符、更改程序等。目前让我困惑的是输出通道的 0 db 参考声压级放在哪里。

假设合成器产生 440 Hz 的正弦波,幅度为 |0.5f| 。为了计算分贝声级,我需要设置参考级别(0 分贝)。有谁知道类似默认的东西吗?

I'm currentyl building something like a tiny software audio synthesizer on Window 7 in c++. The core engine is running and upon receiving midi events it plays notes, changes programmes, etc. What puzzles me at the moment is where to put the 0 db reference sound pressure level of the output channels.

Let's say the synthesizer produces a sinewave with 440 Hz with an amplitude of |0.5f| . In order to calculate the sound level in db I need to set the reference level (0 db). Does anyone know something like a default for this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

对岸观火 2024-12-16 01:40:26

当相对于满量程的分贝(AKA dBFS)存在问题时,零 dB 被分配给最大可能的数字电平。引用维基百科:

0 dBFS 被分配给最大可能的数字电平。[1]为了
例如,信号在任意点达到最大电平的 50%
峰值为 -6 dBFS,即低于满量程 6 dB。全峰
测量值将为负数,除非达到最大值
数字价值。

When decibel relative to full scale is in question, AKA dBFS, zero dB is assigned to the maximum possible digital level. A quote from Wiki:

0 dBFS is assigned to the maximum possible digital level.[1] for
example, a signal that reaches 50% of the maximum level at any point
would peak at -6 dBFS i.e. 6 dB below full scale. All peak
measurements will be negative numbers, unless they reach the maximum
digital value.

别把无礼当个性 2024-12-16 01:40:26

首先你需要明确单位。 dB 本身是一个比率,而不是绝对值。正如@Roman R.建议的,您可以使用 0 dB 来表示“满量程”,然后您的范围将是 0 dB(最大值)到某个负 dB 值,该值对应于您感兴趣的最小值(例如 -120分贝)。然而,这只是一个任意测量,它不会告诉您有关信号绝对值的任何信息。

在您的问题中,您提到的是dB SPL(SPL = 声压级),它一个绝对单位。 0 dB SPL 通常定义为 20 µPa (RMS),大约是人类听力的阈值,在这种情况下,感兴趣的范围可能是 -20 dB SPL 到 +120 dB SPL。然而,如果您确实想要测量 dB SPL 而不仅仅是任意 dB 值,那么您将需要校准系统以考虑麦克风增益、麦克风频率响应、AD 灵敏度/增益以及各种其他因素。这很重要,但如果您确实想要实现某种 SPL 测量系统,则至关重要。

First you need to be clear about units. dB on its own is a ratio, not an absolute value. As @Roman R. suggested, you can just use 0 dB to mean "full scale" and then your range will be 0 dB (max) to some negative dB value which corresponds to the minimum value that you are interested in (e.g. -120 dB). However this is just an arbitrary measurement which doesn't tell you anything about the absolute value of the signal.

In your question though you refer to dB SPL (SPL = Sound Pressure Level), which is an absolute unit. 0 dB SPL is typically defined as 20 µPa (RMS), which is around the threshold of human hearing, and in this case the range of interest might be say -20 dB SPL to say +120 dB SPL. However if you really do want to measure dB SPL and not just an arbitrary dB value then you will need to calibrate your system to take into account microphone gain, microphone frequency response, A-D sensitivity/gain, and various other factors. This is non-trivial, but essential if you actually want to implement some kind of SPL measuring system.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文