Drawing of piano keyboard

broken image
broken image

We will extend the number of keys available to 4 octaves and set new key bindings.Īlthough his keyboard can play sounds from other instruments, we will keep things simple and just stick with piano.

broken image
broken image

The piano keyboard we are making for this project is based on the dynamically generated synthetic keyboard made by Keith William Horwood. Otherwise, it is totally beginner friendly and geared toward those who want to improve their JavaScript skills through project-based learning (or just want to make a cool project!). This tutorial assumes you have a basic understanding of JavaScript such as functions and event handling, as well as familiarity with HTML and CSS. Here is the JavaScript piano keyboard I made if you want to check out the end product first. This tutorial shows you how to code one using vanilla JavaScript without the need for any external libraries or frameworks. Making a playable piano keyboard can be a great way to learn a programming language (besides being heaps of fun).