SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.02255 · 2024

MidiCaps: A large-scale MIDI dataset with text captions

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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 7 have no contract verdict; 3 failures of our instrument; 1 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/2406.02255.json · badge: /api/ran/2406.02255.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
AMAAI-Lab/MidiCaps canonical (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
amaai-lab/t2m-inferalign community (classifier label)
classifier basis not recorded on the link
10 ran · 0 no recorded run
FunctionStatusWhere it lives
apply_rotary_emb Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
amaai-lab/t2m-inferalign/Text2midi/model/transformer_model.py
code served (permissive licence) · get_code("24ced75a01bea6eb")
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 Tensor, ndim 4, 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

torch.manual_seed(0)

# The function expects:
# x: shape (b_sz, n_head, s_len, d_head)
# freqs_cis: shape (s_len, d_head // 2, 2) based on the indexing [..., 0] and [..., 1]

b_sz = 2
n_head = 3
s_len = 4
d_head = 8

# Create x tensor with shape (b_sz, n_head, s_len, d_head)
x = torch.randn(b_sz, n_head, s_len, d_head)

# Create freqs_cis tensor with shape (s_len, d_head // 2, 2)
# The function indexes it as freqs_cis[..., 0] and freqs_cis[..., 1]
freqs_cis = torch.randn(s_len, d_head // 2, 2)

ARGS = {
    "x": x,
    "freqs_cis": freqs_cis,
}
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 Tensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py could not observe it (import:OSError)
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
cal_diameter Ran
ran on a synthesized input
amaai-lab/t2m-inferalign/key_reward.py
code served (permissive licence) · get_code("f8789c7ce4c9a34d")
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 1, 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 numpy as np

# Create a small piano roll: shape (pitch_range, time_steps)
# The function iterates over piano_roll.shape[1] (time steps)
# and piano_roll[:, i] (pitches at each time step)
piano_roll = np.zeros((12, 8), dtype=np.float32)
# Add some non-zero values to simulate notes
piano_roll[0, 0] = 1.0  # Note at pitch 0, time 0
piano_roll[4, 1] = 1.0  # Note at pitch 4, time 1
piano_roll[7, 2] = 1.0  # Note at pitch 7, time 2
piano_roll[11, 3] = 1.0  # Note at pitch 11, time 3
piano_roll[2, 4] = 1.0  # Note at pitch 2, time 4
piano_roll[5, 5] = 1.0  # Note at pitch 5, time 5

ARGS = {
    "piano_roll": piano_roll,
    "key_index": 0,
    "key_change_beat": -1,
    "changed_key_index": -1,
}
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 list, ndim 1, 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
collate_fn Ran
ran on a synthesized input
amaai-lab/t2m-inferalign/Text2midi/model/train_accelerate.py
code served (permissive licence) · get_code("266c755d6259282f")
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 3, 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 torch.nn as nn

torch.manual_seed(0)

# Create a batch of sample items
# Each item is a tuple of (input_ids, attention_mask, labels)
# where each element is a 2D tensor (will be squeezed to 1D in collate_fn)

batch = [
    (
        torch.randint(0, 100, (1, 4)),  # input_ids: shape (1, 4)
        torch.randint(0, 2, (1, 4)),     # attention_mask: shape (1, 4)
        torch.randint(0, 10, (1, 4))     # labels: shape (1, 4)
    ),
    (
        torch.randint(0, 100, (1, 3)),  # input_ids: shape (1, 3) - different seq length
        torch.randint(0, 2, (1, 3)),     # attention_mask: shape (1, 3)
        torch.randint(0, 10, (1, 3))     # labels: shape (1, 3)
    )
]

ARGS = {
    "batch": batch
}
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 3, dtype family int — 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
collate_fn Ran
ran on a synthesized input
amaai-lab/t2m-inferalign/Text2midi/model/train_hf.py
code served (permissive licence) · get_code("22b77295b3aaec86")
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 dict. 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
import torch.nn as nn

torch.manual_seed(0)

# Create a batch of items
# Each item is a tuple of (input_ids, attention_mask, labels)
# Each tensor needs to have an extra dimension to be squeezed
batch_size = 2
seq_length = 4
hidden_dim = 3

batch = []
for i in range(batch_size):
    input_ids = torch.randint(0, 100, (1, seq_length))
    attention_mask = torch.ones(1, seq_length)
    labels = torch.randint(0, 100, (1, seq_length))
    batch.append((input_ids, attention_mask, labels))

ARGS = {
    'batch': batch
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
custom_collate_fn Ran
ran; our contract draft was wrong, not the code
amaai-lab/t2m-inferalign/Text2midi/model/transformer_model.py
code served (permissive licence) · get_code("df9410de11944207")
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) and returned tuple. 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

torch.manual_seed(0)

# The function expects a batch parameter which is a list of dicts
# Each dict should have 'caption' and 'location' keys
batch = [
    {
        'caption': 'A dog in the park',
        'location': [10.5, 20.3, 30.1, 40.2]
    },
    {
        'caption': 'A cat on the mat',
        'location': [5.1, 15.2, 25.3, 35.4]
    }
]

ARGS = {
    'batch': batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
largest_distance Ran
ran on a synthesized input
amaai-lab/t2m-inferalign/key_reward.py
code served (permissive licence) · get_code("2139cdef6aa3fa31")
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
from typing import List

# The function largest_distance takes a list of integers (pitch indices)
# and computes the largest distance between any pair of pitches in 3D space

# Create a simple list of pitch indices
pitches = [0, 1, 5, 8, 12]

ARGS = {
    "pitches": pitches
}
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
piano_roll_to_ce Ran
ran on a synthesized input
amaai-lab/t2m-inferalign/key_reward.py
code served (permissive licence) · get_code("81d44a261c82e3a3")
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 ndarray, ndim 1, dtype family float, shape (3,) 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 numpy as np

# Create a small piano roll: shape (time_steps, pitches)
# The function iterates through piano_roll[:, i] and checks values > 0
# It accesses piano_roll.shape[1]
piano_roll = np.array([
    [1.0, 0.0, 0.5, 0.0],
    [0.0, 1.0, 0.0, 0.8],
    [0.3, 0.0, 0.0, 1.0],
], dtype=np.float32)

shift = 2

ARGS = {
    "piano_roll": piano_roll,
    "shift": shift,
}
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 ndarray, ndim 1, dtype family float, shape (3,) — shape (3,) 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
precompute_freqs_cis Ran
ran; our contract draft was wrong, not the code
amaai-lab/t2m-inferalign/Text2midi/model/transformer_model.py
code served (permissive licence) · get_code("22480b5c1cf849b8")
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 Tensor. 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

torch.manual_seed(0)

ARGS = {
    "seq_len": 8,
    "n_elem": 4,
    "base": 10000,
    "dtype": torch.bfloat16,
}
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 Tensor, shape (8, 2, 2) — shape (8, 2, 2) as a later run recorded it
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
preprocess_logits Ran
ran on a synthesized input
amaai-lab/t2m-inferalign/Text2midi/model/train_hf.py
code served (permissive licence) · get_code("71c1ded06c1801c2")
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 Tensor, ndim 1, dtype family int, shape (2,) 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
from torch import Tensor

torch.manual_seed(0)

# Create tiny logits tensor: batch_size=2, num_classes=4
logits = torch.randn(2, 4)

# Create a dummy second tensor (used as _ in the function signature)
dummy_tensor = torch.randn(2, 3)

ARGS = {
    "logits": logits,
    "_": dummy_tensor,
}
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 Tensor, ndim 1, dtype family int, shape (2,) — shape (2,) 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
save_wav Ran
ran on a synthesized input
amaai-lab/t2m-inferalign/Text2midi/utils/midi_to_wav.py
code served (permissive licence) · get_code("a8ee7e2003a27b10")
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 os
import tempfile

# Create temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create a minimal valid MIDI file (SMF format)
midi_filepath = os.path.join(temp_dir, 'test.mid')
with open(midi_filepath, 'wb') as f:
    # Minimal MIDI file structure
    f.write(b'MThd')  # Header chunk type
    f.write(b'\x00\x00\x00\x06')  # Header length (6 bytes)
    f.write(b'\x00\x00')  # Format type 0
    f.write(b'\x00\x01')  # Number of tracks (1)
    f.write(b'\x00\x60')  # Division (96 ticks per quarter note)
    f.write(b'MTrk')  # Track chunk type
    f.write(b'\x00\x00\x00\x04')  # Track length (4 bytes)
    f.write(b'\x00\xff\x2f\x00')  # End of track meta event

# Create output wav filepath (we won't actually create the file due to missing fluidsynth)
wav_filepath = os.path.join(temp_dir, 'test.wav')

ARGS = {
    'midi_filepath': midi_filepath,
    'wav_filepath': wav_filepath,
}
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_mtg_tags Not yet run
unverified (harvested, no recorded run)
AMAAI-Lab/MidiCaps/pipeline.py
code served (permissive licence) · get_code("129801b1d1f45a57")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 8 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.

FunctionAlso present inEarliest-datedOthers named
apply_rotary_emb 1 other paper
1 later
2412.16526 (2024-12)
Text2midi: Generating Symbolic Music from Captions
custom_collate_fn 1 other paper
1 later
2412.16526 (2024-12)
Text2midi: Generating Symbolic Music from Captions
precompute_freqs_cis 1 other paper
1 later
2412.16526 (2024-12)
Text2midi: Generating Symbolic Music from Captions

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

Generative models guided by text prompts are increasingly becoming more popular. However, no text-to-MIDI models currently exist due to the lack of a captioned MIDI dataset. This work aims to enable research that combines LLMs with symbolic music by presenting, the first openly available large-scale MIDI dataset with text captions. MIDI (Musical Instrument Digital Interface) files are widely used for encoding musical information and can capture the nuances of musical composition. They are widely used by music producers, composers, musicologists, and performers alike. Inspired by recent advancements in captioning techniques, we present a curated dataset of over 168k MIDI files with textual descriptions. Each MIDI caption describes the musical content, including tempo, chord progression, time signature, instruments, genre, and mood, thus facilitating multi-modal exploration and analysis. The dataset encompasses various genres, styles, and complexities, offering a rich data source for training and evaluating models for tasks such as music information retrieval, music understanding, and cross-modal translation. We provide detailed statistics about the dataset and have assessed the quality of the captions in an extensive listening study. We anticipate that this resource will stimulate further research at the intersection of music and natural language processing, fostering advancements in both fields.

For agents

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

get_harvested_code_for_paper("2406.02255")
get_code_for_paper("2406.02255")
have("2406.02255")

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

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

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

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

Connect an agent — have() is free.