SongComposer: A Large Language Model for Lyric and Melody Generation in Song Composition

Shuangrui Ding, Zihan Liu, Xiaoyi Dong, Pan Zhang, Rui Qian +4 more
2/27/2024
cs.SDcs.AIcs.CL

No official code found. Best implementation: pjlab-songcomposer/songcomposer (247 stars, Apache-2.0, last commit 2025-05-30).

Abstract

Creating lyrics and melodies for the vocal track in a symbolic format, known as song composition, demands expert musical knowledge of melody, an advanced understanding of lyrics, and precise alignment between them. Despite achievements in sub-tasks such as lyric generation, lyric-to-melody, and melody-to-lyric, etc, a unified model for song composition has not yet been achieved. In this paper, we introduce SongComposer, a pioneering step towards a unified song composition model that can readily create symbolic lyrics and melodies following instructions. SongComposer is a music-specialized large language model (LLM) that, for the first time, integrates the capability of simultaneously composing lyrics and melodies into LLMs by leveraging three key innovations: 1) a flexible tuple format for word-level alignment of lyrics and melodies, 2) an extended tokenizer vocabulary for song notes, with scalar initialization based on musical knowledge to capture rhythm, and 3) a multi-stage pipeline that captures musical structure, starting with motif-level melody patterns and progressing to phrase-level structure for improved coherence. Extensive experiments demonstrate that SongComposer outperforms advanced LLMs, including GPT-4, in tasks such as lyric-to-melody generation, melody-to-lyric generation, song continuation, and text-to-song creation. Moreover, we will release SongCompose, a large-scale dataset for training, containing paired lyrics and melodies in Chinese and English.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

[ACL 2025 Main] SongComposer: A Large Language Model for Lyric and Melody Generation in Song Composition

24715Shell, PythonFeb 27, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{ding2024songcomposer,
  title  = {SongComposer: A Large Language Model for Lyric and Melody Generation in Song Composition},
  author = {Shuangrui Ding and Zihan Liu and Xiaoyi Dong and Pan Zhang and Rui Qian and Junhao Huang and Conghui He and Dahua Lin and Jiaqi Wang},
  year   = {2024},
  eprint = {2402.17645},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.17645v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.17645.svg)](https://codeofpaper.com/paper/2402.17645)

Discussion