---
title: Bar-level AI Composing Helper (BACH)
url: https://www.emergentmind.com/topics/bar-level-ai-composing-helper-bach
type: topic
---

# Bar-level AI Composing Helper (BACH)

Searching arXiv for the core BACH paper and closely related interactive symbolic composition work.
Bar-level AI Composing Helper (BACH) is a score-centric song-generation system built around the claim that the **bar** is the smallest meaningful semantic unit for songs because it encodes meter, strong and weak beats, and synchronization across melody, accompaniment, and multiple tracks. Rather than attempting to learn song generation directly from raw audio, BACH adopts a **“compose first, perform later”** pipeline: it generates a human-editable symbolic score in ABC notation and delegates final audio realization to downstream rendering tools. In this design, BACH itself generates symbolic scores, while the full system produces audio only after score rendering [2508.01394].

## 1. Historical position and problem framing

BACH is situated against a longer line of symbolic and interactive composition systems that treated controllability as a central problem rather than an afterthought. Earlier work on constrained symbolic composition combined human input with sequence models and finite-state constraints, extending Markovian constrained sampling to more expressive non-Markov models through sequential Monte Carlo and beam-search strategies for reharmonization [1612.00092]. DeepBach then made Bach-chorale generation explicitly **steerable**, replacing left-to-right generation with conditionally editable note variables and pseudo-Gibbs sampling under positional constraints such as fixed notes, rhythms, cadences, metadata, and fixed voices [1612.01010]. The Bach Doodle demonstrated that short-span harmonization could be made interactive at scale by using Coconet in the browser, reducing harmonization latency from 40 seconds to 2 seconds for a two-measure task [1907.06637]. Later interface work for pop-music infilling showed how per-track and per-bar controls, including track density, polyphony, occupation rate, and bar tonal tension, could be exposed in a musician-facing workflow over selected bars [2203.12736].

Within that lineage, BACH addresses a broader prompt-to-song setting and frames its contribution around four persistent limitations of prior song-generation systems: **controllability**, **generalizability**, **perceptual quality**, and **duration**. The paper argues that these problems arise because prevailing approaches try to learn music theory directly from raw audio, whereas BACH makes human-editable symbolic score generation the center of the system [2508.01394].

## 2. Compose-first, perform-later pipeline

The full BACH pipeline has three stages. First, an LLM, identified as **Qwen3.0**, converts a brief user request into multilingual lyrics and style metadata, organizing the lyrics hierarchically into sections such as **intro, verse, chorus, bridge, outro**. Second, BACH takes those lyrics and tags and generates a **bar-aligned symbolic score in ABC notation**. Third, the score is converted into performance audio: ABC is converted to MIDI, **FluidSynth** renders accompaniment audio, **VOCALOID** renders the sung vocal track, and the outputs are mixed into the final song [2508.01394].

This architecture is also the basis of BACH’s claim to human controllability. Because the intermediate object is a readable symbolic score rather than opaque audio tokens, users can edit the generated sheet music and lyrics directly, then re-render the song. The paper explicitly presents this as a remedy to black-box audio generation, where local changes typically require regenerating entangled audio containing composition, arrangement, timbre, performance nuance, and mixing. A common misconception is therefore that BACH is itself a raw-audio model. It is not: BACH is the **middle symbolic composition stage** in a larger score-to-performance system [2508.01394].

## 3. Symbolic representation and bar-level tokenization

BACH uses **ABC notation**, a text-based symbolic format that can represent pitch, rhythm, bar lines, lyrics, and multi-voice information. The representation is operationalized through **bar-stream patching** rather than byte-level or BPE tokenization. A score is first segmented by **bar**; each bar is then split into **non-overlapping 16-character patches**; and if the final patch is shorter than 16 characters, it is **zero-padded**. The vocabulary is defined as **all possible 16-character ASCII strings**, plus three special symbols; the method description also uses control markers such as `\langle SOA \rangle`, `\langle EOA \rangle`, `\langle EOD \rangle`, `[START]`, and `[END]` [2508.01394].

This tokenization reflects the paper’s core representational thesis. Timing inside a bar is not recoded into a separate event vocabulary; instead, meter, note lengths, rests, ties, bar lines, and lyric alignment remain encoded through the original ABC characters. Track structure is handled through **Dual-NTP**, which routes each patch token into one of two streams: **vocal** and **accompaniment**. The representation therefore makes three commitments simultaneously: the bar is the primary semantic unit, score text remains human-readable, and vocal and accompaniment streams are modeled as distinct but synchronized symbolic channels [2508.01394].

A plausible implication is that BACH’s notion of “bar-level” is not merely user-interface terminology. It is built into tokenization, timing organization, and the separation between high-level composition and downstream performance rendering.

## 4. Hierarchical generation procedure and formal structure

BACH combines two hierarchies: **song-section hierarchy** and **bar-level symbolic hierarchy**. The main structural conditioning mechanism is **Chain-of-Score (CoS)**, which serializes instruction, style tags, raw lyrics, and section-wise score spans into a single training document:

$$
\mathcal{D}_{\text{cos}} = \text{Instruct} \circ \text{Tag} \circ \text{Lyrics} \circ \left( \bigcirc_{i=1}^{N} s_i \right) \circ \langle EOD \rangle
$$

Each section is serialized as

$$
s_i = [START] \circ \tau_i \circ \ell_i \circ \langle SOA \rangle \circ \psi_i \circ \langle EOA \rangle \circ [END]
$$

where $\tau_i$ is the structure label for section $i$, $\ell_i$ is the section lyric content, and $\psi_i$ is the sequence of Dual-NTP score tokens [2508.01394].

Architecturally, the score generator uses **two nested decoders**. A **patch-level decoder** models dependencies between score patches, while a **character-level decoder** autoregressively predicts the characters of the next patch. The paper also recalls the standard next-token factorization

$$
p(\mathbf{x}_{1:T}) = \prod_{t=1}^{T} p(x_t \mid x_{<t}; \theta)
$$

and specializes it to Dual-NTP by jointly predicting vocal and accompaniment streams:

$$
p(\mathbf{v}_{1:T}, \mathbf{a}_{1:T}) = \prod_{t=1}^{T} p(v_t, a_t \mid v_{<t}, a_{<t}; \theta)
$$

with inference written as

$$
(\hat{v}_t, \hat{a}_t) = \arg\max_{(v_t, a_t)} p(v_t, a_t \mid v_{<t}, a_{<t}; \theta)
$$

The paper also defines in-context style transfer by prepending a reference excerpt:

$$
\mathcal{D}_{\text{icl}} = \mathcal{A}_{\text{ref}} \circ \mathcal{D}_{\text{cos}}
$$

[2508.01394]

Training uses a large symbolic corpus described in token counts rather than song counts: **1B conditional vocal tokens**, **about 10B unconditional music tokens**, and **2B CoS music tokens**. During annealing, **1B CoS tokens** from a high-quality subset are replicated fourfold to create a **4B ICL dataset**. The reported mixture ratios are **conditional : unconditional = 1 : 3** and **music : speech = 10 : 1** before annealing, then **CoS : ICL = 2 : 1** during annealing. The evaluated system is **BACH-1B**, indicating roughly a 1B-parameter model. Test-time decoding includes forced decoding inside the score span, **top-k = 50**, **top-p = 0.93**, **temperature = 1**, **repetition penalty = 1.1**, **max new tokens = 3000**, and classifier-free guidance with scale $s = 1.5$ [2508.01394].

## 5. Human controllability and symbolic editing

