Contributing to an online open project – Coding for the issue


In order to solve the issue, the first step was to locate the function which converts the midi value into the note value. After that, I spent a bit of time making sure that I understood the function 100%.

This code basically takes a midi value (n) and converts it to the corresponding musical note. It takes the midi value, divides it by 12 and substracts 1. N also must be between 0 and 127.

After seeing that the function was deprecated, I asked on the Discord channel whether I should include the code in this part or if I should do it somewhere else. The communication has not been the best, as the answer I got was to just upload the code and send the request and then they will see.

I ended up doing it in this part of the code. In the other file, they just use a library that converts the midi values to notes so I could not edit that.

After that, it was time to research the different types of alternative notes. I already knew the solfege one and the German one (which just changes the B to an H). I had to look up the Japanese, Indian and Byzantine ones. I mostly tried to find out if they use sharps/flats or not. It seems that the traditional Indian notation and Japanese ones do not use them.

I then started writing the code to include the alternate notations. I kept the main function that divides the midi value. Basically, the code checks which musical note to assign it to, and if none of the arrays match it uses the standard western one. Then it calculates the note from the midi value by dividing it to 12. It also calculates the octave by dividing the midi note value to 12 and subtracting 1. It then returns the respective note and octave.

The next step was to try and test the code somehow. I was not sure how to do it as I could not just save the file and run the new code on the website. After doing more research online I realized the best solution would be by using console log (the code is in JavaScript). I wrote a separate file in a folder called test.

I then used the terminal to see if it would convert the notes in the right way from the midi value to the new alternate notations. I used 60 (C4) and then 70 (Bb4) to see what output I would get from the notations that do not use flats.

This part of the project gave me the occasion to brush up on my JavaScript skills as it had been a while since I used it. I also really enjoyed doing the research about the other solmization types. It was very interesting to see, as before this issue I had no idea that there are so many different ways of writing notes, and how different they can be from each other.


Leave a Reply

Your email address will not be published. Required fields are marked *