如何修改声音文件Java的音高? [英] How to modify pitch of sound file Java?
问题描述
我有一个声音文件我想修改音高。该文件存储在MP3中。我已经搜索过互联网,但未能找到任何允许我修改音调的库或算法。
I have a sound file I would like to modify the pitch of. The file is stored in an MP3. I have searched the internet but have been unsuccessful in finding any libraries or algorithms that would allow me to modify the pitch.
任何示例和/或文献都将不胜感激
Any examples and/or literature would be appreciated
推荐答案
从您的问题来看,您是否只想改变播放速度(如转盘上的音调推子)或是否要在不影响播放速度的情况下改变音高。如果是后者,则需要使用时间拉伸/音高变换算法。请参阅: http://en.wikipedia.org/wiki/Audio_time-scale/pitch_modification
It's not really clear from your question whether you only want to change the playback speed (like the pitch fader on a turntable does) or whether you want to change the pitch without affecting the playback speed. If the latter, you need to use a time stretching/pitch shifting algorithm. See: http://en.wikipedia.org/wiki/Audio_time-scale/pitch_modification
在任何情况下,您首先必须将MP3解码为PCM音频。这个主题可能会给你一些指示:
In any case, you'd first have to decode the MP3 into PCM audio. This thread might give you some pointers:
至于在Java中进行音高变换,这里有更多信息:
As for doing pitch shifting in Java, there's some more info here:
这篇关于如何修改声音文件Java的音高?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!