Skip to content

Basso continuo performance analysis tools, including statistical analysis and performance-to-score alignment

License

Notifications You must be signed in to change notification settings

adamcho14/BassoContinuoPerformanceAnalysisTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basso Continuo Performance Alignment

This software aligns performances from the ACoRD - Aligned Continuo Realization Dataset with their respective scores. The program is written in Python, but uses external modules written in C++ (Nakamura, 2017).

Initialization

The performances are in the Performances directory and the scores in the Scores directory in the dataset. Take the MusicXML score files from the dataset. Directories with the scores and the performances should be copied to root from with the code runs. The software processes the whole Performances directory with its full structure, but the scores have to be put directly to the Scores directory in the root.

Before running the code, install requirements from the requirements.txt file. Make sure that all packages are installed correctly, for reference, see Partitura, Parangonar and Matchmaker websites.

The programs pipeline consitst of two parts:

  1. basso continuo performance alignment
  2. evaluation of the alignment

Alignment of Basso Continuo Performance File

Dataset alignment is done by the file align_dataset.py. It uses the Dataloader object to load the performances, the scores and map each performance to the score with the played basso continuo line. The loaded dataset continuo_dataset can be preprocessed using different preprocessing techniques:

  1. score preprocessing BassLineExtractor is mandatory, as it chooses the basso continuo staff from the score containing multiple staves.
  2. One of two performance preprocessing methods can be used: PerformanceToScoreRangeTrimmer (optional parameter tolerance, otherwise set to 0 by default) or PerformanceInvertedSkyline. The preprocessing methods are created an called as in the following example:
inverted_skyline_preprocessor = pp.PerformanceInvertedSkyline()
inverted_skyline_dataset = inverted_skyline_preprocessor(preprocessed_score_dataset)
  1. Preprocessed datasets are then inputs to four bass alignment methods, each having its own wrapper: BassAlignmentWrapperDTW, BassAlignmentWrapperHMM, BassAlignmentWrapperNakamuraHMM, BassAlignmentWrapperGlue. They can be called on the preprocessed datasets. Three methods use Python packages (installed from requirements), but for Merged-output HMM by Nakamura et al. (2017), make sure that the nakamura_alignment_wrapper is loaded correctly, as it is a C++ tool with a Python wrapper. These methods create each an alignment list, containing dictionaries with one of three alignment labels match, insertion, deletion. Each of these alignment dictionaries can then be used one at a time as supplementary_alignment in point 5.

  2. An AlignedDataset(alignment_name, dataset, alignment) object is created and stored to CSV files, which can be used in `Parangonar.

  3. Similarly to points 3 and 4, PositionBasedRealizationAlignmentWrapper can be called to do the full realization alignment and save it as aligned dataset. Only allowed preprocessing of dataset here is score preprocessing, as performance preprocessings cut out notes that are required for full realization alignment. However, supplementary alignment from step 3 must be chosen to perform the full realization alignment.

Alignment Evaluation

Evaluation is in the file evaluate_dataset_alignment.py. In the code, correct alignment and ground truth alignment (from ACoRD) directories have to be chosen. Each of the three labels (match, insertion, deletion) is tested independently, therefore this has to be chosen before the test as well. The code produces CSV files with precision, recall and F1-score for each file and summaries for the whole label alignment.

About

Basso continuo performance analysis tools, including statistical analysis and performance-to-score alignment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages