Home

Awesome

music not

motivation

article: https://medium.com/@alexcouch/how-i-d-redesign-piano-sheet-music-355c4f9012f1

I loved the article and got the idea of implementing such visualization in SVG based on a given sound sheet. I had already processed MIDI files before and it is very hard. This time I tried with MusicXML, which gave much better results because it's more of a human-friendly format, storing both MIDI information and score layout info.

Used the musescore sheetmusic database to fetch some simple and recognizable songs.

I ended up parsing the MusicXML file to a simpler format and playing it back naively with WebAudio. Kinda works in a modular way, though it relies on setInterval so far O:)

Now for the score rendering part: I managed to summarize the most relevant features of MusicXML for this task - it may not work for very complex songs though.

It focuses on a part of the song (in MIDI/MusicXML terms this means one instrument/track). For now it is choosing the first one but the user can choose which one.

Further improvements:

musicXML ref

notes

Piano range is A0=27.50Hz to C8=4186Hz

Guitar strings are E2=82.41Hz, A2=110Hz, D3=146.8Hz, G3=196Hz, B3=246.9Hz, E4=329.6Hz

Bass strings are (5th string) B0=30.87Hz, (4th string) E1=41.20Hz, A1=55Hz, D2=73.42Hz, G2=98Hz

parts stand for different instruments/players, running side by side in the score sheet

voices in the same measure use the same instrument, are implicitly in the same part and stand for different sequences im parallel

JS files

results so far

roadmap