Music Analysis

An extensive music analysis framework was developed as part of MPS, which facilitates statistical and musicological analyses.

There are a number of motivations for the development of the MPS analysis tool:

Analysis Scopes

To analyze musical compositions, one or more files containing symbolic music data in MIDI or MusicXML format have to be provided. The analysis and export process is configurable. Different analysis scopes are possible. Either a single piece, a collection of pieces or a corpus of pieces can be analyzed.

The first musical analysis scope to be introduced is the single piece scope. It is used for gaining insights about a specific musical composition by performing either a global analysis or a voice-specific analysis of the piece. It is also possible to combine the aforementioned analysis modes. Furthermore musically meaningful sections can manually be marked in the score in order to perform section-wise analysis, which is optionally combinable with voice-wise analysis.

Collection analysis is suitable for comparing multiple musical pieces among each other. For this purpose, analysis results are shown next to each other in combined representations. Corpus analysis goes even one more step further, allowing to compare multiple collections of compositions, e.g. folders containing multiple compositions of individual composers.

Analyzing Music

To start analyzing music, simply select a file or folder and click the button in the toolbar. Another possibility is invoking the context menu by using a right click and choosing Run AsMPS Analysis Run. If a file or folder is analyzed for the first time, a corresponding launch configuration will be opened. Adjust the configuration as desired and then click Apply and/or Run to start the analysis process. See section Configuring Music Analysis for more details.

The progress of the analysis process will be shown in the Progress view, which is located at the bottom of the application by default.

Folders with the name schema <analyzed file or folder>_Analysis will be created for each analyzed file or folder. The results will be stored in these folders in the form of CSV files. These contain column names in the first line/row and analysis result values in the following lines/rows.

Exploring Analysis Results

There are multiple options for viewing and exploring analysis results. One option is to view the raw analysis data directly or in a spreadsheet editor. To view raw analysis data, follow these steps:

A more comfortable option is to use the Analysis Result Browser provided by MPS. To open it, right-click an analysis folder and and choose Open Analysis View from the context menu:

The analysis result view will be shown. To initialize the view with data, select an arbitrary folder containing analysis results. Once the view is associated with a data set, CSV files can be selected on the left hand side of the view. MPS will display the raw CSV data and a corresponding plot or graph depending on the content of the selected CSV file.

The generated charts can be exported as file. To export a chart, right-click on the graphic and select Export Chart to File. After specifying the destination, the file will be generated. Currently, the following image formats are supported:

Configuring Music Analysis

The analysis process can be configured by adjusting a so called run configuration. A run configuration is automatically created when a file or folder is initially analyzed. To change run configurations later, click the black arrow next to the button in the toolbar and click Run Configurations.... The following window will open:

You can either search for an existing run configuration to modify or create a new configuration by clicking the button . The following parameters can be set:

ParameterDescription
Resource PathWorkspace-relative path to a file or folder to be analyzed.
Analyze Implicit HarmoniesAttempt to derive harmonies by analyzing simultaneously audible pitches in the piece.
Interval Leap Rest Duration ThresholdSpecifies the impact of rests between notes for the interval leap detection algorithm. If the value is empty, every rest resets the algorithm, i.e. no interval leaps are detected across rests. In case the value is 0, interval leaps are detected across all rests. If the value is any other positive fraction (e.g. 1/4), the algorithm is reset in case rests longer than the given fraction are detected.
Export Analysis Log FilesIf enabled, detailed log files are exported.
Export Analysis Results for Individual FilesIf multiple files are analyzed (collection or corpus scope) and this option is enabled, detailed analysis results for each file are exported.
Export Analysis Results for Individual StreamsIndicates whether individual analysis results for each stream (voice) should be exported.
Progression Graph Label ModeConfigures how edges in progression graphs (e.g. rhythmic progressions, pitch progressions or harmonic progressions) should be labeled. Occurrence Count displays how often a progression was encountered. Measure Numbers shows the measure number in which the corresponding transition was detected. Markov Model displays the markov model probabilities for each transition. As an example, a harmonic progression graph is shown below with measure number labels. Refer to section Generating Progression Graphs for more details.
Section Start TimesProvide a comma-separated list of measure numbers if a single piece should be analyzed section-wise. The first measure does not need to be supplied. Example: 5,17,33. If this field is left empty, the piece is considered to have one large section.

