SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.08355 · 2023

Mustango: Toward Controllable Text-to-Music Generation

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 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; 4 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 2 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/2311.08355.json · badge: /api/ran/2311.08355.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/mustango canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
build_relative_position Ran
ran, honoured the contract we drafted
amaai-lab/mustango/modelling_deberta_v2.py
pointer only (licence: MIT); the stored copy get_code serves, from Kowsher/Propulsion, is pointer only (licence: NONE) · get_code("44ee71ec7cb0bca2")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Kowsher/Propulsion, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

configure_dataloaders Ran
ran on a synthesized input
amaai-lab/mustango/beats_model/train_beats.py
code served (permissive licence) · get_code("dab32848a86bc88f")
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 json
import pandas as pd
import tempfile
import os
from torch.utils.data import Dataset, DataLoader
from tqdm import tqdm

# Create temporary JSON files with minimal valid data
def create_temp_dataset(num_instances=2):
    """Create a temporary JSON file with valid beat dataset structure"""
    data = []
    for i in range(num_instances):
        instance = {
            'captions': f'caption {i}',
            'beats': [
                [0.1, 0.5, 1.0],  # beat times
                [1, 2, 1]  # beat classes (will be converted to 0-indexed)
            ]
        }
        data.append(instance)
    
    # Create temporary file
    fd, path = tempfile.mkstemp(suffix='.json', text=True)
    with os.fdopen(fd, 'w') as f:
        for instance in data:
            f.write(json.dumps(instance) + '\n')
    return path

# Create the three dataset files needed
train_file = create_temp_dataset(2)
val_file = create_temp_dataset(2)
test_file = create_temp_dataset(2)

# Create data directory structure to avoid file errors
os.makedirs('data', exist_ok=True)

# Copy temp files to expected locations
import shutil
shutil.copy(train_file, 'data/100train_combined_chatgpt_aug4.json')
shutil.copy(val_file, 'data/100eval_combined_chatgpt_aug4.json')
shutil.copy(test_file, 'data/100test_musiccaps_ep4.json')

# Define arguments for configure_dataloaders
ARGS = {
    'train_batch_size': 2,
    'eval_batch_size': 2,
    'samples': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, torch, tqdm — 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
configure_optimizer Ran
ran; our contract draft was wrong, not the code
amaai-lab/mustango/beats_model/train_beats.py
code served (permissive licence) · get_code("4dab6811065fbe1c")
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 AdamW. 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
from torch.optim import AdamW

torch.manual_seed(0)

# Create a minimal model with named parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.ln = nn.LayerNorm(3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.ln(x)
        x = self.linear2(x)
        return x

# Create model instance
model = SimpleModel()

# Create args object with required attributes
class Args:
    def __init__(self):
        self.wd = 0.01  # weight decay
        self.lr = 1e-4  # learning rate
        self.adam_epsilon = 1e-8  # epsilon for Adam

args = Args()

ARGS = {
    'model': model,
    'args': args
}
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 AdamW — a AdamW output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AdamW 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_padding Ran
ran, honoured the contract we drafted
amaai-lab/mustango/audioldm/hifigan/models.py
pointer only (licence: MIT); the stored copy get_code serves, from isletennos/mmvc_trainer, is pointer only (licence: NONE) · get_code("a26f85d7c72ef39a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from isletennos/mmvc_trainer, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

l2_norm Ran
ran, honoured the contract we drafted
amaai-lab/mustango/layers/layers.py
pointer only (licence: MIT); the stored copy get_code serves, from guozixunnicolas/fundamentalmusicembedding, is pointer only (licence: NONE) · get_code("0fc5d9cde41807d8")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from guozixunnicolas/fundamentalmusicembedding, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

make_log_bucket_position Ran
ran; our contract draft was wrong, not the code
amaai-lab/mustango/modelling_deberta_v2.py
pointer only (licence: MIT); the stored copy get_code serves, from Kowsher/Propulsion, is pointer only (licence: NONE) · get_code("cde5a0a5f4074d68")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Kowsher/Propulsion, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

rounding Ran
ran, honoured the contract we drafted
amaai-lab/mustango/layers/layers.py
pointer only (licence: MIT); the stored copy get_code serves, from guozixunnicolas/fundamentalmusicembedding, is pointer only (licence: NONE) · get_code("e561180dff3faff6")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from guozixunnicolas/fundamentalmusicembedding, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

configure_scheduler Not yet run
unverified (harvested, no recorded run)
amaai-lab/mustango/beats_model/train_beats.py
code served (permissive licence) · get_code("e24838aedd2adfc0")
How it ran

no invocation recorded.

get_mask Not yet run
unverified (harvested, no recorded run)
amaai-lab/mustango/modelling_deberta_v2.py
pointer only (licence: MIT); the stored copy get_code serves, from Kowsher/Propulsion, is pointer only (licence: NONE) · get_code("11c7e96cb235d1f7")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Kowsher/Propulsion, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 9 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 1 the same month, 9 later) and 0 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
get_padding 53 other papers
28 dated earlier, 2 the same month, 22 later, 1 undated · 4 only as an assembly brick
1910.10838 (2019-10)
Zero-Shot Multi-Speaker Text-To-Speech with State-of-the-art Neural Speaker Embeddings
2006.04558 (2020-06)
FastSpeech 2: Fast and High-Quality End-to-End Text to Speech
2006.06873 (2020-06)
FastPitch: Parallel Text-to-speech with Pitch Prediction
and 50 more not named here
get_mask 4 other papers
1 dated earlier, 3 later
2208.00108 (2022-08)
Some Practice for Improving the Search Results of E-commerce
2024.naacl-long.459 (2024 (year only))
Mustango: Toward Controllable Text-to-Music Generation
2406.15487 (2024-06)
Improving Text-To-Audio Models with Synthetic Captions
and 1 more not named here
build_relative_position 3 other papers
3 later
2024.naacl-long.459 (2024 (year only))
Mustango: Toward Controllable Text-to-Music Generation
2406.15487 (2024-06)
Improving Text-To-Audio Models with Synthetic Captions
2409.10927 (2024-09)
Propulsion: Steering LLM with Tiny Fine-Tuning
make_log_bucket_position 3 other papers
3 later
2024.naacl-long.459 (2024 (year only))
Mustango: Toward Controllable Text-to-Music Generation
2406.15487 (2024-06)
Improving Text-To-Audio Models with Synthetic Captions
2409.10927 (2024-09)
Propulsion: Steering LLM with Tiny Fine-Tuning
configure_optimizer 2 other papers
1 dated earlier, 1 later
2210.16495 (2022-10)
Two is Better than Many? Binary Classification as an Effective Approach to Multi-Choice Question Answering
2024.naacl-long.459 (2024 (year only))
Mustango: Toward Controllable Text-to-Music Generation
configure_scheduler 2 other papers
1 dated earlier, 1 later
2210.16495 (2022-10)
Two is Better than Many? Binary Classification as an Effective Approach to Multi-Choice Question Answering
2024.naacl-long.459 (2024 (year only))
Mustango: Toward Controllable Text-to-Music Generation
l2_norm 2 other papers
1 dated earlier, 1 later
2212.00973 (2022-12)
A Domain-Knowledge-Inspired Music Embedding Space and a Novel Attention Mechanism for Symbolic Music Modeling
2024.naacl-long.459 (2024 (year only))
Mustango: Toward Controllable Text-to-Music Generation
rounding 2 other papers
1 dated earlier, 1 later
2212.00973 (2022-12)
A Domain-Knowledge-Inspired Music Embedding Space and a Novel Attention Mechanism for Symbolic Music Modeling
2024.naacl-long.459 (2024 (year only))
Mustango: Toward Controllable Text-to-Music Generation
configure_dataloaders 1 other paper
1 later
2024.naacl-long.459 (2024 (year only))
Mustango: Toward Controllable Text-to-Music Generation

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

The quality of the text-to-music models has reached new heights due to recent advancements in diffusion models. The controllability of various musical aspects, however, has barely been explored. In this paper, we propose Mustango: a music-domain-knowledge-inspired text-to-music system based on diffusion. Mustango aims to control the generated music, not only with general text captions, but with more rich captions that can include specific instructions related to chords, beats, tempo, and key. At the core of Mustango is MuNet, a Music-Domain-Knowledge-Informed UNet guidance module that steers the generated music to include the music-specific conditions, which we predict from the text prompt, as well as the general text embedding, during the reverse diffusion process. To overcome the limited availability of open datasets of music with text captions, we propose a novel data augmentation method that includes altering the harmonic, rhythmic, and dynamic aspects of music audio and using state-of-the-art Music Information Retrieval methods to extract the music features which will then be appended to the existing descriptions in text format. We release the resulting MusicBench dataset which contains over 52K instances and includes music-theory-based descriptions in the caption text. Through extensive experiments, we show that the quality of the music generated by Mustango is state-of-the-art, and the controllability through music-specific text prompts greatly outperforms other models such as MusicGen and AudioLDM2.

For agents

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

get_harvested_code_for_paper("2311.08355")
get_code_for_paper("2311.08355")
have("2311.08355")

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

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

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

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

Connect an agent — have() is free.