Here's the link to a full view on codepen: https://codepen.io/yxiao96/full/LYWgwdg
Hello, I'm here to put down some tracking for a little code project I did over the weekend. This little project is about a web app instrument I build. The instrument can be accessed through a website and the control is your keyboard.
The main idea behind is to allow people play a lot of notes with just a few keys. For this project, there are 6 keys in total, while allowing people to play 24 different notes. People may think that this is no surprise since that 6 variables could have 2 to the power of 6 equals 32 combinations. Yes, that's true, it's possible to have more notes but making an instrument is somewhat different from simply combining switches.
The other aspect of the issue is to make this intrument playable. Imagine that if we simply use binary encoding to map to the keys, like 000000 -> C3, 000001 -> C#3, 000002 -> D3. This encoding could be very hard for the play to remember where to put his/her finger when he/she want to play a certain note. The goal to make the instrument intuitive to play. Here we borrow the concept from guitar, which has essentially 2 sets of controls: one set of controls for controling the pitch, the other set of controls for playing the note. In this project, 3 keys on your left hand side control the pitch, while the 3 keys on your right hand side play the note.