Skip to main content
QUICK REVIEW

[Paper Review] Controllable deep melody generation via hierarchical music structure representation

Shuqi Dai, Zeyu Jin|arXiv (Cornell University)|Sep 2, 2021
Music and Audio ProcessingComputer Science33 references13 citations
TL;DR

This paper proposes MusicFrameworks, a hierarchical music structure representation that enables controllable, long-form melody generation by decomposing music into section/phrase structures, basic melody, rhythm, and chord constraints. Using separate transformer-based networks for rhythm and melody generation, followed by autoregressive refinement conditioned on these components, the method achieves human-comparable musicality in 50% of listening tests, demonstrating strong controllability and sample efficiency through structured, modular generation.

ABSTRACT

Recent advances in deep learning have expanded possibilities to generate music, but generating a customizable full piece of music with consistent long-term structure remains a challenge. This paper introduces MusicFrameworks, a hierarchical music structure representation and a multi-step generative process to create a full-length melody guided by long-term repetitive structure, chord, melodic contour, and rhythm constraints. We first organize the full melody with section and phrase-level structure. To generate melody in each phrase, we generate rhythm and basic melody using two separate transformer-based networks, and then generate the melody conditioned on the basic melody, rhythm and chords in an auto-regressive manner. By factoring music generation into sub-problems, our approach allows simpler models and requires less data. To customize or add variety, one can alter chords, basic melody, and rhythm structure in the music frameworks, letting our networks generate the melody accordingly. Additionally, we introduce new features to encode musical positional information, rhythm patterns, and melodic contours based on musical domain knowledge. A listening test reveals that melodies generated by our method are rated as good as or better than human-composed music in the POP909 dataset about half the time.

Motivation & Objective

  • Address the challenge of generating long-term structured melodies with consistent repetition and form, a key limitation in existing deep learning music generation models.
  • Improve controllability in music generation by enabling user manipulation of high-level structures such as sections, phrases, melodic contours, and rhythm patterns.
  • Reduce data requirements and model complexity by factoring music generation into sub-problems (rhythm, basic melody, full melody) using modular, hierarchical representations.
  • Integrate musical inductive biases—such as positional encoding, contour modeling, and rhythmic patterns—into deep learning models to improve sample efficiency and musicality.
  • Evaluate the method against human-composed music using both objective metrics and large-scale subjective listening tests to assess musical quality and usability.

Proposed method

  • Introduce MusicFrameworks: a hierarchical music structure representation that models songs at multiple levels—global sections, phrase-level structures, and local rhythmic/melodic forms.
  • Decompose melody generation into three stages: (1) generate basic rhythm using a transformer-based network; (2) generate basic melody using another transformer; (3) generate full melody autoregressively conditioned on chords, basic melody, and rhythm.
  • Design domain-specific feature encodings for musical position, melodic contour, and rhythm patterns to inject musical inductive biases into neural networks.
  • Use a two-stage training process: first train basic rhythm and melody networks independently, then fine-tune the full melody network with ground-truth structure inputs.
  • Enable controllability by allowing users to edit music frameworks at any level (e.g., change chord progression, alter contour, modify rhythm form), with the model generating new melodies accordingly.
  • Apply analysis algorithms to extract music frameworks from existing human-composed songs, enabling style imitation and data-efficient training.

Experimental results

Research questions

  • RQ1Can a hierarchical music structure representation improve the consistency and long-term coherence of deep-generated melodies?
  • RQ2To what extent can user-controlled modifications to music frameworks (e.g., chord changes, contour, rhythm) lead to meaningful and musically plausible melody variations?
  • RQ3Does the use of modular, structure-aware generation reduce data requirements while maintaining or improving musical quality compared to end-to-end generation?
  • RQ4How does the musical quality of MusicFrameworks-generated melodies compare to human-composed music in subjective listening tests?
  • RQ5What role do music-specific inductive biases (e.g., contour, rhythmic patterns) play in enhancing model performance with limited training data?

Key findings

  • In listening tests, melodies generated using MusicFrameworks were rated as good as or better than human-composed music in approximately 50% of comparisons, indicating strong musicality and usability.
  • The method significantly outperformed baseline models that skipped the basic melody and rhythm generation steps, with preference tests showing higher ratings when these frameworks were used.
  • Melodies conditioned on generated basic melody and rhythm were rated similarly to those conditioned on human-composed counterparts, indicating that the model learns realistic and musically coherent representations.
  • Despite a statistically significant preference for human-composed music in some comparisons (e.g., 0 vs 1), the overall performance suggests that MusicFrameworks can produce high-quality, human-competitive results.
  • Listeners noted that sampling artifacts and repeated notes occasionally degraded perceived musicality, but these issues were relatively rare and did not dominate the overall perception.
  • The method demonstrated that long-term structural consistency is achievable through hierarchical representation, with repeated phrases sharing the same framework and generating musically coherent variations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.