Inspiration
Music is a creative outlet for several members in our group, who play in several different bands. We wanted to be able to share our passion with other users, who might not have as much experience as us.
What it does
Our system, takes an inputted melody (this can be inputted using a MIDI roll sheet, or using a pre-programmed template), it can then harmonise this, predicting the most likely chord for each section of the melody (the user can select when they want the chords to change), and then it can be played back to the user, so that they can hear their creation. If the page is refreshed, the current musical masterpiece the user is working on is auto-saved, however if they want to restart there is a button which gives them the option to do so. There is also an option for the user to change the tempo (speed) of their piece so they can mess around with how it sounds.
How we built it
We split our team into front end and back end developers. We created a HTML solution for where a user can input their melody into a MIDI roll sheet, which was dynamically created as part of the website, using CSS to style the sheet, keeping in mind the accessibility of our system, as it is made for people who would not always have access to music. The table used for the MIDI roll sheet uses the CSS :hover pseudoclass in order to follow the users cursor, so they can see what they are inputting. Furthermore, we connected our front end to our back end, using flask. Our back end used Python to take the input data, format it, manipulate the data in order to predict the most musically appealing chords - using weightings depending on the notes used in each section the user wants a new chord for, and then output these to the screen. The user can then either play their own melody given the chords, or they can use the program to play their melody and chords to them.
Challenges we ran into
We had challenges when formatting the data received from the front end, to a suitable format to be used by the back end to compute a solution. We ran into similar issues when formatting the data to be returned to the front end, as often the format which was most convenient for the front end, was different from that which was convenient for the back end. We also ran into issues when deciding which chords should be used, and using weightings to make sure the most musically appealing ones were outputted, rather than any chord which includes the notes in the section. We had to edit the weightings used in the python back end in order to make sure the best chord was chosen. This took quite a bit of trial and error.
Accomplishments that we're proud of
The initial creation of the table was quite difficult, making sure it fit on the screen, but was still usable, furthermore, making sure the elements changed colour when the user hovered on them, and changed again when they were selected, as well as choosing appropriate colours to fit with accessibility to those with colour-blindness. The table was the most key element in our project, so it was important we got this right. Furthermore, when formatting the data between the front and back end of our project, there were several issues we ran into, so when we were able to do this and connect the whole system, we were very proud of ourselves.
What we learned
We learnt about working together as a team, being able to independently work on bits of the project, and then put these together in order to create a finished project. We used GitHub to do this, which the majority of the team had not done before. Whilst doing this, we were able to lean into one anther's strengths, and also helping each other with bits of code we did not understand. Several members of our team learnt different programming languages which they had not used before (Python, js and flask), or different techniques regarding these languages. Furthermore, whilst working as a team we had to adhere to each other's programming styles, as most of us have only ever coded on our own projects before, and had slightly different conventions, or styles for doing things based on how we had learnt.
What's next for Music Harmonizer?
If we had more time, we would like to be able to add a larger variety of chords, including 7th chords, sus chords and diminished chords, as this would improve the musicality of the system, as often a 7th chord (for example) will fit better than a triad chord. It would also be nice to add a longer MIDI roll sheet, allowing users to create longer pieces of music, and then for them to be able to personally save their work, so they can work on multiple musical projects at one time.

Log in or sign up for Devpost to join the conversation.