The figure shows the harmonic progression graph of Ludwig van Beethoven’s Piano Sonata No. 14 in C# minor, first movement. The numbers specify the measures in which the corresponding chord change was detected. The colors of the chords encode the consonance or dissonance of the relevant chord (green corresponds to consonant and red to dissonant). The graph reveals which harmonic progressions are only used once and which are used multiple times. The latter are easily identifiable due to comma-separated enumerations of measure numbers in which the corresponding transitions occur.

Analysis launch configurations can be reused, edited and deleted at any time. Refer to section Launch Configurations for further details.

Generating Analysis PDF Reports

Analysis results can also be exported in the form of PDF reports. To invoke a report generation, simply select an analysis data folder of your choice and click the button in the toolbar. Note that you must have a LaTeX environment installed to render analysis reports, which is described in sections LaTeX Installation and LaTeX Configuration in the installation chapter. The PDF will be generated in a directory next the the analysis folder with the name <Analysis Folder Name>_Report.

Analysis Report PDF Settings

To configure the contents of analysis report PDFs, navigate the the corresponding preference page:

  1. Open the MPS Preferences
    1. On Windows and Linux: In the menu bar, choose Window → Preferences
    2. On Mac: In the menu bar, choose Music Processing Suite (application menu) → Preferences
  2. Navigate to Music Processing Suite → Analysis Reports

The following settings are available:

ParameterDescription
LaTeX DirectoryPath to a LaTeX installation containing the LaTeX executables.
Export Stream-specific ResultsConfigures whether the PDF report should contain analysis results for individual streams.
Export Stream-specific ResultsIf set, the PDF report will contain individual analysis results for each section. This only works if sections were defined and a section-specific analysis was performed.
Maximum number of table rowsSets the maximum number of table rows to be displayed in analysis report PDFs. The default is 100. If set to 0, all rows are printed.

Generating Progression Graphs

When analyzing music with MPS, progression graphs of the following musical aspects are generated:

Depending on the setting Progression Graph Label Mode described in the previous section, the edges in the resulting graphs will either have

as labels. An example with measure numbers was already presented in the previous section. Here is a harmonic progression graph of Hey Jude by the Beatles with occurrence count labels visualizing how often the corresponding transition was found in the piece:

And this is the same harmonic progression graph as a Markov model with probability labels:

The graphs are exported for each stream separately and can be found in the respective subfolders:

Corresponding PDF files will be generated automatically if GraphViz is installed and configured as described in GraphViz Installation.

If the graphs should be included in analysis report PDF files, the option Export Stream-specific Analysis Results needs to be activated in the preferences as shown in the previous section.

Analysis Features

The following table lists all 117 musical features which can be analyzed with MPS.

