Lights support for generic Amazon keyboard

Trouble with Synthesia, your keyboard, or adapter? Think you found a bug?
When describing problems, always mention your OS and game version (shown at the bottom of the title screen).

If your keyboard has USB or MIDI ports, there is a tremendously high chance (>99%) it will work with Synthesia. See what you'll need on the keyboards page.
Post Reply
Posts: 1

Post by yingted »

I'm testing out a Vangoa keyboard, one of the US$100-US$200 generic keyboards off Amazon. They seem to have the same control module, a variable number of keys, Bluetooth, and some have lights.

Example products:
88 keys, folding, lights, 10-day shipping, US$151.99:
88 keys, folding, lights, one-day shipping, US$179.99:

They're advertised as working with POP Piano, using its "Universal Keyboard Lights" driver. Unfortunately, lights do not work out of the box with Synthesia.

The keyboard exposes two Bluetooth devices, GZUT-MUSIC, an audio device, and GZUT-MIDI, a MIDI device.
On its MIDI input, the low channels all get synthesized. Channel 10 is sound effects, and lights are switched on/off with the following:
SysEx 0x4d 0x4c 0x4e 0x45 pitch 0x02*is_on
That is, SysEx with a 6-byte data, "MLNE" followed by a pitch and a value byte. Sending 0 turns the light off, sending 1 or 2 turns it on.

One quirk is that the BLE-MIDI timestamp high bits need to be set to 0, or neither synthesizing nor lights work. Most MIDI stacks seem to do this, but bluez on Linux does not.

I tested on Windows, Android, and Linux. Lights aside, it works okay on Windows, but sometimes crashes. Android needs a special BLE-MIDI to MIDI app, and the latency is bad. Linux also needs a BLE-MIDI to MIDI app, but you can recompile bluez with --enable-midi instead. If you use bluez, you also need to zero the timestamp high bits (or just all timestamp bits) in midi.c or the device will ignore it.
Posts: 13125

Post by Nicholas »

yingted wrote: 12-06-21 11:29 am... it works okay on Windows, but sometimes crashes.
What crashes? The keyboard?
yingted wrote: 12-06-21 11:29 am... in midi.c
Which midi.c? Which source code are you using?
yingted wrote: 12-06-21 11:29 am... lights are switched on/off with the following...
I foresee the list of different proprietary key light communication methods growing longer and longer over the years. :grimace:
Posts: 13125

Post by Nicholas »

Sorry for the eight month wait on this. :?

I've tried to search for an official source of documentation for the SysEx message you described, but haven't been able to turn anything up. Even so, I went ahead and implemented it using the (very clear) description you provided, and it's available to test in the latest Synthesia 10.9 beta. If you choose "Proprietary 3 / Vangoa" from the Key Lights menu of an output device, hopefully the lights will work now.

Please let me know. Thanks!
Post Reply