# Slides

## Slides

• The lesson on data structures and algorithms slides

## Assignment

Using multiple computer structures and solving symbolic alignments for classical music pieces in Python.

In this exercise, we will use our knowledge on computer structures to solve a very well-known problem of symbolic alignement. Hence, the overall goal of your work is

1. Implement a string alignment algorithm
2. Try to apply this to a collection of classical music pieces names
3. Develop your own more adapted procedure to the specific problem of classical names matching
4. Proposing your own approach to the problem of MIDI quality evaluation
5. Extending your alignment algorithm to align MIDI scores

To simplify your work, the global layout of the exercise has been pre-coded inside the atiam-fpa.py script. You simply have to follow the questions written along the script, and insert your own code where the following tags appear

The set of classical music pieces is provided in the atiam-fpa.pkl file, which is already loaded at this point of the script and contain two structures

### Dependencies

In order to get the baseline script to work, you need to have a working distribution of Python, along with the following libraries

We highly recommend that you install Pip or Anaconda that will manage the automatic installation of those Python libraries (along with their dependencies).

For those of you who have never coded in Python, here are a few interesting resources to get started.

### Baseline

After unzipping the file, you will find the following files

### Questions

All the questions are already detailed inside the code provided in the atiam-fpa.py script, but we recall them here and also provide an indicative grading value for each. Remember that if you have trouble implementing it, you can at least provide a commented answer as to how you would approach the solution.

(3 pts) - Q-1.1 Implement the Needleman-Wunsch (NW) algorithm.

(1 pts) - Q-2.1 Sort the collection of composers by decreasing number of tracks

(1 pts) - Q-2.2 Apply the NW algorithm between all tracks of each composer

(2 pts) - Q-2.3 Extend your previous code so that it can compare

(5 pts) - Q-3.1 Extending to a true musical name matching

(1 pts) - Q-4.1 Import and plot some MIDI files

(3 pts) - Q-4.2 Exploring MIDI properties

(5 pts) - Q-5.1 Automatic evaluation of a MIDI file quality

(4 pts) - Q-6.1 Extending your alignment algorithm to MIDI scores

### Instructions

The script defines the overall exercise which should be filled

• Use the given file atiam-fpa.py as a baseline script
• You are authorized to define other files if you prefer
• If stuck with code, you can still write your overall approach as a set of comments to earn some point
• All your files should be packed in a zip file named [ATIAM][FpA2017]FirstName_LastName.zip