用Java将弯音发送到MIDI音序器 [英] Sending pitch bend to MIDI sequencer in Java

查看:96
本文介绍了用Java将弯音发送到MIDI音序器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解启动和运行MIDI音序器的基本知识,我希望能够在播放过程中增大/减小音序的音调,但是音高弯曲是一条发送到合成器而不是音序器的消息

I understand the basics of getting a MIDI sequencer up and running and I would like to be able to increase/decrease the pitch of the sequence during playback, but pitch bend is a message that gets sent to the synthesizer, not the sequencer.

我尝试将音序器的接收器设置为合成器的发送器,当我发送弯音短消息时,音序器保持相同的音高,但随后合成器在新的音高弯曲值上播放了第二条音轨,造成了相当糟糕的效果声音.

I tried setting the sequencer's receiver to be the synthesizer's transmitter, and when I sent pitch-bend short messages, the sequencer stayed the same pitch but then the synthesizer played a second track at the new pitch bend value, creating some pretty awful-sounding music.

在播放过程中是否有一种很好的弯曲音调的方法,就像改变速度一样?

Is there a good way of bending pitch during playback like there is for changing tempo?

另一种选择(似乎有点笨拙)是在调用时可以加载具有不同键的MIDI文件的几个版本.

Another option (which seems like a big kluge) is to have a few versions of the MIDI files in different keys ready to load when called.

推荐答案

MIDI协议没有定义任何音高标准,除了音高弯曲(通常旨在将其用作临时效果而非设置方式)安排的调音.听起来您正在用Java实现序列发生器,在这种情况下,我宁愿建议您使用全局失谐首选项.然后,您只需使用默认调音(440Hz)渲染音频,然后将弯音应用到弹跳的布置中即可.有许多库可以帮助您解决问题,包括出色的 DIRAC .

The MIDI protocol doesn't define any standards for pitch, except for pitch bend which is generally intended to be used as a temporary effect rather than a way of setting the arrangement's tuning. It sounds like you are implementing a sequencer in Java, in which case I would rather suggest having a global detune preference. Then you would simply render the audio with the default tuning (440Hz) and then apply pitchbend to the bounced arrangement. There are several libraries which can do pitchbend for you, including the excellent DIRAC.

这篇关于用Java将弯音发送到MIDI音序器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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