BACH’s controllability operates at several levels. At the **prompt level**, the user specifies style and content. At the **lyrics and style-tag level**, Qwen3.0 expands the prompt into multilingual lyrics and explicit section annotations. At the **structural level**, Chain-of-Score makes sections such as intro, verse, chorus, bridge, and outro explicit. At the **bar level**, users can modify melody, rhythm, lyric-to-melody alignment, accompaniment content, and local phrase structure directly in the symbolic score. At the **track level**, Dual-NTP separates vocal and accompaniment streams so that one can be revised without necessarily disturbing the other [2508.01394].

This symbolic editability distinguishes BACH from raw-audio systems and also from earlier Bach-specific interactive models. DeepBach, for example, achieved steerability by making every note a conditionally editable variable in a four-part chorale representation; BACH instead generalizes the idea to prompt-conditioned long-song generation with lyrics, section structure, vocal/accompaniment separation, and symbolic score rendering [1612.01010]. The result is not merely “control” in the sense of prompt steering, but an explicit human-in-the-loop editing substrate.

The same point clarifies another common misconception. BACH is not a hidden-score model that only exposes audio afterward. The score is the principal artifact. The paper repeatedly presents this as the reason users can preserve satisfactory parts, revise unsatisfactory bars, alter local rhythm or melody, and re-render without resampling an entire song [2508.01394].

## 6. Empirical results, limitations, and broader significance

The evaluation protocol compares **BACH-1B** against **YuE**, **YuE-light**, **Suno**, **Udio**, **Hailuo**, **Tiangong**, and partially **SongComposer**, with each model generating **20 full-length English songs** from diverse prompts. Reported automatic metrics include KL Divergence, FAD, CE, CU, PC, PQ, CLAP, and CLaMP 3. In the table reproduced in the paper, **BACH** attains **KL 0.391**, **FAD 1.526**, **CE 7.323**, **CU 7.976**, **PC 6.531**, **PQ 8.220**, **CLAP 0.212**, **CLaMP 3 0.263**, and the best reported **overall score of 28.608**. The paper states that BACH sets SOTA on three individual metrics and the overall composite, ties the top PQ score at **8.220**, and beats commercial systems on **CLaMP 3** alignment with **0.263** [2508.01394].

Human evaluation uses **50 raters**—**10 AI researchers**, **5 trained musicians**, and **35 non-experts**—in blind A/B comparisons. The detailed discussion reports that BACH **significantly outperforms** Hailuo, Tiangong, and YuE-light, **moderately surpasses** YuE and Udio, and is **competitive with Suno**, though still trailing Suno overall in musicality. It is described as especially strong in **vocal quality**, **melodic attractiveness**, **accompaniment quality improvements over open models**, and **vocal-backtrack matching**. The paper also states that BACH produces the **longest average duration** and **greatest upper-bound song length** among compared systems, and claims **minute-level generation** versus **hours** for the strongest open-source baseline [2508.01394].

The limitations are explicit. Final audio quality is still bounded by the renderer, since accompaniment is rendered with FluidSynth and vocals with VOCALOID. The system does **not** use a dedicated learned score-to-audio model. Open high-quality song datasets remain limited. Automatic metrics are acknowledged as imperfect proxies for human perception. In controllability, the system is reported to be especially good at **tempo/rhythm control** and **instrument/vocal control**, but weaker at **genre control** and **emotion control** [2508.01394].

In a broader symbolic-composition context, BACH’s emphasis on editable notation aligns naturally with symbolic evaluation methods. Interpretable grading functions for four-part Bach-style chorales, based on pitch, rhythm, per-voice intervals, harmonic qualities, parallel errors, and repeated sequences, have already been proposed as automatic critics for symbolic generation [2006.13329]. This suggests that score-centric generation and score-centric evaluation are technically complementary. A plausible implication is that BACH’s most durable contribution is not only a set of leaderboard results, but a reframing of song generation itself: from “generate audio that contains music” to “generate music, then perform it.”

Source: https://www.emergentmind.com/topics/bar-level-ai-composing-helper-bach