如何通过操作 MIDI 数据来更改音频文件的音高

发布于 2025-01-04 15:01:52 字数 69 浏览 4 评论 0原文

我有音频文件的 midi 文件。我想知道应该更改该 MIDI 文件的哪些组件,以便以比原始音高更高/更低的音调播放该音频文件

I have the midi file for an audio file . I want to know what components of that MIDI file should I change in order to play that audio file at a higher/lower pitch than the original pitch

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

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

发布评论

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

评论(2

就是爱搞怪 2025-01-11 15:01:52

你的问题很难理解。 MIDI 文件不“播放”音频文件。我假设您正在渲染 MIDI 文件以创建音频文件。

要更改 MIDI 文件的音高,请将 MIDI 文件中的所有音符单独移调为更高或更低的音高。

David 的 MIDI 规范 可能可以作为快速参考。

Your question is difficult to understand. MIDI files don't "play" audio files. I assume you are rendering the MIDI file to create an audio file.

To change the pitch of your MIDI file, transpose all notes individually in the MIDI file to a higher or lower pitch.

David's MIDI spec might be useful as a quick reference.

故人爱我别走 2025-01-11 15:01:52

在MIDI标准中,您可以通过发送弯音短消息来控制音高。

Java 中的应该是这样的

int pitchBendValue;
long eventMoment;
ShorMessage pitchMessage = new ShortMessage();
pitchMessage.setMessage(ShortMessage.PITCH_BEND, channel, 7, pitchBendValue);
receiver.send(pitchMessage, eventMoment);

In the MIDI standard, you can control the pitch by sending a pitch bend short message.

This is how it should look like in Java:

int pitchBendValue;
long eventMoment;
ShorMessage pitchMessage = new ShortMessage();
pitchMessage.setMessage(ShortMessage.PITCH_BEND, channel, 7, pitchBendValue);
receiver.send(pitchMessage, eventMoment);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文