Skip to content

Play piano pieces by randomly pressing keys on a digital piano or any other input device

Notifications You must be signed in to change notification settings

aileria/fake_piano

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fake_piano

Play any piece on the piano with no musical knowledge.

The notes played on the piano will be replaced in realtime by those specified in a MIDI file previously configured, allowing you to playback the original melody pressing random keys.

Although the program has been designed to use a digital piano as input device and a MIDI port as output, it is possible to use any input or output providing its implementation.

Installation

Minimum requirements

Python3 is required to execute the scripts. Aditionally, you may need to install these tools for proper functioning.

  • Mido - MIDI file and message handling
pip install mido
pip install python-rtmidi

Optional requirements

To extend compatibility with other input/output devices it may be necessary to install their corresponding third party drivers or libraries.

pip install pyFluidSynth
  • pynput - Necessary for KeyboardOutput to work.
pip install pynput
pip install pyPS4Controller

Usage

The program consists of two basic parts, the reading of MIDI files and their playback. The classes corresponding to each main task are Reader and Player respectively.

The Reader object is used to read a MIDI file and create a Playable object which the Player is able to play.

The Player object is responsible for reading the messages sent by the chosen input device and modifying them before sending them to the configured output device.

About

Play piano pieces by randomly pressing keys on a digital piano or any other input device

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages