SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.07518 · 2020

Automatic Analysis and Influence of Hierarchical Structure on Melody, Rhythm and Harmony in Popular Music

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2010.07518.json · badge: /api/ran/2010.07518.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
Dsqvival/hierarchical-structure-analysis canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
convert_time Ran
ran on a synthesized input
Dsqvival/hierarchical-structure-analysis/preprocessing/quantize_and_match.py
code served (permissive licence) · get_code("778388d3d0a9131d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - timestamps: iterated over with `for t in timestamps`, each t has t[0] and t[1]
# - chords: iterated over with `for c in chords`, each c has c[0], c[1], and is modified (c[0] =, c[1] =)
# - The function accesses t[0], t[1], c[0], c[1]
# - It modifies c[0] and c[1] in place
# - Comparisons and arithmetic operations are performed on these values

# timestamps should be a list of items where each item has [time_value, beat_value]
# chords should be a list of items where each item has [start_time, end_time]

timestamps = [
    [0.0, 1],
    [0.5, 2],
    [1.0, 3],
    [1.5, 4],
]

# chords is a list of [start_time, end_time] pairs that will be converted
# These need to be mutable (lists, not tuples) since the function modifies them
chords = [
    [0.1, 0.8],
    [1.05, 1.45],
]

ARGS = {
    "timestamps": timestamps,
    "chords": chords,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
enum_to_list Ran
ran on a synthesized input
Dsqvival/hierarchical-structure-analysis/preprocessing/exported_midi_chord_recognition/complex_chord.py
code served (permissive licence) · get_code("ec9a8b9e3b0348fb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from enum import Enum

# Create a simple enum-like class to pass as `cls`
class TestEnum:
    ITEM_A = 5
    ITEM_B = 10
    ITEM_C = -1
    ITEM_D = 3
    _private_item = 99

ARGS = {
    'cls': TestEnum,
    'valid_only': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_bass Ran
ran on a synthesized input
Dsqvival/hierarchical-structure-analysis/preprocessing/chord_processing.py
code served (permissive licence) · get_code("dc2b7c19cdd6ede1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Analyze the function to understand what it needs
# get_bass(root, inv) takes:
# - root: a string that is either in notes list or in enharm dict
# - inv: a string that is either length 2 (like '2') or used as a key in inversion dict

# Test with valid inputs
root_value = 'C'  # A valid note from the notes list
inv_value = '2'   # A valid inversion key

ARGS = {
    'root': root_value,
    'inv': inv_value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_scale_and_suffix Ran
ran on a synthesized input
Dsqvival/hierarchical-structure-analysis/preprocessing/exported_midi_chord_recognition/complex_chord.py
code served (permissive licence) · get_code("cf88953045846680")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

def get_scale_and_suffix(name):
    result = 'C*D*EF*G*A*B'.index(name[0])
    prefix_length = 1
    if len(name) > 1:
        if name[1] == 'b':
            result = result - 1
            if result < 0:
                result += 12
            prefix_length = 2
        if name[1] == '#':
            result = result + 1
            if result >= 12:
                result -= 12
            prefix_length = 2
    return (result, name[prefix_length:])

ARGS = {
    'name': 'C_major'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_symbol Ran
ran on a synthesized input
Dsqvival/hierarchical-structure-analysis/preprocessing/chord_processing.py
code served (permissive licence) · get_code("dc469c9ad683fa8f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

def make_symbol(kind):
    if '(' in kind:
        k, a = kind.split('(')
        a = a[:-1]
        if not a.isnumeric():
            return kind
        if k == 'min':
            return 'madd' + a
        if k == 'maj':
            return 'add' + a
        return k + 'add' + a
    return kind


ARGS = {
    'kind': 'min(5)'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
match Ran
ran on a synthesized input
Dsqvival/hierarchical-structure-analysis/preprocessing/quantize_and_match.py
code served (permissive licence) · get_code("fc3a60a1cf1f7e08")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Analyze the function to understand what parameters it needs
# The function takes two parameters: chord_1 and chord_2
# Both should be strings representing musical chords

# Looking at how they're used:
# - They're split by ':' to get root
# - They may contain '/' and numeric characters
# - They're checked against the 'notes' list and 'enharm' dict
# - The last character might be numeric (for inversion)
# - The second-to-last character might be 'b' (for flat)

# Construct valid chord strings
chord_1 = "C:maj"  # Simple chord with root C
chord_2 = "C:min"  # Another chord with root C (same bass note)

# Alternative test cases with inversions and bass notes
# chord_1 = "G:maj/2"  # Chord with inversion notation
# chord_2 = "G:maj"

# These should match because they share the same root/bass
ARGS = {
    "chord_1": chord_1,
    "chord_2": chord_2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
scale_name_to_value Ran
ran on a synthesized input
Dsqvival/hierarchical-structure-analysis/preprocessing/exported_midi_chord_recognition/complex_chord.py
code served (permissive licence) · get_code("8e58b16282d6a425")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

def scale_name_to_value(name):
    result = '1*2*34*5*6*78*9'.index(name[-1])
    return (result - name.count('b') + name.count('#') + 12) % 12

# The function takes a 'name' parameter which is a string
# It accesses name[-1] (last character)
# It counts occurrences of 'b' and '#' in the string
# The last character must be in '1*2*34*5*6*78*9'

# Create a valid name string where:
# - Last character is one of: '1', '*', '2', '3', '4', '5', '6', '7', '8', '9'
# - Can contain 'b' and '#' characters anywhere
name = "test#b1"

ARGS = {
    "name": name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
score Ran
ran on a synthesized input
Dsqvival/hierarchical-structure-analysis/preprocessing/key_finding.py
code served (permissive licence) · get_code("e46c2500ec92d4a2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function score() computes the Pearson correlation coefficient
# between two arrays (stats and key) using np.corrcoef().
# np.corrcoef() expects 1D or 2D array-like inputs.
# The function returns element [1, 0] of the correlation matrix.

# Create two 1D numpy arrays for stats and key
np.random.seed(0)
stats = np.random.randn(10)
key = np.random.randn(10)

ARGS = {
    "stats": stats,
    "key": key,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
choose Not yet run
unverified (harvested, no recorded run)
Dsqvival/hierarchical-structure-analysis/preprocessing/finalize_chord.py
code served (permissive licence) · get_code("0a1bcea47f053d39")
How it ran

no invocation recorded.

parse_chord Not yet run
unverified (harvested, no recorded run)
Dsqvival/hierarchical-structure-analysis/preprocessing/chord_processing.py
code served (permissive licence) · get_code("b6a0e2b4b9dfd0b2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Repetition is a basic indicator of musical structure. This study introduces new algorithms for identifying musical phrases based on repetition. Phrases combine to form sections yielding a two-level hierarchical structure. Automatically detected hierarchical repetition structures reveal significant interactions between structure and chord progressions, melody and rhythm. Different levels of hierarchy interact differently, providing evidence that structural hierarchy plays an important role in music beyond simple notions of repetition or similarity. Our work suggests new applications for music generation and music evaluation.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2010.07518")
get_code_for_paper("2010.07518")
have("2010.07518")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2010.07518.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2010.07518.svg)](https://syntology.ai/paper/2010.07518)

Connect an agent — have() is free.