Manuscript Offprint
arXiv:2610.33434DJustify: Reason-and-Verify DJ Planning for Pop Transitions and Story-Driven Sets
DJJUSTIFY: REASON-AND-VERIFY DJ PLANNING FOR POP TRANSITIONS AND STORY-DRIVEN SETS
Wei-Han Hsu , Li-Jie Lin , Po-Hsuan Lai , Po-Hsiang Huang , Jeng-Yue Liu , Li Su , Yi-Hsuan Yang
Data Science Degree Program, National Taiwan University and Academia Sinica, Taipei, Taiwan
Institute of Information Science, Academia Sinica, Taipei, Taiwan
National Taiwan University, Taipei Taiwan AI Labs, Taipei Carnegie Mellon University, USA
AI Center of Research Excellence (AI-CoRE), National Taiwan University, Taipei, Taiwan
ABSTRACT
Automatic DJ systems mostly target electronic dance music, whose regular structure makes rule-based mixing relatively easier. Vocal-rich popular music is harder: which track to play next, where to cue it, and which transition to use are tied together, so fixed rules handle them poorly. We present DJjustify, a pop AI-DJ that puts an LLM in a reason-propose-verify-repair loop and lets it choose the next track, cue points, and mixing technique together. The LLM samples several transition plans; an external acoustic checker then scores the rendered audio and triggers repair when a check fails. Sampling keeps several candidate transitions per track pair instead of one fixed mix. In blind listening tests our transitions beat Mosaikbox, a reimplemented crossfade, and a cue baseline that reuses the crossfade's cues; that last comparison shows most of the margin comes from cue placement. The same planner also picks and orders a set along an emotion arc: this improves story coherence over a no-story ablation, and within a set story and transition ratings show no measurable gap from a human DJ. The checker mainly adds reliability, not higher average quality: it repairs rare but audible errors such as cut vocals, while the planner stays non-deterministic.
Index Terms— Automatic DJ mixing, large language models, rendered-audio verification, output diversity, story-driven DJ sets
Rule-based systems handle these decisions in different ways. Bittner et al. [1] optimize playlist order and crossfade points; Vande Veire and De Bie [2] pick structural cue points and transition types, with vocal-clash detection, for drum and bass; Mosaikbox [4] separates stems to suppress clashes during the blend. Each relies on hand-set rules, and none revises its choice after hearing the rendered result. A rule that optimizes these decisions independently and deterministically cannot capture their coupling, and it returns a single answer, excluding other valid choices. What is needed is context-dependent reasoning: reading both tracks' structure, vocal activity, and candidate cues together and proposing the next track, its cue points, and the technique as one plan. A large language model (LLM) can do this, and sampling it gives several plans for the same pair rather than a single answer that was already fixed in advance.
A text-only LLM cannot check its own work, however: it cannot hear the mix it plans, and without external feedback its self-checks are unreliable [5, 6, 7]. We therefore close a reason-propose-verify-repair loop with rendered audio. Given the outgoing track and a candidate pool, the LLM proposes an incoming track, a cue-out on the outgoing and a cue-in on the incoming track, an overlap length, and a transition technique; the plan is rendered, an external checker of deterministic acoustic gates reports which gate failed and what to change, and the planner repairs the plan. Rules act as a verifier that bounds the set of valid transitions, not a decider that fixes the output, and the same loop scales from one transition to a story-driven set.
Our contributions are threefold: (i) a non-deterministic LLM DJ planner that samples multiple distinct transitions per track pair, each checked and repaired on the rendered audio (constrained diversity); (ii) a transition system for vocal-rich pop—a setting prior Auto-DJ work largely skips—that significantly outperforms the closest prior automatic systems, including a Spotify-style crossfade, with a controlled cue baseline isolating the importance of cue-point selection; and (iii) to our knowledge the first DJ mixing system whose rendered transitions follow an emotional arc, with story and transition ratings showing no detectable gap from a human DJ in a blind listening test.
2. RELATED WORK
Related work falls into two lines: automatic DJ mixing on one side, and LLM reasoning, self-correction, and music agents on the other.
Equal contribution.
Open-source code and audio demos: https://github.com/ddman1101/DJjustify and https://jamie930625.github.io/djustify/.

