Play a piano as you type.
Play a piano as you type. Convert your computer keyboard into a musical keyboard.
An app that runs in the background and generates specific music notes for different keystroke combinations.
This application is based on Virtual Piano.
Most similar music apps generate a sound that have exponential or cosine frequency responce. This is one of the rare ones who’s notes follow a time-varying gaussian curve.
In human language; it sounds very close to the real thing. Hence, this application has 3 major purpose,
The project uses JNativeHook that leverages platform-dependent native code to create low-level system-wide hooks. These hooks capture your keystrokes no matter what application is currently running and is in focus.
Different key combinations are assigned a note, that is played via one of the implimented Player implimentation.
If you want to run this project locally,
For the first download/clone of this repo,
lib
folder, then add its contents as external jars).Project -> Properties -> Java Build Path -> Source -> Add Folder
To directly use it.
F9
key.The current application has support for 4 different players. The TinyPlayer
is used by default.
To modify this,
public enum Players {
CLIP_PLAYER (ClipPlayer.class, Extension.WAV),
JFX_PLAYER (JfxPlayer.class, Extension.MP3),
JACO_PLAYER (JaCoPlayer.class, Extension.MP3),
TINY_PLAYER (TinyPlayer.class, Extension.WAV);
...
}
Conductor mainConductor = new Conductor(Players.TINY_PLAYER);
The current version has keys 0-9
and A-Z
mapped to the piano. Additinally, the sharp notes (the black keys in the piano) can be played by pressing Shift+Key
.
The current version covers 3 and a half octaves as seen below.
CLIP_PLAYER
misses notes.TINY_PLAYER
gives jitters sometimes.Licenced under GNU GENERAL PUBLIC LICENSE v3.0. It is free to copy and distribute.