A program to provide an ALSA MIDI interface for the Dream Cheeky/Dream Link USB Piano, for Linux.
I wrote this program after getting the "Dream Cheeky USB Roll-up Piano" as a present. It seemed like a neat little toy, but there wasn't any sort of Linux support, and even the bundled windows software didn't provide any sort of MIDI interface.
It provides a standard ALSA MIDI port, that outputs note on and note off events on channel 0. The key of the notes and velocity is configurable from the command line.
gcc --std=c99 usbpiano.c -o usbpiano -lusb -lasound
usbpiano [OPTIONS]
-k , --key=<key>
Lowest note playable, in midi note numbers. Default is 48 (small C)
-v , --velocity=<velocity>
Velocity (volume) of notes played, 0-127. Default is 127
Here's a quick example for someone with no experience using MIDI on Linux, (as I hadn't before getting this keyboard), to at least get some sound out of the thing.
The example uses the fluidsynth synthesiser to actually output sound, and demonstrates using aconnect to connect MIDI devices together. I also use vkeybd to change the instruments.
Change the MIDI port numbers to match what they are in the aconnect output.
It requires the following software:
On debian, you need these packages (probably the same on ubuntu):
lewis@calavera:~$ sudo ./usbpiano
lewis@calavera:~$ fluidsynth -m alsa_seq -a alsa > load /usr/share/sounds/sf2/FluidR3_GM.sf2
lewis@calavera:~$ vkeyb --device alsa
lewis@calavera:~$ aconnect -i client 0: 'System' [type=kernel] 0 'Timer ' 1 'Announce ' client 14: 'Midi Through' [type=kernel] 0 'Midi Through Port-0' client 128: 'Virtual Keyboard' [type=user] 0 'Virtual Keyboard' client 130: 'USB Piano' [type=user] 0 'USB Piano Output Port' lewis@calavera:~$ aconnect -o client 14: 'Midi Through' [type=kernel] 0 'Midi Through Port-0' client 129: 'FLUID Synth (4147)' [type=user] 0 'Synth input port (4147:0)' lewis@calavera:~$ aconnect 130:0 129:0 lewis@calavera:~$ aconnect 128:0 129:0
It should be working now!
You may have to choose an instrument with vkeybd (Enable "program list" in the View menu).
Lewis Jackson - mail