FeatureTypeExported Data
Total Number of NotesNumberTotal Number of Notes
Total Number of RestsNumberTotal Number of Rests
Instrument Duration DistributionRelative DistributionInstrument, Relative Quantity
Note DensityPercentageNote Density
Note Duration AverageAverageNote Duration Average
Note Duration Standard DeviationStandard DeviationNote Duration Standard Deviation
Note Duration DistributionRelative DistributionNote Duration, Relative Quantity
Note Duration Distribution Dependent on BeatRelative DistributionBeat, Note Duration, Relative Quantity
Note Duration Distribution Dependent on Beat (Absolute)Absolute DistributionBeat, Note Duration, Absolute Quantity
Rest Duration AverageAverageRest Duration Average
Rest Duration Standard DeviationStandard DeviationRest Duration Standard Deviation
Rest Duration DistributionRelative DistributionRest Duration, Relative Quantity
Rest Duration Distribution Dependent on BeatRelative DistributionBeat, Rest Duration, Relative Quantity
Beat DistributionRelative DistributionBeat, Relative Quantity
Beat DistributionAbsolute DistributionBeat, Absolute Quantity
Time Signature DistributionRelative DistributionTime Signature, Relative Quantity
Loudness over TimeValues Over TimeTime, Loudness
Loudness over TimeValues Over TimeMeasure, Loudness
Loudness DistributionRelative DistributionLoudness, Relative Quantity
Minimum PitchStringMinimum Pitch
Maximum PitchStringMaximum Pitch
Minimum Pitch over TimeValues Over TimeTime, Minimum Pitch
Minimum Pitch over TimeValues Over TimeMeasure, Minimum Pitch
Maximum Pitch over TimeValues Over TimeTime, Maximum Pitch
Maximum Pitch over TimeValues Over TimeMeasure, Maximum Pitch
Pitch DistributionRelative DistributionPitch, Relative Quantity
Piano RollValues Over TimeTime, Pitch, Duration
Piano RollValues Over TimeMeasure, Pitch, Duration
Interval Leap AverageAverageInterval Leap Average
Interval Leap Standard DeviationStandard DeviationInterval Leap Standard Deviation
Interval Leap DistributionRelative DistributionInterval Leap, Relative Quantity
Interval Leap Distribution Dependent on BeatRelative DistributionBeat, Interval Leap, Relative Quantity
Interval Leaps over TimeValues Over TimeTime, Interval Leap, Absolute Quantity
Interval Leaps over TimeValues Over TimeMeasure, Interval Leap, Absolute Quantity
Number of Simultaneously Audible Notes AverageAverageNumber of Simultaneously Audible Notes Average
Number of Simultaneously Audible Notes Standard DeviationStandard DeviationNumber of Simultaneously Audible Notes Standard Deviation
Number of Simultaneously Audible Notes DistributionRelative DistributionNumber of Simultaneously Audible Notes, Relative Quantity
Pitch Combination DistributionRelative DistributionPitch Combination, Relative Quantity
Pitch Combination Distribution (Absolute)Absolute DistributionPitch Combination, Absolute Quantity
Pitch Combination Duration DistributionRelative DistributionPitch Combination, Relative Quantity
Pitch Combination Duration Distribution (Absolute)Absolute DistributionPitch Combination, Duration
Simultaneously Audible Interval DistributionRelative DistributionInterval, Relative Quantity
Simultaneously Audible Interval Distribution Dependent on BeatRelative DistributionBeat, Interval, Relative Quantity
Dissonance AverageAverageDissonance Average
Dissonance Standard DeviationStandard DeviationDissonance Standard Deviation
Dissonance DistributionRelative DistributionDissonance, Relative Quantity
Dissonance Distribution Dependent on BeatRelative DistributionBeat, Dissonance, Relative Quantity
Dissonance over TimeValues Over TimeTime, Dissonance
Dissonance over TimeValues Over TimeMeasure, Dissonance
Keys over TimeValues Over TimeTime, Key
Keys over TimeValues Over TimeMeasure, Key
Key DistributionRelative DistributionKey, Relative Quantity
Circle of Fifths Distance Distribution of KeysRelative DistributionCircle of Fifths Distance, Relative Quantity
Harmonies over TimeValues Over TimeTime, Harmony
Harmonies over TimeValues Over TimeMeasure, Harmony
Harmony DistributionRelative DistributionHarmony, Relative Quantity
Harmony Distribution (Simplified)Relative DistributionHarmony, Relative Quantity
Chord Inversion DistributionRelative DistributionInversion, Relative Quantity
Harmony Change Beat DistributionRelative DistributionBeat, Relative Quantity
Harmony Duration DistributionRelative DistributionHarmony Duration, Relative Quantity
Circle of Fifths Distance Distribution of HarmoniesRelative DistributionCircle of Fifths Distance, Relative Quantity
Harmony Distribution Dependent on BeatRelative DistributionBeat, Harmony, Relative Quantity
Harmony Distribution Dependent on DurationRelative DistributionHarmony Duration, Harmony, Relative Quantity
Implicit Harmonies over TimeValues Over TimeTime, Implicit Harmony, Inversion, Pitch Combination
Implicit Harmonies over Time (Simplified)Values Over TimeTime, Implicit Harmony, Inversion, Pitch Combination
Implicit Harmonies over TimeValues Over TimeMeasure, Implicit Harmony, Inversion, Pitch Combination
Implicit Harmonies over Time (Simplified)Values Over TimeMeasure, Implicit Harmony, Inversion, Pitch Combination
Implicit Harmony DistributionRelative DistributionImplicit Harmony, Relative Quantity
Implicit Harmony Distribution (Simplified)Relative DistributionImplicit Harmony, Relative Quantity
Harmony Change Beat Distribution (Simplified)Relative DistributionBeat, Relative Quantity
Implicit Harmony Duration DistributionRelative DistributionHarmony Duration, Relative Quantity
Circle of Fifths Distance Distribution of Implicit HarmoniesRelative DistributionCircle of Fifths Distance, Relative Quantity
Implicit Harmony Distribution Dependent on BeatRelative DistributionBeat, Implicit Harmony, Relative Quantity
Implicit Harmony Distribution Dependent on Beat (Simplified)Relative DistributionBeat, Implicit Harmony, Relative Quantity
Implicit Harmony Distribution Dependent on DurationRelative DistributionHarmony Duration, Implicit Harmony, Relative Quantity
Implicit Harmony Distribution Dependent on Duration (Simplified)Relative DistributionHarmony Duration, Implicit Harmony, Relative Quantity
Harmony Analysis over TimeValues Over TimeTime, Key, Harmony, Roman Numeral (Classical), Roman Numeral (Pop/Jazz)
Harmony Analysis over TimeValues Over TimeMeasure, Key, Harmony, Roman Numeral (Classical), Roman Numeral (Pop/Jazz)
Chord CompliancePercentageChord Compliance
Root Note CompliancePercentageRoot Note Compliance
Bass Note CompliancePercentageBass Note Compliance
Scale Compliance Relative to KeyPercentageScale Compliance Relative to Key
Scale Compliance Relative to HarmonyPercentageScale Compliance Relative to Harmony
Syllable DistributionRelative DistributionSyllable, Relative Quantity
Words over TimeValues Over TimeStart Time, End Time, Word
Words over TimeValues Over TimeStart Measure, End Measure, Word
Word DistributionRelative DistributionWord, Relative Quantity
Sentence Parts over TimeValues Over TimeStart Time, End Time, Sentence Part
Sentence Parts over TimeValues Over TimeStart Measure, End Measure, Sentence Part
Sentences over TimeValues Over TimeStart Time, End Time, Sentence
Sentences over TimeValues Over TimeStart Measure, End Measure, Sentence
Sentence Sentiment Polarity over TimeValues Over TimeStart Time, End Time, Sentence, Compound Polarity, Very Negative Polarity, Negative Polarity, Neutral Polarity, Positive Polarity, Very Positive Polarity
Sentence Sentiment Polarity over TimeValues Over TimeStart Measure, End Measure, Sentence, Compound Polarity, Very Negative Polarity, Negative Polarity, Neutral Polarity, Positive Polarity, Very Positive Polarity
Aggregated Note Duration DistributionAggregated Relative DistributionNote Duration, Relative Quantity
Aggregated Rest Duration DistributionAggregated Relative DistributionRest Duration, Relative Quantity
Aggregated Note Duration Distribution Dependent on BeatAggregated Relative DistributionBeat, Note Duration, Relative Quantity
Aggregated Beat DistributionAggregated Relative DistributionBeat, Relative Quantity
Aggregated Pitch DistributionAggregated Relative DistributionPitch, Relative Quantity
Aggregated Interval Leap DistributionAggregated Relative DistributionInterval Leap, Relative Quantity
Aggregated Interval Leap Distribution Dependent on BeatAggregated Relative DistributionBeat, Interval Leap, Relative Quantity
Aggregated Dissonance DistributionAggregated Relative DistributionDissonance, Relative Quantity
Aggregated Dissonance Distribution Dependent on BeatAggregated Relative DistributionBeat, Dissonance, Relative Quantity
Aggregated Simultaneously Audible Interval DistributionAggregated Relative DistributionInterval, Relative Quantity
Aggregated Simultaneously Audible Interval Distribution Dependent on BeatAggregated Relative DistributionBeat, Interval, Relative Quantity
Aggregated Time Signature DistributionAggregated Relative DistributionTime Signature, Relative Quantity
Aggregated Key DistributionAggregated Relative DistributionKey, Relative Quantity
Aggregated Harmony DistributionAggregated Relative DistributionHarmony, Relative Quantity
Aggregated Simplified Harmony DistributionAggregated Relative DistributionHarmony, Relative Quantity
Aggregated Implicit Harmony DistributionAggregated Relative DistributionImplicit Harmony, Relative Quantity
Aggregated Simplified Implicit Harmony DistributionAggregated Relative DistributionImplicit Harmony, Relative Quantity
Aggregated Harmony Duration DistributionAggregated Relative DistributionHarmony Duration, Relative Quantity
Aggregated Harmony Change Beat DistributionAggregated Relative DistributionBeat, Relative Quantity
Aggregated Harmony Distribution Dependent on BeatAggregated Relative DistributionBeat, Harmony, Relative Quantity
Aggregated Harmony Distribution Dependent on DurationAggregated Relative DistributionDuration, Harmony, Relative Quantity
Aggregated Circle of Fifths Distance Distribution of KeysAggregated Relative DistributionCircle of Fifths Distance, Relative Quantity
Aggregated Circle of Fifths Distance Distribution of HarmoniesAggregated Relative DistributionCircle of Fifths Distance, Relative Quantity
Aggregated Circle of Fifths Distance Distribution of Implicit HarmoniesAggregated Relative DistributionCircle of Fifths Distance, Relative Quantity