Transposing allows you to play music meant for another instrument. It's a very useful skill to learn as you are often put in situations in which you want to play a song in another key or semitone. However, transposing is also very tedious and can take hours to manually do (sometimes taking hours). Though a few transposing solutions do exist, they require you to manually input each note, making the process very slow. Thus, we created NoteShift to automatically transpose music for anyone who has access to a computer or smartphone. We hope that our software will make the lives of all musicians easier.

What it does

Our app will allow the user to submit music through our website and signify which key the music is in and which key they want to transpose to. Based on the user's input, NoteShift automatically transposes the music and uploads a downloadable PDF of the new music. The user will also have an option to hear the original song and the transposed song.

How it works

When a user clicks submit, the browser redirects to a script that first appends key information to the front of the file name, then uploads the entire file to the server. The browser then redirects to a loading page. In the backend, a new file is detected by a daemon script and triggers a series of scripts. The pdf is first converted into MusicXML using the OMR Machine Learning library Audiveris. A Java program then transposes this file. Finally, a music notation program called MuseScore converts the transposed MusicXML file to both pdf and mp3 versions.

The backend creates a file, which is detected by javascript running on the loading page. Javascript then redirects the client page to the result, displaying both the transposed pdf and mp3 on the client's browser. Processing takes about 30 seconds per processed page.

We used a DigitalOcean server to run computations.

How we built it

We split up into teams to manage different parts of the coding process. Xiangyu and Lawrence worked on the UI/UX and communication from and to the front end. Ricky worked on the algorithm to transpose music to different keys. Tyler managed the DigitalOcean server and created the daemon to run the whole process.

Challenges we ran into

Because of the details and quirks of music notation, transposing music isn't as simple as "incrementing x number of semitones" to a note. Enharmonic notes must be transposed correctly to the new key. Our algorithm to do this transposition now correctly takes notes to the correct octave and note-names but struggles with putting the correct accidentals on the music.

Being unfamiliar with web development before starting this project, we ran into many issues trying to communicate between the front and back end. This occupied a good chunk of our time, though we were eventually able to find solutions to our communication need.

Accomplishments that we're proud of

We have a working app! An MVP of our product was successfully hacked together and can transpose music in the keys of [C, Eb, Bb, F, G, A] to music in the keys [C, Eb, Bb, F, G, A]. We were also able to implement a way for the user to playback their old music and their transposed music.

What we learned

We learned roughly how to communicate between the front end and back end through HTML requests. We also learned how to work with the MusicXML file format.

What's next for NoteShift

We want to support image formats (.jpeg, .png) so that anyone can casually take a picture of music and transpose it. OpenCV has image editing algorithms to apply the necessary thresholding and perspective transform. A demo will be provided.

We want to support different methods of inputting the desired transposition. Our site is geared towards band music at the moment, and making it more friendly to people that just want to transpose to an easy key is high on our list of changes.

Share this project: