Virtual Musical Instruments with Python and OpenCV - Thottathil, Isaac Abraham; Thivaharan, S. (Journal of Ubiquitous Computing and Communication Technologies, 2023)
There is an increasing need for musical aspirants to have access to cheaper musical instruments. This study explores the opportunities to utilize image recognition algorithms via OpenCV to port this technology into readily available modern devices, which will enable inexpensive yet authentic methods of playing a piano. Through OpenCV and Pygame libraries, one can set up a rigid camera that will trace the player’s fingers. The fingers if they cross or hover over a specific coordinate of a key, the piano note (.wav file) will be played by Pygame’s mixer module. This simple yet inexpensive option might help first-time musical aspirants experience music in an affordable and accessible way. Furthermore, this article explores the future scope of accommodating other musical instruments.