Determining a musical piece's style and key using maths
This program file contains the MATLAB code for analyzing a musical piece for its tonality and compositional style using various mathematical indices as proposed in Nicholas J. Lindell's M.A. thesis. These indices only utilize information about the frequency distribution of notes and transitions between notes in a piece, encoded in what is called a "flow matrix" in compartmental network analyses; essentially, the (i,j) entry represents how many times note i follows note j in the piece. This information is enough to determine, with reasonable accuracy, whether a piece is composed "serially," "atonally" but not serially, or within the "tonal system."
Tools for extracting frequency distributions and flow matrices from MIDI files have also been compiled for the analysis in the thesis, and can be found in the project "Analyzing musical compartmental networks using MIDI files" by the same author.
Detailed descriptions of the indices' formulation and usage can be found in the thesis, "Mathematical music analysis: a holistic approach," obtainable from the University of Georgia or from the author.
Cite As
NIcholas Lindell (2024). Determining a musical piece's style and key using maths (https://www.mathworks.com/matlabcentral/fileexchange/72167-determining-a-musical-piece-s-style-and-key-using-maths), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Acknowledgements
Inspired by: Analyzing musical compartmental networks using MIDI files
Inspired: Analyzing musical compartmental networks using MIDI files
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.