如何修改声音文件Java的音高? [英] How to modify pitch of sound file Java?

查看:225
本文介绍了如何修改声音文件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:

如何从MP3获取音频数据?

至于在Java中进行音高变换,这里有更多信息:

As for doing pitch shifting in Java, there's some more info here:

减慢播放音频文件而不改变其音高?

这篇关于如何修改声音文件Java的音高?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