八度音阶中特定音符的 OpenAl 音高值
我的 iPhone 应用程序上有一个 OpenAl 声音引擎。当我播放已加载的声音时,我可以控制它的音调。
在 OpenAl 中,音高设置为 1.0 没有任何效果。如果将其加倍到 2.0,它将演奏高 1 个八度的音符(12 个半音)。如果将其减半至 0.5,则会降低一个八度(12 个半音)。
所以,我的原始样本正在演奏 C。我假设如果我将 1 除以 12(半音),我可以获得该八度音阶中各个音符的音高。但事实似乎并非如此。这使我们认为半音不是相等的值。这是真的吗?
有人知道如何计算八度音阶中各个音符的 openAl 音高值吗?
谢谢
I have an OpenAl sound engine on my iPhone app. When I play a sound that I have loaded, I can control it's pitch.
In OpenAl a pitch set to 1.0 has no effect. If you double it to 2.0, it plays the note 1 octave higher(12 semitones). If you halve it, to 0.5, it will be an octave lower (12 semitones).
So, my original sample is playing a C. I assumed that if I divide 1 by 12 (semitones) I could get the pitch for the individual notes in that octave. But this does not seem to be the case. Which makes we think that semitones are not equal values. Is that true?
Does anyone know how I can work out the openAl pitch value for individual notes in an octave?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
半音是等比。因此,如果您的示例是 C,则 C# 将是 2 的 12 次方根。如果计算半音 C=0、C#=1 等,则比率为
pow(2.0, n*1.0/12.0)
对于负数也适用。
我应该指出,并非每个调整方案都严格如此......但这是一个好的开始。如果您真的关心音乐调音的全部复杂性,我可以为您找到一些参考资料。
Semitones are equal ratios. So, if your sample is C, C# will be the 12th root of two. If you count semitones C=0, C#=1 etc, the ratio is
pow(2.0, n*1.0/12.0)
Works for negative numbers, too.
I should note, this is not strictly true in every tuning scheme... but this is a good start. If you really care about the full complexities of musical tuning, I can find you some references.