Our Musical System
We all are musicians in one way or the other. We are all capable of coming up with catchy tunes called ‘melodies’ which form the basis of a song. However, most people are not able to develop harmony; other notes, chords, and progressions, which make our melody line sound rich. To be able to harmonize is a skill which takes musicians decades to develop. It involves experimenting with a set of complex rules originally developed by classical composers over 300 years ago --- these rules can be tedious to learn and often discourage people from composition. Our goal was to combine 300 years worth of harmonization rules into a set of algorithms which can do it for you!
What it does
The system allows users to play a melody on a piano. The melody is then analyzed, and our harmonization algorithms make a harmony for the melody. Then the harmonized melody line is then played.
How we built it
We first have a script that allows the user to play a song on the piano and records it to harmonize it. The song is then fed to our harmonization algorithm which will go through everything from the timing to the decorations in the melody. Next, we built a matcher which compares the analysed input with an algorithm built on 300 years of classical music knowledge. This finds a nice-sounding chord progression which are placed back on the keyboard. The algorithms include systems to figure out what sounds nice to us, and what needs to be done according to classical rules. Finally, we had a nice user interface to play back the completed song.
Challenges we ran into
Many small bugs involving piping and streaming information were encountered throughout the hack, though we were able to fix them within a reasonable amount of time. Additionally, we thought of different rules and aspects of classical music which needed to be implement which caused us to redesign the system a couple of times.
Accomplishments that we're proud of
We are very proud of the design for the harmonization algorithms; it turned out that some of the principle algorithms were very well written that the system started to implement other harmony rules naturally!
What we learned
On a technical side, a lot was learned in regards to the complex behaviours of buffering in unix pipes. Additionally, a lot of strategies were learned in how to architect large programs in modular components. On the musical side, even though most of the team is educated in classical music, we found that there is still a ‘human’ aspect to harmonization and composition which can not always be made into an algorithm.
What's next for iHarmony and Applications
In the future we hope to further develop iHarmony so that it is able to consider dynamic and style in its harmony --- this will result in a nicer output. What iHarmony allows is anyone to be a musician; it no longer requires years of musical training in order to do so. In a way, this software allows for the democratization of music. People can now quickly make little songs and jingles. These quick little songs can be used for 'themes' for different event such as weddings and hackathons! Also, this technology with further development could be used professionally in the music industry.