Virtual MIDI Piano Keyboard is a MIDI events generator and receiver. It doesn't produce any sound by itself, but can be used to drive a MIDI synthesizer (either hardware or software, internal or external). You can use the computer's keyboard to play MIDI notes, and also the mouse. You can use the Virtual MIDI Piano Keyboard to display the played MIDI notes from another instrument or MIDI file player. To do so, connect the other MIDI port to the input port of VMPK.
Gymnopédie No. 1 by E. Satie (1866–1925) played by MuseScore and VMPK in Linux
VMPK has been tested in Linux, Windows and Mac OSX, but maybe you can build it also in other systems. If so, please drop a mail to the author.
The Virtual Keyboard by Takashi Iway (vkeybd) has been the inspiration for this one. It is a wonderful piece of software and has served us well for many years. Thanks!
VMPK uses a modern GUI framework: Qt5, that gives excellent features and performance. Drumstick RT provides MIDI input/output features. Both frameworks are free and platform independent, available for Linux, Windows and Mac OSX.
The alphanumeric keyboard mapping can be configured from inside the program using the GUI interface, and the settings are stored in XML files. Some maps for Spanish, German and French keyboard layouts are provided, translated from the ones provided by VKeybd.
VMPK can send program changes and controllers to a MIDI synth. The definitions for different standards and devices can be provided as .INS files, the same format used by QTractor and TSE3. It was developed by Cakewalk and used also in Sonar.
This software is still in development. See the TODO file for a list of pending features. Please feel free to contact the author to ask questions, report bugs, and propose new features. You can use the tracking system at SourceForge project site.
Copyright (C) 2008-2015, Pedro Lopez-Cabanillas <plcl AT users.sourceforge.net> and others.
Virtual MIDI Piano Keyboard is free software licensed under the terms of the GPL v3 license.
MIDI is an industry standard to connect musical instruments. It is based on transmitting the actions performed by a musician playing some instrument to another different instrument. Musical instruments enabled with MIDI interfaces typically have two DIN sockets labeled MIDI IN and MIDI OUT. Sometimes there is a third socket labeled MIDI THRU. To connect a MIDI instrument to another one, you need a MIDI cable attached to the MIDI OUT socket of the sending instrument, and to the MIDI IN of the receiving one. You can find more information and tutorials like this one all around the Net.
There are also hardware MIDI interfaces for computers, providing MIDI IN and OUT ports, where you can attach MIDI cables to communicate the computer with external MIDI instruments. Without needing hardware interfaces, the computer can also use MIDI software. An example is VMPK, which provides MIDI IN and OUT ports. You can attach virtual MIDI cables to the VMPK's ports, to connect the program to other programs or to the computer's physical MIDI interface ports. More details about this coming later. You usually want to connect the MIDI output from VMPK to the input of some synthesizer which transforms MIDI into sound. Another common destination for the connection would be a MIDI monitor that translates MIDI events into readable text. This will help you to understand what kind of information is transmitted using the MIDI protocol. In Linux you can try KMidimon and in Windows MIDIOX.
VMPK doesn't produce any sound. You need a MIDI software synthesizer to hear the played notes. I recommend you to try QSynth, a graphical front-end to Fluidsynth. In Windows you can also use the "Microsoft GS Wavetable Synth" that comes with all Windows versions, or a better alternative like CoolSoft Virtual MIDI Synth. Of course, an external MIDI hardware synth would be an even better approach.
VMPK can help you to change sounds in your MIDI synthesizer, but only if you provide a definition for the synthesizer sounds first. The definitions are text files with the .INS extension, and the same format used by Qtractor (Linux), and Sonar (Windows).
When you start VMPK the first time, you should open the Preferences dialog and choose a definition file, and then select the instrument name among those provided by the definitions file. There should be one instrument definitions file installed in the VMPK's data directory (typically "/usr/share/vmpk" in Linux, and "C:\Program Files\VMPK" in Windows) named "gmgsxg.ins", containing definitions for the General MIDI, Roland GS and Yamaha XG standards. It is a very simple format, and you can use any text editor to look, change, and create a new one. You can find a library of instruments definitions at the cakewalk ftp server.
Since the release 0.2.5 you can also import Sound Font files (in .SF2 or DLS formats) as instruments definitions, using a dialog available at menu File->Import SoundFont.
Another customization that you may want to tweak is the keyboard mapping. The default layout maps about two and half octaves for the QWERTY alphanumeric keyboard, but there are some more definitions in the data directory, adapted for other international layouts. You can even define your own mapping using a dialog box available in the Edit->Keyboard map menu. There are also options to load and save the maps as XML files. The last loaded map will be remembered the next time you start VMPK. In fact, all your preferences, selected MIDI bank and program, and the controller values will be saved on exit, and restored when you restart VMPK the next time.
In Windows, VMPK connects automatically to the default MIDI output, which is usually the "Microsoft GS Wavetable Synth", included in all Windows versions. This MIDI synthesizer produces very poor quality sound, and suffers of high latency. A better (and free) alternative is CoolSoft Virtual MIDI Synth.
To connect hardware MIDI devices you need physical MIDI cables. To connect MIDI software you need virtual cables. In Windows you can use some virtual MIDI cable software, like MIDI Yoke, Maple, LoopBe1, Sony Virtual MIDI Router or loopMIDI.
MIDI Yoke setup process will install the driver and a control panel applet to change the number of MIDI ports that will be available (you need to restart the computer after changing this setting). MIDI Yoke works sending every MIDI event written to an OUT port to the corresponding IN port. For instance, VMPK can connect the output to the port 1, and another program like QSynth can read the same events from the port 1.
Using MIDIOX you can add more routes between MIDI Yoke ports and other system MIDI ports. This program also provides other interesting functionalities, like a MIDI file player. You can listen the songs played in a MIDI Synth and at the same time see the played notes (only one channel at a time) in VMPK. To do so, you can use the "Routes" window in MIDIOX to connect the input port 1 to the Windows Synth port. Also, configure the player's MIDI port to send to MIDI Yoke 1. And configure VMPK Input port to read from MIDI Yoke 1. The player will send the events to the out port 1, which will be routed to both the input port 1 and at the same time to the synth port.
In Linux, you have ALSA sequencer to provide the virtual cables. The ports are dynamically created when you start a program, so there is not a fixed number of them like in MIDI Yoke. The command line utility "aconnect" allows to connect and disconnect the virtual MIDI cables between any ports, being hardware interfaces or applications. A nice GUI utility for doing the same is QJackCtl. The main purpose of this program is to control the Jack daemon (start, stop and monitor the state). Jack provides virtual audio cables to connect your sound card ports and audio programs, in a similar way to the MIDI virtual cables, but for digital audio data.
QJackCtl connections in Linux
How to display 88 keys?
Since VMPK 0.6.0 you can use the settings dialog to choose this exact number of keys.
There is no sound
VMPK doesn't produce any sound by itself. You need a MIDI synthesizer, and please read the documentation again.
Some keys are silent
When you select channel 10 on a standard MIDI synth, it plays percussion sounds assigned to many keys but not to all of them. On melodic channels (not channel 10) you can select patches with a limited range of notes. This is known in music as Tessitura.
Patch names don't match the real sounds
You need to provide an .INS file describing exactly your synthesizer's sound set or soundfont. The included file (gmgsxg.ins) contains definitions for only standard GM, GS and XG instruments. If your MIDI synth doesn't match exactly any of them, you need to get another .INS file, or create it yourself.
Syntax of the Instrument Definition (.INS) files?
One explanation of the INS format is here.
Can I convert my Instrument Definition for vkeybd into an .INS file?
Sure. Use the AWK script "txt2ins.awk". You can even use the utility sftovkb from vkeybd to create an .INS file from any SF2 soundfont, but there is also a function to import the instrument names from SF2 and DLS files in VMPK.
$ sftovkb SF2NAME.sf2 | sort -n -k1,1 -k2,2 > SF2NAME.txt $ awk -f txt2ins.awk SF2NAME.txt > SF2NAME.ins
You can find the AWK script "txt2ins.awk" installed in the VMPK's data directory.
You can find the latest sources, Windows, and Mac OSX packages at SourceForge project site.VMPK for Android (free)
- Windows 32bit: vmpk-0.6.2-win32-setup.exe (34.8 MB)
- Mac OS X Intel 64bit: vmpk-0.6.2-mac-x64.dmg (45.3 MB)
- C++ Sources: vmpk-0.6.2a.tar.bz2 (466.2 kB)
- Linux i686 (32 bit): vmpk-0.6.2-linux-32bit-installer.run (47.7 MB)
- Linux (64 bit): vmpk-0.6.2-linux-64bit-installer.run (48.3 MB)
If you distribute VMPK packages for any distro, please drop me an email and I will add a link to your site here.
Download the sources from http://sourceforge.net/projects/vmpk/files. Unpack the sources in your home directory, and change to the unpacked dir.
$ cd vmpk-x.y.z
You can choose between CMake and Qmake to prepare the build system, but qmake is intended only for testing and development.
$ cmake . or $ ccmake . or $ qmake
After that, compile the program:
If the program has been compiled sucessfully, you can install it:
$ sudo make install
In order to successfully build and use VMPK, you need Qt 5.1 or newer. (install the -devel package for your system, or download the open source edition from qt-project.org
Drusmtick RT is required for all platforms. It uses ALSA sequencer in Linux, WinMM in Windows and CoreMIDI in Mac OSX, which are the native MIDI systems in each supported platform.
The build system is based on CMake.
Optionally, you can buid a Windows setup program using NSIS.
To compile the sources in Windows, you need to download either the .bz2 or .gz archive and uncompress it using any utility that supports the format, like 7-Zip.
To configure the sources, you need qmake (from Qt5) or CMake. You need to set the PATH including the directories for Qt5 binaries, MinGW binaries, and also CMake binaries. The program CMakeSetup.exe is the graphic version of CMake for Windows.
For some hints on using the program in Windows, please see MIDI connections.
You can find a precompiled universal app bundle, including Qt5 runtime libraries, at the project download area. If you prefer to install from sources, CMake or Qmake can be used to build the application bundle linked to the installed system libraries. You can use Qt5 either from qt-project.org or packages from Homebrew.
The build system is configured to create an universal binary (x86+ppc) into an app bundle. You need the Apple development tools and frameworks, as well as Qt5.
To compile VMPK using Makefiles, generated by qmake:
$ qmake vmpk.pro -spec macx-g++ $ make optionally: $ macdeployqt build/vmpk.app
To compile using Makefiles, generated by CMake:
$ cmake -G "Unix Makefiles" . $ make
To create Xcode project files:
$ qmake vmpk.pro -spec macx-xcode or $ cmake -G Xcode .
You can ask the compiler for some optimisation when building the program. There are two ways: first, using a predefined build type.
$ cmake . -DCMAKE_BUILD_TYPE=Release
The CMake "Release" type uses the compiler flags: "-O3 -DNDEBUG". Other predefined build types are "Debug", "RelWithDebInfo", and "MinSizeRel". The second way is to choose the compiler flags yourself.
$ export CXXFLAGS="-O2 -march=native -mtune=native -DNDEBUG" $ cmake .
You need to find the better CXXFLAGS for your own system.
If you want to install the program at some place other than the default (/usr/local) use the following CMake option:
$ cmake . -DCMAKE_INSTALL_PREFIX=/usr
In addition to the aforementioned tools, VMPK uses work from the following open source projects.
- from Qtractor, by Rui Nuno Capela
Instrument definition data classes
- Icon and logo by Theresa Knott
- This page uses the Wordsworth 3 free template by Lee Baillie
- This page uses Lightbox2 by Lokesh Dhakar
Thank you very much!