简体   繁体   English

音频采样频率音高

[英]audio sample frequency pitch

Im trying to find out how to change the pitch of a block of samples. 我试图找出如何更改一个样本块的音高。 So far ive been using the smbPitchShift code yet but someone told me pitch shifting can be done in a simple conversion of frequency. 到目前为止,我尚未使用smbPitchShift代码,但是有人告诉我,音调转换可以通过简单的频率转换来完成。

Say right now i have a block of 2000 samples running at frequency 44100hz. 现在说,我有一个以44100hz频率运行的2000个样本块。 How do i manage to shift the pitch by 2 octaves up (24 semitones) ? 我如何将音调调高2个八度(24个半音)? This guy told its just a conversion of 1/frequency, which i dont really understand. 这个家伙告诉它只是1 /频率的转换,我不太了解。

Its a VST plugin im trying to develop in C++. 它是一个VST插件,正在尝试用C ++开发。

Thanks. 谢谢。

This is not as simple as it sounds... 这并不像听起来那么简单...

if you do not need to keep the formants one way is time stretch 4x your sample and at the end resample (interpolate) by 4, this step pitch shift your audio. 如果您不需要让共振峰保持一种方式,那就是将时间拉伸4倍于采样,最后以4倍进行重采样(内插),此步距将使音频移位。

To strech you usually need some pitch track algorithm, in time domain some know codes are PSOLA, WSOLA, TDHS, SOLA, VSOLA... 要进行伸展运动,通常需要一些音高跟踪算法,在时域中一些已知的代码是PSOLA,WSOLA,TDHS,SOLA,VSOLA ...

To strech in frequency domain you can use phase vocoder. 要在频域中拉伸,可以使用相位声码器。

Remember without formants will produce Demon/chipmunk effect. 请记住,没有共振峰会产生恶魔/花栗鼠效果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM