Use your computer keyboard as a "piano"
This library lets you to play your computer keyboard like a piano. Here is a video of it in action on a French azerty keyboard.
Pianoputer only works in python3 so make sure you are using python3
pip install pianoputer
After a few seconds, the below image will appear in a window, indicating that the program is ready. The cyan key is the key that the sample wav file is assigned to. By default this is c4, the piano middle C at 261.6 hz All white and black keys are transposed up and down from the anchor cyan key.
Changing the sound file
You can provide your own sound file with
pianoputer --wav my_sound_file.wav
pianoputer -w audio_files/bowl_c6.wav
All white and black keys are transposed up and down from the anchor cyan key.
Changing the keyboard layout
Note that the default keyboard configuration (stored in file
keyboards/qwerty_piano.txt) is for the most commonly used QWERTY keyboards. You can change the configuration so that it matches your keyboard, for instance using the alternative
pianoputer -k keyboards/azerty_typewriter.txt
.txt files simply contain a sequence of key names and are easy to edit. For convenience this repository also provides a
This will let you press the keys in the order that you want, and create a new keyboard configuration file, by default
my_keyboard.kb (just follow the instructions). You can then use the custom keyboard file with the --keyboard argument
python3 -m venv venv
# if you want to edit the program and have pianoputer use your edits
pip install -e .
# to install pianoputer separately in your virtual environment
pip install .
- c4 piano sample from https://en.wikipedia.org/wiki/File:Middle_C.mid
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for pianoputer-2.0.2-py3-none-any.whl