{'fraction_non_alphanumeric': 0.02, 'fraction_numerical': 0.005185185185185185, 'mean_word_length': 5.526570048309178, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
PatternFinder: Content-Based Music Retrieval with music21

Content-Based Music Retrieval (CBMR) for symbolic music aims to find all similar occurrences of a musical pattern within a larger database of symbolic music. To the best of our knowledge there does not currently exist a distributable CBMR software package integrated with a music analysis toolkit that facilitates extendability with new CBMR methods. This project presents a new MIR tool called "PatternFinder" satisfying these goals. PatternFinder is built with the computational musicology Python package music21, which provides a flexible platform capable of working with many music notation formats. To achieve polyphonic CBMR, we implement seven geometric algorithms developed at the University of Helsinki---four of which are being implemented and released publicly for the first time. The application of our MIR tool is then demonstrated through a musicological investigation of Renaissance imitation masses, which borrow melodic or contrapuntal material from a pre-existing musical work. In addition, we show Pattern-Finder's ability to find a contrapuntal pattern over a large dataset, Palestrina's 104 masses. Our investigations demonstrate the relevance of our tool for musicological research as well as its potential application for locating music within digital music libraries.