如何在 MIDI 文件中嵌入控制更改命令

发布于 2024-07-04 02:47:33 字数 490 浏览 9 评论 0 原文

我正在制作一个简单的游戏来学习一门新语言。 我正在为游戏收集一些音乐,并希望使用 MIDI 格式,以便我可以控制曲目的流程(即,我希望有一个只播放一次并且在以下情况下不再播放的介绍)歌曲循环播放。)

我很难找到有关如何修改现有 MIDI 文件以便它们可以向合成器发送控制更改信号的信息。 有人有这方面的经验吗?


我认为我最初的问题应该更清楚。 我正在使用现有的游戏引擎来负责播放音乐。 我的印象是,这个控制更改值必须直接嵌入到 MIDI 文件本身中,因为我无法控制合成器。 从手册:

MIDI 文件通过 DirectMusic 合成器。 如果 BGM MIDI 文件包含控制更改值 111,该值被识别为 之后歌曲将开始重复 到达终点。

我希望我能以编程方式做到这一点。 我想我在这里需要的是某种编辑器,它允许我修改我已有的 MIDI 文件。

I am making a simple game in order to learn a new language. I am in the process of collecting some music for the game and would like to use the MIDI format so that I can control the flow of the track (i.e., I would like to have an introduction that only plays once and does not play again when the song loops.)

I am having a tough time finding information on how to modify existing MIDI files so that they may send a control change signal to the synthesizer. Has anyone had experience with this?


I think that I should have been more clear with my original question. I am using an existing game engine which takes care of playing the music. I am under the impression that this control change value must be embedded directly in the MIDI file itself as I have no control over the synthesizer. From the manual:

MIDI files are played via the
DirectMusic Synthesizer. If a BGM MIDI
file contains the control change value
111, that value is recognized as where
the song will start repeating after it
reaches the end.

I wish I could do it programmatically. I suppose what I am after here is some sort of editor which will allow me to modify the MIDI file that I already have.

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

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

发布评论

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

评论(3

何时共饮酒 2024-07-11 02:47:33

听起来你真正想要的是 midi 编辑器

Sounds like what you really want is a midi editor

初懵 2024-07-11 02:47:33

尝试查看 Midi 1.0 规范

这是控制更改消息尽管看起来您正在寻找一种在软件中执行此操作的方法。 是的?

您可以尝试将其作为原始 MIDI 数据(即该表上的消息)发送,

再次查看您的问题...我的答案没那么有用...

如果我是您,我会做什么,将介绍分开自己的文件,然后您就有一个包含您想要循环的内容的文件。

您还可以查看标准 Midi 文件格式 (SMF)

try looking in the Midi 1.0 spec

Here's a table of the control change messages though it looks like you're looking for a way to do this in software. yes?

you could try just sending it as raw midi data (ie. the messages on that table)

looking over your question again... my answer is not that useful...

what I would do if I were you is separate the introduction into it's own file and then you have a file containing just what you want to loop.

you could also look at the spec for the Standard Midi File format (SMF)

悲凉≈ 2024-07-11 02:47:33

DirectMusicProducer 是如果您使用 DirectMusic 进行演奏,这可能是您最好的免费选择。 我不相信 MIDI 记录功能将包括控制更改,但您的引擎可能支持播放更灵活的分段文件。

我使用的唯一 MIDI 音序器大约在 10 年前花费了 300 美元左右(并且似乎不再存在),但我不知道有任何优质的免费 MIDI 文件音序器。 (请注意,“MIDI 编辑器”可能与“MIDI 文件编辑器”或“MIDI 音序器”不同)

DirectMusicProducer is probably your best free option if you are playing using DirectMusic. I don't believe the MIDI record feature will include control changes, but your engine may support playing segment files which are much more flexible.

The only MIDI sequencer I use cost around $300 (USD) about 10 years ago (and no longer appears to exist), but I am not aware of any good quality free MIDI file sequencers. (Note that "MIDI editor" is probably different to "MIDI file editor" or "MIDI sequencer")

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文