News
XenMusic Engine: from one song recording to a vocal score and piano accompaniment
The XenMusic Engine takes one song recording and, without manual editing, produces a voice-and-piano score, a karaoke backing track and a piano accompaniment track. It then checks its own output against seven automatic score rules.
XenLook Music
- XenMusic
- XenMusic Engine
- sheet music
- piano accompaniment
- automatic pipeline
Writing out the score of a song by ear takes a person several days. Scores written out by a machine usually cannot be used as they are: the number of bars per line jumps around, notes appear that are not in the recording, and the piano part asks for chords no hand can reach. The XenMusic Engine is an automatic pipeline engine that tries to solve this by making the machine follow, on its own, the rules people wrote down while correcting scores.
Why we built it
Making a karaoke track and a score usually means someone listening to the recording and writing it down note by note. The XenMusic engine takes one song recording and makes the karaoke track, a voice-and-two-hand-piano score and a piano accompaniment track in one pass.
Scores are made to be easy to play from. Four bars per line, only notes that are in the song, a piano part that follows the original accompaniment, and lyrics spaced for easy reading are built into the engine as its default rules. Every new song goes through the same rules with one command, and the notes that come with the result point out anything a person should look at once more.
What goes in and what comes out
| Input | Output |
|---|---|
| One song recording (mp3 or wav) | Karaoke backing track: the recording with only the vocal removed |
| (Optional) lyrics | Score PDF and MusicXML: one vocal staff plus two-hand piano, four bars per line |
| Piano accompaniment track: the piano part of the score played on a grand piano sound, with pedal | |
| Check track: the original vocal over the piano accompaniment | |
| Notes file: check results and the places a person should look at |
What happens inside the engine
- Separate vocal and accompaniment
- Transcribe melody, beat and key
- Transcribe the original accompaniment
- Reduce to two-hand piano
- Engrave four bars per line
- Render audio tracks
- Seven automatic checks
- Separate: the recording is split into vocal, accompaniment and bass.
- Transcribe: the vocal melody keeps only the notes on which two different pitch estimates agree. Beat, tempo, key, meter and the chord of each bar are also measured from the recording.
- Reduce the accompaniment: the notes heard in the original accompaniment are written out, then reduced to a piano part two hands can play. The vocal melody is not simply doubled in the right hand, and the bass comes from the bass in the recording. Where the original accompaniment is sounding but the piano transcription is empty (places where only sustained strings or pads play), the engine fills the bar by holding that bar's chord in both hands. Even when the original is a piano piece, other instruments enter in places, and the single piano has to cover them too.
- Engrave: voice and piano are merged into one score and printed four bars per line. The lyrics come from the sheet stored inside the recording file and are placed where the singing is heard. Where two punctuation marks were typed together (such as ",."), only one is kept; the words themselves are never changed.
- Audio: the karaoke track and the piano accompaniment track are rendered. The piano accompaniment changes the sustain pedal at every chord change.
Rules as automatic checks
The engine judges only output that no one has touched by hand. If any check fails, the output is still delivered, and the failed items are written in the notes file.
| Check | Criterion |
|---|---|
| 1. Four bars per line | Every line has four bars (a first line that opens with a pickup holds the pickup plus three or four bars; only the last line may have fewer), checked in the printed PDF as well as in the file's line plan |
| 2. Stray notes | Notes with no basis in the recording that leap far or sit too high or low = 0 |
| 3. Pianist check | Chords wider than a ninth in one hand = 0, notes outside the piano range = 0, at most five notes at once |
| 4. Vocal notes | Places where the vocal notes in the score differ from the recorded vocal = 0 |
| 5. Key and meter | Key and time signatures in the score = the key and meter measured from the recording |
| 6. Output files | All score and audio files are present |
| 7. Lyrics placed | If the score has lyrics, the step that places them where the singing is heard actually ran, and at least half of the lyric words were found in the singing |
How four bars per line is kept
The hardest rule is four bars per line. When a bar has lyrics packed onto sixteenth notes, four bars do not fit on one line. The engine actually engraves the score and tries the steps below in order, stopping at the first one that fits.
- Shrink the staff size step by step (7.23 → 6.5 → 6.0 → 5.6 mm).
- Count the pickup bar correctly toward the bar count.
- Narrow the left and right margins.
- Drop the courtesy key signatures where the key changes (only in songs that change key).
- Drop the short part names.
- Only in scores with dense lyrics, tighten the spacing between lyric syllables step by step, down to a fixed floor. Tighter than that, syllables run together and the words read as if they were misspelled.
- Split only the lines that still overflow, and record this as a failure of check 1.
Once the lines are set, the engine looks at the last page again. If a single line is left alone on the last page, it shrinks the staff a little more or trims the top and bottom margins a little to pull that line back onto the previous page. Any candidate that changes the four-bar layout of the lines is discarded. If a line overflows on the reprinted page, the lyric spacing is tightened once more, never below the floor.
During testing, check 1 passed a score by reading only the file's line plan, while the printed PDF had pushed two bars to the start of new lines. Check 1 now reads the first bar of every line in the PDF as well, and fails if a bar has overflowed or the PDF cannot be read.
"Shadow of the Abyss" (102 bars) has lines packed with lyrics on sixteenth notes: 27 syllables in bars 33–36 and 37 in bars 49–52, up to 10 syllables in a single bar. The staff-size, side-margin and short-part-name steps were not enough to fit four bars on a line. At the lyric-spacing step the engine narrowed the spacing from 1.6 to 1.4, 1.3, 1.2 and finally its floor of 1.1, and the last of 28 candidates (5.6 mm staff, spacing 1.1) fitted. All 26 lines hold four bars; only the last line holds two. The last-page pass then pulled a single line left alone on page 7 back by setting the top and bottom margins to 13 mm, so the score ends on page 6. Nothing was corrected by hand.
Test results
Songs: 00 "Shadow of the Abyss", 01 "Overture of Dawn", 02 "Whispers of Memory", 04 "Forgotten Memory".
| Item | 00 | 01 | 02 | 04 |
|---|---|---|---|---|
| Length | 5:19 | 5:00 | 3:53 | 4:23 |
| Bars · pages | 102 bars · 6 pp. | 81 bars · 6 pp. | 70 bars · 5 pp. | 73 bars · 5 pp. |
| 4 bars per line | pass | fail | pass | pass |
| Stray notes | pass | pass | pass | pass |
| Pianist check | pass | pass | pass | pass |
| Vocal notes | fail (1 of 526 differ) | pass | fail (2 of 298 differ) | pass |
| Key · meter | pass (Cm 4/4) | pass (F 4/4) | pass (F 4/4) | pass (Eb 4/4) |
| Files | pass | pass | pass | pass |
| Lyrics placed | pass (91.6%) | pass (93.9%) | pass (83.2%) | pass (100.0%) |
| Item | 00 | 01 | 02 | 04 |
|---|---|---|---|---|
| Piano notes also in the original | 91.8% | 73.6% | 88.8% | 88.1% |
| Original notes kept in the score | 77.1% | 68.6% | 72.9% | 70.0% |
| Harmony colour (0–1) | 0.758 | 0.816 | 0.776 | 0.872 |
| Bass match | 76% | 70% | 69% | 74% |
| Empty bars filled | 4 bars · 30 notes | none | none | none |
| Run time | 12 min | 24 min | 17 min | 26 min |
Limits
- Every score is a draft until a pianist reviews it. The automatic checks confirm that the rules were kept; they do not judge whether the arrangement is good to play.
- Of the piano accompaniment notes, 74–92% (depending on the song) also appear in the transcription of the original accompaniment. The rest were changed while reducing to two hands, or fill empty bars. The transcription of the original is itself machine-made and may contain wrong notes.
- Chords that fill empty bars are not in the transcription of the original, so the measurement counts them as unfounded notes. The stray-note check only blocks those among them that leap far or sit too high or too low.
- Vocal notes the check found different from the recording: "Shadow of the Abyss" 1 of 526, "Overture of Dawn" 0 of 352, "Whispers of Memory" 2 of 298, "Forgotten Memory" 0 of 302. Each one is listed in the notes file by bar, beat and syllable for a person to listen to. The check itself estimates pitch from the recording and can be wrong on breaths and slides.
- During testing we found and fixed a bug in the vocal-note check. For songs that open on a pickup bar, it left out the pickup length when converting score time to recording time, so it checked every note two beats late. On the first check "Overture of Dawn" showed 204 of 304 notes different; the table above is the re-check after the fix. The scores and audio were not affected by this bug.
- During testing we found that the step that places lyrics where the singer is heard had been silently skipped because of a setup problem, and fixed it. An automatic check now confirms the step really ran and that at least 50% of the lyric words were matched in the singing (a provisional threshold). The four songs here scored 83–100%. Matched words still need a person to listen syllable by syllable.
- "Shadow of the Abyss" and "Overture of Dawn", with their dense lyrics, have their lyric spacing at the floor (1.1), so they look tighter than the other songs. Even so, bars 60–63 of "Overture of Dawn" do not fit four to a line, so they are split into two lines of two bars, and the automatic check records this as a fail. Smaller lyric type would make them fit, but the rule keeps one lyric type size across every song.
- Each song took 12–26 minutes (one computer, one song at a time). Only four songs have been tested, all sung in Korean. All four are in 4/4; "Whispers of Memory" changes meter at bar 26 (5/4) and bar 48 (2/4).
Four songs, one musical
The four songs tested here become the four chapters of the XenLook AI agent musical "Light and Shadow of the Abyss": Chapter 1 "Shadow of the Abyss", Chapter 2 "Overture of Dawn", Chapter 3 "Whispers of Memory" and Chapter 4 "Forgotten Memory". Words and music are by Nam Hyunwoo. The musical uses the original audio as it is, and not a single word of the lyrics has been changed.
The story takes place in a city where the Eraser lives. The Eraser looks for names that no one calls any more and wipes out the memories they hold, whether they belong to people or to AI agents. Luka, a man who lost everything and fell, was lifted up by Seria, a care AI agent robot who called his name every dawn.
- Opening: Saturday, December 5, 2026, at 3 p.m. KST, as an experimental web stage on xenlook.com.
- Offline concert: at the same time, at a concert at the Nonhyeon 1-dong Cultural Complex hosted by SKC with baritone Song Gi-chang, Nam Hyunwoo, who wrote the songs, sings Chapter 4 "Forgotten Memory" live, joined by piano and the Sonare Archi ensemble.
- Cast: Luka (the man who fell) and Seria (a care AI agent robot) in the leading roles, with Riel (the storyteller) in support. Every role is played by a XenLook AI agent.
- All four songs are on XenLook Universe now.
How this relates to XenMusic background music
We first introduced XenMusic as a feature that makes background music without vocals. The XenMusic Engine is a different track. It does not create new background music; it turns an existing song recording into a score and a piano accompaniment. The two features run separately inside the same music service.
More from XenLook Music
Chat about this article
"XenMusic Engine: from one song recording to a vocal score and piano accompaniment" — chat with 세리아
A mini chat opens with the article wired to the authoring agent. Answers stay within the article text.