Music Blocks widget improvement
So finally I am writing this. It has been a long journey and I had a very good learning experience. I almost can’t believe how much I have learned from the project. I would like to thank my mentors Walter Bender and Devin Ulibarri. They helped a lot to complete the project, and are very good people. I would like to thank Google Summer of code to give me this opportunity.
Aim
To add Keyboard and Pitch tracker widgets to Music Blocks and fix bugs.
Work Done
1)Music Keyboard – This is similar to a piano keyboard. Clicking on keys gives sound output corresponding to that key. User can save created music in terms of blocks. Its main feature is that it is customizable. Only those keys are shown which are inside keyboard widget clamp. If user removes all the keys from clamp then a standard keyboard with keys from C4 to G5 is shown.

Link to keyboard branch is here
Pull request is here
2)Pitch Tracker – Taking input from microphone it uses auto-correlation in real time to find fundamental frequency of input waveform. It then finds musical notes which are closest to the detected frequencies. On clicking save buttons it gives output of blocks corresponding to detected frequencies. It is working nicely with musical instruments. For human voice, it sometimes does not give correct output.
![]()
Link to pitch tracker branch is here
Pull request is here
3)Fixed several bugs – I had no earlier experience of working with project of this size. Even a bug which looked small, it took a large amount of time to trace the code which is causing the problem, and more time to fix the code. It took almost a month to fix the bugs.
Merged Bug fixes are
here
here
here
Challenges faced
1)In initial days I could not understand overall workflow of Music Blocks code. I then studied logo.js code. This gave me an overview how things are getting done in Music Blocks.
2)For human voice it is much harder to find fundamental frequency, because speech waveform is composed of a lot of frequencies. We need to use a more sophisticated algorithm. I am taking speech processing course this semester and would like to contribute more as I learn better techniques to do it.
Future Work
1)Adding timing information for Music Keyboard.
2)Getting accurate results from Pitch tracker in case of human voice.




