我有RSI问题,尝试了30种不同的电脑键盘,都让我很痛苦。弹钢琴不会给我带来痛苦。我已经弹钢琴20年了,没有任何疼痛问题。我想知道是否有一种方法可以从MIDI键盘捕获MIDI并输出键盘敲击。我对MIDI一无所知,但我想要一些关于如何将这个信号转换成按键的指导。


当前回答

要解决这个问题,你需要做一些事情:

A way to capture MIDI data from your keyboard. Depending upon the interface: MIDI interface (classic) or USB MIDI interface (modern) the most likely interface is to a computer as it provides the most options. USB host microcontrollers are not as simple as just using a computer. A scheme to convert MIDI data into keystrokes. Like one user pointed out, chords are the way to go as the number of keys will not be dependent upon the number of piano keys. A way to inject a key into the operating system. This will require a low-level driver to be accurate. I have played around with applications that inject keyboard and mouse data into applications in Windows 7, and it can be flaky and depend upon whether an application is currently in focus. This is hardest part of the interface. What may work is to create a HID USB keyboard microcontroller that also has a serial interface.

串行接口将创建一个虚拟串行端口。读取MIDI数据并产生击键的软件可以向虚拟串行端口发送一个串行消息。微控制器将发送一个击键,使它看起来像一个标准的键盘输入。这将允许同时连接MIDI端口和USB MIDI键盘。

Hmmm, with this type of interface you could also simulate a mouse and use some piano keys setup for the mouse axis and buttons. The pressure could be used to determine mouse pointer velocity. So you could eliminate the mouse as well. Another benefit of this approach is any type of input device you connect could talk to the virtual serial port to produce keyboard and mouse events. So if you wanted to add other hardware such as drum pedals or a joystick it would be a matter of adjusting the program that talks to the serial interface.

Another take on the above is like some posted above to use an Arduino, but also include USB Host Shield from Sparkfun to handle USB based music keyboards. This allows the Arduino to be programmed as a keyboard or keyboard mouse combo in the boot loader chip and allows the device to act a USB host for the USB based music keyboard. Then you are covered for both types. Although, I still think the virtual serial port method is more flexible and would be easier to program in the long run. The Arduino device will be harder to change than a desktop program or service.

还有另一种可能: 单手和弦键盘已经存在。我看过关于它们的视频,但你必须确定它们是否会伤害你的手。

其他回答

有一个程序叫做GlovePIE。您可以用一种简单的脚本语言对它进行编程,而且我相信它支持MIDI。我不确定这是否符合“Java”的范畴,但它仍然是一个伟大的程序。我用它来控制使用PS3控制器的机器人。它非常强大。

通过声卡将任何外部MIDI键盘作为控制器播放,您将获得更好和更愉快的结果(无论您喜欢使用哪种操作系统和/或DAW程序)。然后将其路由到你的GB软件(或其他软件),并实时生成他们提供给你的许多声音。

如果您的声卡不支持MIDI I/O (in / out /thrus),这不是问题。您可以考虑研究和投资一个外部MIDI桌面转换器。许多配备进一步将MIDI输出转换为USB 2.0(通过传递现有的声卡)。

例如:通过电脑键盘和铅笔工具的Z和X改变键来获得“像人类一样”的装饰音效果是非常困难的。相反,你自己的手指可以用MIDI键盘在它自己的物理八度寄存器范围内演奏——立即!

我知道可能涉及预算限制。但是,一些看似便宜的“卡西欧”5型八度键盘在Radio Shack卖不到100美元(*或更少)就是你所需要的(另外,他们的一些板上声音补丁和音序器模块声音和处理其他事情也非常好)。

RadioShack MIDI键盘选项。

至于现有声卡的外部MIDI转换器,我已经为您运行了一些谷歌搜索,具体针对Mac平台:

很多外部MIDI转换信息一开始可能对你来说很麻烦,所以我把事情分解成“用户友好”的,以供你考虑和预算:

MIDI声卡

在使用DAW时,将虚拟键盘作为VST使用并没有什么错。他们有自己的位置。

但是,你听起来像个熟练的键盘手。所以,为什么不考虑我刚才提到的外部MIDI转换/键盘选项呢?

祝你好运,我希望这篇文章能给你一些对你有用的想法!

许多键盘都有一个串行端口(RS-232)连接器,向计算机发送MIDI信号。我使用一个名为“梁”的程序将串口通信转换为键盘敲击。

“梁”有一个“映射”功能,允许您将每个键一个接一个地映射到相应的击键。

这可能是你正在寻找的简单解决方案!

一个很好的。net库,完全支持midi (BASS),请访问http://www.un4seen.com。

而对于另一部分,将键盘midi音符转换为按键等,我会使用AutoItX, ActiveX/COM和DLL接口来实现autoIt。信息和下载,请登录http://www.autoitscript.com/site/autoit/

不需要编写键盘驱动程序。

您可以使用一个简单的AutoIt脚本来读取MIDI事件,请参阅MIDI输入。

您还需要MIDI UDF和模拟按键。

读取MIDI事件应该很容易,但不同的MIDI控制器(仪器)具有不同的功能。首先试着找出你的MIDI钢琴能做什么,然后看看你如何能最好地将这些功能映射到模拟qwerty键盘上。

如果你愿意,你可以在屏幕上或托盘上有一些东西来帮助你看到你正在做什么(也就是说,对于Shift, Ctrl和Alt模拟)。