Melodigraph & NLAC
Part 1. Musical Meteorology and Melodigraph
In 2022, I worked on a project that sought to represent meteorological conditions over a period of several years as a musical track, where each of the different data-types would be represented by different instruments, and the changes between those values as the pitch of the note being played. This lead to the creation of Musical Meteorology, an admittedly rough draft of this concept that isn't very pleasing to listen to.
Written in MATLAB, the code that generated Musical Meteorology was slow, complicated, and generally not adaptable to a general dataset. As a result I set off in creating what would eventually become Melodigraph, a Windows application that provided a GUI for producing these musical creations, written in C#.
Melodigraph takes a CSV file as input (or can have data automatically loaded using the Melodigraph Microsoft Excel Plugin). Once data is loaded, the user simply assigns a mode and key to the dataset, and an instrument to each column of data. Melodigaph takes care of the rest, producing an ABC file output and MusicXML file that can be loaded into a sheet music viewer of your choice (e.g. MuseScore).
A video demo shows what Melodigraph does best, streamlining the process from dataset, to sheet-music.
Part 2. NLAC
Striving for additional performance from Melodigraph, and code that was easier to follow and implement in other projects, I next began work on the Normalization, Lookup, And Conversion (NLAC) program. This tool is mainly a library of C# classes that can be combined to accomplish the main processing of Melodigraph, but at speeds much faster than the original Melodigraph can achieve.
NLAC implements several custom data storage classes, optimized to handle the data throughout its multiple stages in the conversion process. NLAC improves speeds dramatically compared to Melodigraph, achieving speeds of 9 million notes/sec on large stress-test datasets.
The main intention of NLAC is to be added into an existing C# project to expose its functionality directly to that software. In addition some basic command line interfaces exist for passing files into a fully compiled version of NLAC if that functionality is desired.
The source code of the current version of NLAC with basic command line support can be found on GitHub.
https://github.com/rj12-Ryan/NLAC
Part 3. Future Work
The main goals of this project are to tie together the two pieces, and tie up some loose ends. The main goal to begin is to replace the current back-end code of Melodigraph with NLAC to improve performance. Additionally, some cleanup needs to occur on the Melodigraph UI code before it can be released publicly.
Work for NLAC itself mainly includes improving the command line interface and implementing custom code to more efficiently convert output ABC to MusicXML.
Conclusion
Melodigraph and NLAC have been projects I have enjoyed working on for some time now, and I hope they can continue to improve, especially as they combine into one high-performance tool.
Special thanks to the following:
Zachary Watson - For providing note lookup tables and general music theory support during development
Willem (Wim) of https://wim.vree.org/ - For the development of the open-source abc2xml tool that is used in Melodigraph