Linux Dream Cheeky Roll-Up Piano Driver Code
Brought to you by:
lewisj
File | Date | Author | Commit |
---|---|---|---|
LICENSE | 2008-12-30 | lewisj | [r1] Initial import |
README | 2008-12-30 | lewisj | [r1] Initial import |
usbpiano.c | 2008-12-30 | lewisj | [r1] Initial import |
usbpiano.c by Lewis Jackson <lewis@boxen.co.uk> A program to provide an ALSA MIDI interface for the Dream Link/Dream Cheeky USB Piano, for Linux. Description: 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. Requires: libusb - http://libusb.sourceforge.net libasound2 - http://www.alsa-project.org Compiling: gcc --std=c99 usbpiano.c -o usbpiano -lusb -lasound Command line Usage: usbpiano [OPTIONS] -k <key>, --key=<key> Lowest note playable, in midi note numbers. Default is 48 (small C) -v <velocity>, --velocity=<velocity> Velocity (volume) of notes played, 0-127. Default is 127 Example: 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: alsa-utils: http://www.alsa-project.org fluidsynth: http://fluidsynth.resonance.org keybd: http://www.alsa-project.org/~tiwai/alsa.html#vkeybd On debian, you need these packages (probably the same on ubuntu): alsa-utils fluidsynth fluid-soundfont-gm vkeybd --- 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 vkeyb (Enable "program list" in the View menu).