{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/whole-song-hierarchical-generation-of","title":"Whole-Song Hierarchical Generation of Symbolic Music Using Cascaded Diffusion Models","arxiv_id":"2405.09901","date":"2024-05-16","proceeding":null,"authors":["Ziyu Wang","Lejun Min","Gus Xia"],"abstract":"Recent deep music generation studies have put much emphasis on long-term generation with structures. However, we are yet to see high-quality, well-structured whole-song generation. In this paper, we make the first attempt to model a full music piece under the realization of compositional hierarchy. With a focus on symbolic representations of pop songs, we define a hierarchical language, in which each level of hierarchy focuses on the semantics and context dependency at a certain music scope. The high-level languages reveal whole-song form, phrase, and cadence, whereas the low-level languages focus on notes, chords, and their local patterns. A cascaded diffusion model is trained to model the hierarchical language, where each level is conditioned on its upper levels. Experiments and analysis show that our model is capable of generating full-piece music with recognizable global verse-chorus structure and cadences, and the music quality is higher than the baselines. Additionally, we show that the proposed model is controllable in a flexible way. By sampling from the interpretable hierarchical languages or adjusting pre-trained external representations, users can control the music flow via various features such as phrase harmonic structures, rhythmic patterns, and accompaniment texture.","url_abs":"https://arxiv.org/abs/2405.09901v1","url_pdf":"https://arxiv.org/pdf/2405.09901v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"whole-song-hierarchical-generation-of","repo_url":"https://github.com/zzwaang/melody-reduction-algo","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"whole-song-hierarchical-generation-of","repo_url":"https://github.com/zzwaang/whole-song-gen","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"music-generation","task_name":"Music Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"focus","method_name":"Focus"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2405.09901","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.09901"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zzwaang/whole-song-gen","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zzwaang/melody-reduction-algo","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran":9,"unverified":2},"by_repo_kind":{"official":{"samples":12,"ran":10,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"7fcbca19e574093c","entry":"args_setting_to_fn","repo":"zzwaang/whole-song-gen","repo_kind":"official","path":"train_main.py","file_url":"https://github.com/zzwaang/whole-song-gen/blob/HEAD/train_main.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7fcbca19e574093c"}},{"code_sha256_prefix":"ec1fe56f43607473","entry":"chord_tone_analysis","repo":"zzwaang/melody-reduction-algo","repo_kind":"official","path":"tonal_reduction_algo/preprocess.py","file_url":"https://github.com/zzwaang/melody-reduction-algo/blob/HEAD/tonal_reduction_algo/preprocess.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ec1fe56f43607473"}},{"code_sha256_prefix":"28ca3ef943791351","entry":"compute_chord_density","repo":"zzwaang/melody-reduction-algo","repo_kind":"official","path":"tonal_reduction_algo/postprocess.py","file_url":"https://github.com/zzwaang/melody-reduction-algo/blob/HEAD/tonal_reduction_algo/postprocess.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"28ca3ef943791351"}},{"code_sha256_prefix":"c6a39c23b51cf3a7","entry":"compute_onset_type","repo":"zzwaang/melody-reduction-algo","repo_kind":"official","path":"tonal_reduction_algo/shortest_path_algo.py","file_url":"https://github.com/zzwaang/melody-reduction-algo/blob/HEAD/tonal_reduction_algo/shortest_path_algo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c6a39c23b51cf3a7"}},{"code_sha256_prefix":"f4759550e29f75c4","entry":"path_to_chord_bins","repo":"zzwaang/melody-reduction-algo","repo_kind":"official","path":"tonal_reduction_algo/postprocess.py","file_url":"https://github.com/zzwaang/melody-reduction-algo/blob/HEAD/tonal_reduction_algo/postprocess.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f4759550e29f75c4"}},{"code_sha256_prefix":"433e78e1dce73946","entry":"read_label","repo":"zzwaang/melody-reduction-algo","repo_kind":"official","path":"utils/read_pop909.py","file_url":"https://github.com/zzwaang/melody-reduction-algo/blob/HEAD/utils/read_pop909.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"433e78e1dce73946"}},{"code_sha256_prefix":"598a1dd94153ebfc","entry":"read_melody","repo":"zzwaang/melody-reduction-algo","repo_kind":"official","path":"utils/read_pop909.py","file_url":"https://github.com/zzwaang/melody-reduction-algo/blob/HEAD/utils/read_pop909.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"598a1dd94153ebfc"}},{"code_sha256_prefix":"1a4ffbef4040544c","entry":"remove_offset","repo":"zzwaang/melody-reduction-algo","repo_kind":"official","path":"tonal_reduction_algo/preprocess.py","file_url":"https://github.com/zzwaang/melody-reduction-algo/blob/HEAD/tonal_reduction_algo/preprocess.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1a4ffbef4040544c"}},{"code_sha256_prefix":"c3758ae46c228a29","entry":"return_chord_tone_score","repo":"zzwaang/melody-reduction-algo","repo_kind":"official","path":"tonal_reduction_algo/shortest_path_algo.py","file_url":"https://github.com/zzwaang/melody-reduction-algo/blob/HEAD/tonal_reduction_algo/shortest_path_algo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c3758ae46c228a29"}},{"code_sha256_prefix":"17e3972e3dd8279b","entry":"return_onset_score","repo":"zzwaang/melody-reduction-algo","repo_kind":"official","path":"tonal_reduction_algo/shortest_path_algo.py","file_url":"https://github.com/zzwaang/melody-reduction-algo/blob/HEAD/tonal_reduction_algo/shortest_path_algo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"17e3972e3dd8279b"}},{"code_sha256_prefix":"d061d35354d16c14","entry":"chord_bins_to_reduction_mat","repo":"zzwaang/melody-reduction-algo","repo_kind":"official","path":"tonal_reduction_algo/postprocess.py","file_url":"https://github.com/zzwaang/melody-reduction-algo/blob/HEAD/tonal_reduction_algo/postprocess.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d061d35354d16c14"}},{"code_sha256_prefix":"fff56ef56b160eeb","entry":"chord_id_analysis","repo":"zzwaang/melody-reduction-algo","repo_kind":"official","path":"tonal_reduction_algo/preprocess.py","file_url":"https://github.com/zzwaang/melody-reduction-algo/blob/HEAD/tonal_reduction_algo/preprocess.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fff56ef56b160eeb"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}