The modular program Interactive Music Analysis Tool (I-MaT) produces visualizations of and statistical analyses of sheet music files. The basic idea is to choose between the various options listed by entering yes-no or numbers (1, 2, 3 etc.). The music21 commands on which the program is based are not visible to the user.

Results can be achieved quickly by navigating through simple dialog windows and the selection from the options displayed. The results (visualizations, diagrams, transformed sheet music files, CSV files) are displayed in external programs (MuseScore, matplotlib), in which they can then be further processed or exported.

Programm code: Sebastian Oliver Eck

It is necessary to install Anaconda or Miniconda including the current version of the HfM environment hfm_x.x.x.yml (currently: hfm_1.1.2.yml; see: installation and Setup) and MuseScore.

Downloading the program

Please download the Python script (right click, save link as). If possible, save this on your desktop (Windows/Mac):

Starting the program

1. Opening the Anaconda Powershell Prompt (anaconda3) / Anaconda Prompt (anaconda3)

Open the Anaconda Powershell Prompt/Anaconda Prompt. You can find this in your Windows start menu under:

 Start > Anaconda 3 (64-bit) > Anaconda Powershell Prompt (anaconda3) bzw. Anaconda Prompt (anaconda3)

On Mac you will find the Anaconda Powershell Prompt/Anaconda Prompt in the 'Finder'.

Alternative: Open the Anaconda Powershell Prompt (hfm_1.x.x)/Anaconda Prompt (hfm_1.x.x)

Alternatively, on Windows you may be able to choose one of the following two options:

 Start > Anaconda 3 (64-bit) > Anaconda Powershell Prompt (hfm_1.x.x) bzw. Anaconda Prompt (hfm_1.x.x)

In this case you can skip 2. Activation of the project-specific Python environment and continue directly with 3. Starting the program.

2. Activation of the project-specific Python environment

When opening the Anaconda Powershell Prompt/Anaconda Prompt you will see the following line:

 (base) C:\Users\Username>

Then enter 'conda activate hfm_1.x.x'. After that press Enter:

 (base) C:\Users\Username>conda activate hfm_1.x.x

Note: Instead of '1.x.x' please enter the respective version number (see above)!

The content of the bracket preceding the line should now have changed as follows:

 (hfm_1.x.x) C:\Users\Username>

If you now see an error message, jump to the menu „Troubleshooting“ below.

3. Starting the program

Now enter 'python' and drag the icon of the program file 'I-MaT - Interaktives Musikanalyse-Tool.py' into the prompt window. The file path is now automatically copied into the window. press enter:

 (hfm_1.x.x) C:\Users\Username>python "[Pfad/]I-MaT - Interaktives Musikanalyse-Tool.py"

Note: Pay attention to entering the double quotation marks!

Example: with the program file saved on the desktop (Windows):

 (hfm_1.x.x) C:\Users\Username>python "C:\Users\Username\Desktop\I-MaT - Interaktives Musikanalyse-Tool.py"

The program starts after a few seconds!


If you enter the command:

 (base) C:\Users\Username>conda activate hfm_1.x.x

and receive an error message, either the project-specific Python environment 'hfm_1.x.x' is not installed correctly, or you have entered the wrong version number. To check which project-specific Python environments are installed, enter the following command at the Anaconda Powershell Prompt/Anaconda Prompt and press Enter:

 (base) C:\Users\Username>conda info --envs

The following list shows the project-specific Python environments installed on your computer.

 # conda environments:
 base                  *  C:\Users\Username\anaconda3
 hfm_1.0.0                C:\Users\Username\anaconda3\envs\hfm_1.0.0

If the current version of 'hfm_1.x.x' is missing here, install the project-specific Python environments by following the installation instructions under Windows, Mac or Linux in menu item 2. Project-specific Python environment.

The program is self-explanatory: What you have to do next is in front of the blinking cursor. If there are several options, they are displayed in a list from which you can select an option by entering a number.

When using it for the first time, you must also configure certain music21 settings, if you have not already done this for the Jupyter notebooks. When the program starts, you will be guided through the configuration of your music21 settings file.

See: Settings

Then please select:

 1    PROG: Analysis of a single piece of music

After you have loaded a sheet music file, you come to the so-called main menu, which in its rough structure corresponds to the structure of the Jupyter-Notebooks Basics:

 1    FILE: Menu selection                                              <Basic functions>
 2    TOOL: Menu selection (statistical analysis)                       <Selection of various statistical analysis tools>
 3    TOOL: Menu selection (visualisation)                              <Selection of different visualisation tools>
 4    TOOL: Menu selection (pattern search)                             <Selection of different tools for pattern search>
 5    SETT: Settings                                                    <Settings in the music21 environment file/language settings>
 6    HELP: Project overview                                            <Information about the project "Computer-Aided Music Analysis">
 7    EXIT: Exit program                                                <Exits the Python script>

All further steps are self-explanatory. Enjoy!

When using it for the first time, you have to configure the music21 settings so that you can download music files from the Internet and your music editor (MuseScore3) opens for displaying the music - if you have not already done this for the Jupyter notebooks or you are not guided through the configuration anyway when you start the program for the first time. To do this, select:

 2 SETT: Settings

If you select the following option:

 3 ENVT: Einstellungen neu konfigurieren

you will first be asked to delete the existing settings file. Agree to that. You will then be given the option to reconfigure the settings file. You have to have the local path to your sheet music editor (e.g. MuseScore3.exe) as well as to your folder for the exported graphics, sheet music files and tables ready.

  • en/interaktive_musikanalyse.txt
  • Zuletzt geändert: 2022/01/05 12:02
  • von sebastiane