{'fraction_non_alphanumeric': 0.017721518987341773, 'fraction_numerical': 0.0, 'mean_word_length': 4.842364532019705, '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}}
Recurring Harmonic Walks and Network motifs in Western Music

Western harmony is comprised of sequences of chords, which obey grammatical rules. It is of interest to develop a compact representation of the harmonic movement of chord sequences. Here, we apply an approach from analysis of complex networks, known as "network motifs" to define repeating dynamical patterns in musical harmony. We describe each piece as a graph, where the nodes are chords and the directed edges connect chords which occur consecutively in the piece. We detect several patterns, each of which is a walk on this graph, which recur in diverse musical pieces from the Baroque to modern-day popular music. These patterns include cycles of three or four nodes, with up to two mutual edges (edges that point in both directions). Cliques and patterns with more than two mutual edges are rare. Some of these universal patterns of harmony are well known and correspond to basic principles of music theory such as hierarchy and directionality. This approach can be extended to search for recurring patterns in other musical components and to study other dynamical systems that can be represented as walks on graphs.