Fig. 1. AI-DJ overview. Top: a planner jointly selects the next track, cue points, and technique; the rendered transition is scored by acoustic checks (vocal/energy/structure/pairing) and failures drive repair. Bottom: a story prompt guides track selection and ordering into a valence-arousal arc, invoking the same loop to build a set.
Automatic DJ systems assemble a continuous mix by ordering tracks and synthesizing a transition between successive pairs. Early systems sequence by tempo and energy [8] or pick mix points by beat and latent-topic similarity [9]; more complete pipelines cast cue selection and beat-matched blending as constrained optimization [1, 2], and Mosaikbox adds harmonic compatibility and vocal separation [4]. Learning-based methods instead generate the transition directly: DJtransGAN learns cross-fader and EQ curves adversarially [10], and DJ-AI sequences a playlist and synthesizes transitions with a generative model [11]. Two limitations recur. First, they are built and evaluated almost only on EDM; vocals are handled by separating stems [4] or by detecting overlapping vocals [2], not by cue timing that keeps a sung phrase intact, and quality is judged by beat and harmony rather than by whether a sung line survives. Second, selection, cueing, and synthesis are optimized in isolation, pair by pair, so the play order has no planned emotional shape. We target pop, join selection, cueing, and synthesis in one reason—verify loop, and plan the play order around an emotional arc, which prior Auto-DJ mixing systems do not do. We do not compare against Vande Veire's full pipeline, which is built for drum and bass.
On the LLM side, chain-of-thought prompting improves reasoning [12], though its gains concentrate on symbolic and mathematical tasks [13]. A parallel line lets models revise their own output [14], but without external feedback such self-generated critique often fails to improve or even degrades the answer [5, 6]. LLMs have also driven music agents and composition [15, 16]; closest to us, Chang et al. [17] use chain-of-thought to fuse MIR tool outputs for chord recognition, but over symbolic labels rather than rendered audio.
3. METHOD
Figure 1 gives an overview. The system operates at two levels that share one verified-planning loop: a single transition, and a full story-driven set. Both levels are driven by a single instruction-tuned LLM (Qwen3.6-35B-A3B [18]): the same model plans a transition, selects the next track, and orders a set, differing only in the task prompt. Everything runs locally on one 48 GB NVIDIA RTX 6000 Ada GPU with a 4-bit-quantized LLM; no closed-source APIs are called.
3.1. Song Preprocessing
Off-the-shelf estimators give each track a beat/downbeat grid, a structural segmentation, and chords [3, 19]. Two features drive cue placement and the checker: per-frame singing-voice activity from a CRNN we train for singing-voice detection [20, 21] on the Jamendo corpus [22]; and a valence/arousal label from a regression baseline over MuQ-MuLan embeddings [23], refined in context by an audio-language model reading the audio and its transcribed lyrics [24, 25]. Cue anchors—phrase ends, section boundaries, harmonic restarts, and low-frequency onsets—restrict cues to musically strong, on-grid points and limit where the planner can cue.
3.2. Verified DJ Transition Planning
Given the outgoing track A, a retrieval module supplies a candidate pool, and the planner jointly selects the incoming track B together with a cue-out on A and a cue-in on B—each chosen from a precomputed shortlist of candidate cues at the anchors of §3.1 (a cue card)—an overlap length, and a mixing technique. Techniques range over a continuum of overlap [26], from blend moves (long overlap, e.g. a chorus riding over an outgoing outro) to cut moves (abrupt handover with an effect: echo, brake, backspin, filter). Reasoning corresponds to the model's explicit thinking mode: with it disabled the LLM emits the structured plan directly, whereas enabling it lets the model deliberate over structure, vocal activity, cue anchors, and technique before committing. Because the symbolic anchors are only resolved to on-grid seconds at render time, a plan valid on paper can still fail once rendered, which is why verification runs on the rendered audio. We use deterministic acoustic gates rather than an audio-language-model critic, which can rate audio without reliably perceiving it [27].
Table 1. The checker: rendered-audio gates and corrective actions.
| Gate | Detected failure → corrective action |
|---|---|
| Vocal | Cut mid-phrase → shift the cue to the phrase end |
| Vocal | Vocals collide in the overlap → shorten it or cut |
| Energy | Silent gap or energy hole → adjust length or technique |
| Structure | Early cut in A or late entry in B → move the cue |
| Structure | Entry stays in B's intro → re-cue to the verse or chorus |
| Pairing | Valence-arousal mismatch → re-select track B |
The checker is a set of deterministic acoustic gates over the rendered signal, in four families (Table 1). A failing gate returns an actionable repair—re-cue one phrase later, shorten the overlap, switch technique—not just a rejection, which the planner acts on for up to four rounds; a plan still failing after that is returned flagged, not resampled. Toggling the two mechanisms gives three ablation variants: Ours (reasoning + checker-driven repair), Ours–C (reasoning only), and Ours–C–R (neither).
3.3. Story-Driven DJ Set
To build a set, the same LLM selects and orders tracks into an emotional arc. Starting from a given opening track, it draws from the shared pool the songs whose lyrics, valence/arousal, tempo, and key best realize a rising-and-resolving narrative (opening, build, close), one track per act of the story, under tempo and key compatibility gates. Each resulting junction is then rendered and verified by the transition loop of §3.2 with the pairing fixed, and lyric-hook landing points additionally inform cue placement within each transition. We report Story and No-story (an ablation with the same gates and checker but no story, picking each next track by acoustic compatibility alone), which isolates the effect of story planning.
4. EXPERIMENTS AND RESULTS
4.1. Setup
We run two blind listening tests and an objective ablation. In the transition test (Test1), twelve seed tracks are drawn from real DJ sets; for each, every system is given the same fixed track pair, so the comparison isolates cue placement and transition synthesis (next-track selection is exercised in the DJ-set test, Test2, below; with the pair fixed, the pairing gate that would re-select the incoming track is inactive here). Each participant rates, on a 1–10 scale, transitions from our variants (Ours, Ours–C, Ours–C–R), a human DJ, and three baselines: Mosaikbox [4] (released implementation), a Spotify-style crossfade we implement following Bittner et al. [1] (denoted Bittner'17/Spotify), and a cue baseline, Ours (Bittner cues), that runs our full pipeline—including the repair loop—but seeds its cues from Bittner's detector [1] instead of our vocal-aware anchor selection. In both tests each of our stimuli is the planner's output, generated once, with no re-sampling or selection. In the DJ-set test (Test2), each participant is given one of three story prompts and compares three-minute sets, rating story coherence and transition quality separately; conditions are Story, No-story, a human DJ, and the two automatic systems. Story, the crossfade, and Mosaikbox start each set from the same prescribed opening track, while No-story draws its opener at random from tracks with a valid exit anchor, so the Story–No-story contrast also includes the opener. The human condition was produced by a professional DJ: in Test1 they mix the same fixed pair given to every system, while in Test2 they build each set freely, choosing the tracks, cue points, and techniques. All track selection—by our planner, the automatic baselines, and the human DJ—draws from a shared, self-collected pool of 400 full-length tracks, mostly English-language and Mandarin with some Korean and Japanese pop songs, spanning roughly 75–140 BPM and analyzed as in §3.1. All stimuli are loudness-normalized and beat-matched where applicable; each participant rates a randomly assigned subset of the trials. We collected N=103 respondents for Test1 and N=99 for Test2; 28 of the Test1 respondents report hands-on DJ experience, and we report their ratings separately where relevant. We report mean opinion scores (MOS) with 95% bootstrap confidence intervals, and test differences with permutation tests: paired for Test1 (each comparison restricted to listeners who rated both conditions), and stratified by story for Test2, where each participant hears one story and rates a few of its conditions.

Fig. 2. Transition quality in Test1 (N=103). Bars show mean ratings; error bars are 95% bootstrap confidence intervals. Ours significantly outperforms Mosaikbox, Bittner'17/Spotify, and Ours (Bittner cues); replacing our selected cues with Bittner'17 cues reduces the mean score from 5.6 to 4.8.
For the objective ablation, we measure renderability—whether a sampled plan can be executed without violating hard timing or effect-window constraints—and output diversity, sampling the planner ten times per fixed pair and counting distinct transitions. Two transitions count as distinct if they differ in technique, cut (cue-out) point, or entry (cue-in) point. Unless noted, the planner samples the transition at temperature 0.6 and track selection at 1.0: higher for varied track choices, lower to keep mixes reliable.
4.2. Transition Quality and Cue Placement
Figure 2 reports Test1. Mosaikbox is an EDM mixer run here on pop, and Bittner'17/Spotify is our reimplementation of a beat-matched crossfade, not Bittner's full playlist optimizer. Ours is preferred over Mosaikbox (5.6 vs. 4.0; paired , ), the crossfade (5.6 vs. 4.7; , ), and Ours (Bittner cues) (5.6 vs. 4.8; , ), and stays below the human DJ (5.6 vs. 6.7; , ); all four comparisons remain significant under Holm correction. Among the 28 DJ-experienced listeners the same pattern holds, and they place the human DJ further ahead () than the other listeners do.
The comparison with Ours (Bittner cues) isolates the value of our cue selection. It runs the same pipeline and repair loop but seeds its cues from Bittner's detector rather than our vocal-aware anchors; it drops to 4.8, below all three variants (5.7, 5.5, and 5.6 for

Fig. 3. Output diversity over 20 fixed track pairs: for each pair we sample the planner 10 times (T=0.6) and count distinct transitions (differing in technique, cut, or entry). The four settings are proposals without/with reasoning and rendered outputs with the checker (reasoning off) and the full system (Ours). A deterministic rule gives one (dashed line); reasoning raises diversity and repair adds a little.
Table 2. Renderability of planner variants, 100 sampled seeds.
| Variant | Reasoning | Checker | Renderability |
|---|---|---|---|
| Ours-C-R | - | - | 91% |
| Ours-C | ✓ | - | 98% |
| Ours | ✓ | ✓ | 99% |
Ours-C-R, Ours-C, and Ours; against Ours). Even with repair, seeding from an external detector lands on different, lower-rated cues (matching ours on 1 of 12 pairs) and does not reach our level. For vocal-rich pop, then, transition quality depends on the cue candidates the planner starts from; repair did not close that gap.
4.3. Diversity and Reliability under Verification
Figure 3 compares output diversity across all four combinations of reasoning and checker-driven repair, using ten samples for each of 20 fixed track pairs. The full system returns a median of 6.5 distinct rendered transitions per pair (IQR 5–8), versus one for the deterministic reference. Reasoning increases the median number of distinct proposals from three to five (paired permutation test on the mean difference, ). With checker-driven repair, the median count rises from three to six without reasoning (); with reasoning enabled, it rises from five to 6.5, though not significant (); with reasoning on, repair then adds only a little more.
The no-checker conditions count proposals, whereas the checker conditions count returned rendered outputs. During repair, failed checks prompt changes to cues and techniques rather than rejection. These counts include returned outputs whether or not they pass every gate, showing that multiple alternatives remain after verification.
Table 2 reports execution success over 100 sampled seeds. Renderability rises from in Ours-C-R to in Ours-C and in Ours, with most of the gain coming from reasoning. Most residual failures involve symbolic anchors resolved too close to a track boundary. Renderability measures whether a plan can produce audio, not whether the transition sounds good. The listening test evaluates Ours-C-R, Ours-C, and Ours, adding reasoning and then checker-driven repair; we observe no significant overall dif- ference in their ratings (means 5.7/5.5/5.6; permutation ). Checker-driven repair nevertheless corrects specific audible failures. On two seeds, Ours-C-R cuts an outgoing lead vocal mid-phrase, and Ours-C retains these cuts, with DJ-experienced listener ratings of 2.0 and 1.8. Ours removes the cuts, with ratings of 5.0 and 4.8. These are rare rescues, not a measured vocal-error rate; they do not establish an overall perceptual-quality gain. Together, the results support generating multiple alternatives with checking and repair, rather than prescribing one fixed mix, which is the constrained diversity of contribution (i).

Fig. 4. Story-driven set quality (Test2, N=99), mean story and transition ratings. Story is rated above No-story on story (p=.002) and its transitions beat the crossfade (p=.043, uncorrected).
4.4. Story-Driven Sets
Figure 4 tests whether the planner scales from single pairs to complete sets. On transition quality, Story rates above the Bittner'17/Spotify crossfade (, uncorrected) and shows no significant difference from the human DJ (). The set-level parity shows no detectable gap, not that none exists.
The story ratings further isolate set-level planning. Story improves coherence over No-story by roughly 1.9 points (), although the two share the transition engine and are indistinguishable on transition quality (); Story is also indistinguishable from the human DJ on story coherence (). The two draw from the same pool and chose different songs in every set, so the gain comes from selection and ordering together (and the opener policy), not from ordering alone. The comparison with Bittner'17/Spotify does not reach significance for story coherence ().
5. CONCLUSION
We presented a pop AI-DJ built around a reason-propose-verify-repair loop, in which an LLM jointly plans track selection, cue placement, and transition technique, while sampling gives multiple plausible plans for the same context. Blind listening tests show that our transitions remain below a human DJ yet outperform prior automatic systems, while our story-driven sets show no detectable gap from the human DJ in either story or transition ratings. Verification improves reliability rather than average quality—repairing rare, audible vocal-cut failures—while preserving multiple rendered alternatives per track pair, yielding constrained diversity rather than a single deterministic mix. Separating plan generation from rendered-audio verification is thus a practical design for AI-DJ systems. Future work will add audio-language models [28] as verifiers.
ACKNOWLEDGMENTS
The work is supported by grants the National Science and Technology Council of Taiwan (NSTC 114-2628-E-002-013-MY3), and the Ministry of Education (MOE) of Taiwan (for Taiwan Centers of Excellence in Artificial Intelligence).
6. REFERENCES
[1] Rachel M Bittner, Minwei Gu, Gandalf Hernandez, Eric J Humphrey, Tristan Jehan, Hunter McCurry, and Nicola Montecchio, “Automatic playlist sequencing and transitions,” in Proc. ISMIR, 2017, pp. 442–448.
[2] Len Vande Veire and Tijl De Bie, “From raw audio to a seamless mix: creating an automated DJ system for drum and bass,” EURASIP Journal on Audio, Speech, and Music Processing, vol. 2018, no. 1, 2018, Art. no. 13.
[3] Taejun Kim and Juhan Nam, “All-in-one metrical and functional structure analysis with neighborhood attentions on demixed audio,” in Proc. WASPAA. IEEE, 2023, pp. 1–5.
[4] Robert Sowula and Peter Knees, “Mosaikbox: Improving fully automatic DJ mixing through rule-based stem modification and precise beat-grid estimation,” in Proc. ISMIR, 2024, pp. 850–857.
[5] Jie Huang, Xinyun Chen, Swaroop Mishra, Huaixiu Steven Zheng, Adams Yu, Xinying Song, and Denny Zhou, “Large language models cannot self-correct reasoning yet,” in Proc. ICLR, 2024.
[6] Karthik Valmeekam, Matthew Marquez, Sarath Sreedharan, and Subbarao Kambhampati, “On the planning abilities of large language models – a critical investigation,” in Proc. NeurIPS, 2023.
[7] Kaya Stechly, Karthik Valmeekam, and Subbarao Kambhampati, “On the self-verification limitations of large language models on reasoning and planning tasks,” in Proc. ICLR, 2025, arXiv:2402.08115.
[8] Dave Cliff, “Hang the DJ: Automatic sequencing and seamless mixing of dance-music tracks,” Tech. Rep. HPL-2000-104, Hewlett-Packard Laboratories, 2000.
[9] Tatsunori Hirai, Hironori Doi, and Shigeo Morishima, “MusicMixer: Automatic DJ system considering beat and latent topic similarity,” in Proc. 22nd Int. Conf. on Multimedia Modeling (MMM). 2016, vol. 9517 of LNCS, pp. 698–709, Springer.
[10] Bo-Yu Chen, Wei-Han Hsu, Wei-Hsiang Liao, Marco A Martínez Ramírez, Yuki Mitsufuji, and Yi-Hsuan Yang, “Automatic DJ transitions with differentiable audio effects and generative adversarial networks,” in Proc. ICASSP. IEEE, 2022, pp. 466–470.
[11] Orkun Kınay, Barış Tekdemir, Göktuğ Gökyılmaz, Ekmel Yavuz, Berk Ay, and Selim Balcisoy, “DJ AI: optimizing playlist alignment and generating transitions with generative and embedding models,” in Proc. International Audio Mostly Conference, 2025, pp. 394–399.
[12] Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc V Le, and Denny Zhou, "Chain-of-thought prompting elicits reasoning in large language models," in Proc. NeurIPS, 2022, vol. 35, pp. 24824–24837.
[13] Zayne Sprague, Fangcong Yin, Juan Diego Rodriguez, Dongwei Jiang, Tanya Wadhwa, Prasann Singhal, Xinyu Zhao, Xi Ye, Kyle Mahowald, and Greg Durrett, “To CoT or not to CoT? chain-of-thought helps mainly on math and symbolic reasoning,” in Proc. ICLR, 2025, arXiv:2409.12183.
[14] Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, et al., “Self-Refine: Iterative refinement with self-feedback,” in Proc. NeurIPS, 2023, vol. 36, pp. 46534–46594.
[15] Dingyao Yu, Kaitao Song, Peiling Lu, Tianyu He, Xu Tan, Wei Ye, Shikun Zhang, and Jiang Bian, “MusicAgent: An AI agent for music understanding and generation with large language models,” in Proc. EMNLP (System Demonstrations), 2023, pp. 246–255.
[16] Yixiao Zhang, Akira Maezawa, Gus Xia, Kazuhiko Yamamoto, and Simon Dixon, “Loop Copilot: Conducting AI ensembles for music generation and iterative editing,” arXiv preprint arXiv:2310.12404, 2023.
[17] Chih-Cheng Chang, Bo-Yu Chen, Lu-Rong Chen, and Li Su, “Enhancing automatic chord recognition through LLM chain-of-thought reasoning,” arXiv preprint arXiv:2509.18700, 2025.
[18] Qwen Team, “Qwen3.6-35B-A3B: Agentic coding power, now open to all,” Alibaba Cloud blog, Apr. 2026.
[19] Brian McFee and Juan Pablo Bello, “Structured training for large-vocabulary chord recognition,” in Proc. ISMIR, 2017.
[20] Jan Schlüter and Thomas Grill, “Exploring data augmentation for improved singing voice detection with neural networks,” in Proc. ISMIR, 2015, pp. 121–126.
[21] Simon Leglaive, Romain Hennequin, and Roland Badeau, "Singing voice detection with deep recurrent neural networks," in Proc. ICASSP, 2015, pp. 121–125.
[22] Mathieu Ramona, Gaël Richard, and Bertrand David, “Vocal detection in music with support vector machines,” in Proc. ICASSP, 2008, pp. 1885–1888.
[23] Haina Zhu, Yizhi Zhou, Hangting Chen, Jianwei Yu, Ziyang Ma, Rongzhi Gu, Yi Luo, Wei Tan, and Xie Chen, “MuQ: Self-supervised music representation learning with mel residual vector quantization,” arXiv preprint arXiv:2501.01108, 2025.
[24] Qwen Team, “Qwen3-Omni technical report,” arXiv preprint arXiv:2509.17765, 2025.
[25] Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, and Ilya Sutskever, “Robust speech recognition via large-scale weak supervision,” in Proc. ICML, 2023, vol. 202 of PMLR, pp. 28492–28518.
[26] Phil Morse, Rock the Dancefloor: The Proven Five-Step Formula for Total DJing Success, Digital DJ Tips, 2018.
[27] Yongyi Zang, Sean O'Brien, Taylor Berg-Kirkpatrick, Julian McAuley, and Zachary Novack, "Are you really listening? boosting perceptual awareness in Music-QA benchmarks," in Proc. ISMIR, 2025, arXiv:2504.00369.
[28] Sreyan Ghosh, Arushi Goel, Lasha Koroshinadze, Sang-gil Lee, Zhifeng Kong, Joao Felipe Santos, Ramani Duraiswami, Dinesh Manocha, Wei Ping, Mohammad Shoeybi, and Bryan Catanzaro, “Music Flamingo: Scaling music understanding in audio language models,” in Proc. ICLR, 2026.