# Score editor The **Score** tab of the Song Sheet editor (*Edit the score* on a sheet that owns a score, *Compose the score* in the DAW template) shows the score as a piano roll, as notation and as ABC text, lets you correct it note by note - by dragging notes in the roll or with the palette - and plays it, against the source recording in covers. Everything you change is a change of **one text**: the native two-voice ABC that YuE2 reads. The notation, the note list, the sections and the playback are always computed by the backend from exactly that text; the editor keeps no second copy that could drift. Typical uses: - fix a wrong note of a SheetSage2 transcription (a cover) or of a YuE2 plan (a song); - move a section boundary one bar, rename a section - the lyrics of a cover follow the score's sections; - remove or replace a chord symbol, change the tempo, transpose. ## Layout | Part | What it does | |---|---| | **Palette** (top) | undo/redo; pitch −8va, −1, +1, +8va (the selected notes and chord symbols); shorter / longer; rest / note; chord symbol set / remove; *Whole score*: transpose, **Vocal −8va / +8va** and **Instrument −8va / +8va** (every note of the track an octave down or up; the chord symbols and keys stay), tempo, remove chords, let the instrument play the melody, silence the Vocal voice | | **View** | the layout *Review* or *Text* (see below); in *Review*: *piano roll* and *ABC text (advanced)* on/off; notation zoom; the files: *Export MIDI*, *Export MusicXML*, *Save project*, *Import MIDI…*, *Import MusicXML…*, *Open project…* (see [Files](#files-midi-musicxml-and-the-project)) | | **Piano roll** | both voices over time (Vocal blue, Ins orange) with a chord lane and the bars and sections above; with lyrics a **lyrics lane** (the words over the phrases they are sung on - edit them there, and select, move, lengthen, delete, copy and paste lines like notes); the **cursor** (click in the bar numbers); draw, move, resize and delete notes and chord symbols with the mouse (see below) | | **Inspector** (right, *Review*) | the selected note(s), chord symbol and bar as fields: voice, pitch, start, length, chord; insert, duplicate or delete bars, meter, key (see below) | | **Navigator** | the sections: select one or more and **duplicate, copy, move or delete** them (also by dragging - see [Arranging sections](#arranging-sections)); go to, rename, start one bar earlier / later, join to the one before, new section at the selected bar; the **bar strip** (sections in colour, bars with errors marked): select one or more bars and **duplicate, copy, move or delete** them (see [Arranging bars](#arranging-bars)); in *Review* with the song's lyrics: *Lyrics fit* (the lyrics next to the score's sections) | | **Notation** | click a note or rest to select it, Shift+click to add to the selection; the lyrics stand under the Vocal notes (read-only) | | **ABC text** | the canonical text with line numbers; errors are underlined at their bar; the cursor selects the note under it | | **Transport** (between the roll and the notation) | play from the cursor (a click in the ruler while it plays jumps there), loop the selection's bars or the cursor's section, metronome, voices (Vocal, Ins, chords), speed; with a source connected (covers): **hear** the notes and the source recording together, or one of them (**A/B**), and the source's level | | **⌨ keys** (view tools) | every key and mouse gesture of the editor at a glance | | **Status line** | what is selected (voice, bar, pitch, length, chord) and what the last edit did | | **Diagnostics** | the backend's findings, each with a link to its bar | ## Layouts | Layout | Shows | For | |---|---|---| | **Review** | piano roll, notation and inspector, the navigator on the left; the ABC text only with *ABC text (advanced)* | correcting a score graphically - no ABC knowledge needed | | **Text** | the ABC text (large, with its diagnostics) and the notation | editing the text directly | A Song Sheet node can choose the layout its editor opens in with the node property `plenio_editor_layout` (`review` or `text`; the templates set it where it matters). Without it the editor opens in the layout you used last in this browser. ## The window and the panes The editor window is yours to size (since 0.3.0): | Control | What it does | |---|---| | **⛶ / ❐** in the header (or a double-click on the header) | fills the browser window / returns to the size before | | the **corner grip** (bottom right) | drag it to resize the window; it never gets smaller than 640 × 420 and never larger than the browser window | | the **grip under the piano roll** | drag it (or use ↑/↓ on it) to give the roll more or less height - a big roll for drawing, a small one to keep the notation in view | | the **grip under the notation** (with *ABC text (advanced)*) | drag it (or ↑/↓) to share the column between the notation and the ABC text | | the **grip right of the navigator** | drag it (or ←/→) to widen the navigator, the track panel and *Lyrics fit* | The window size and the pane sizes are remembered in this browser (they are viewer preferences, never part of the workflow). The lyrics and ABC text fields keep their own resize grip too. ## The inspector The inspector shows what is selected - in the piano roll, the notation, the chord lane or the bar strip - and each field changes it with one checked edit (Enter or leaving the field commits it): | Selection | Fields | |---|---| | one note | **voice** (Vocal / Ins: moves the note to the other voice), **pitch** (e.g. `C#5`, `Bb3` or a MIDI number; −8va −1 +1 +8va), **start** (bar and units from the start of the bar; the header says the beat), **length** (units, or a note value; with *longer: over the next note* it may play over the following notes), **chord** where the note starts (empty removes it), *→ rest*, *close gap* | | several notes | voice, pitch steps, *→ rest*, *close gap* | | a chord symbol | name (empty removes it), start, *remove* | | the bar of the selection | *+ before*, *+ after* (an empty bar), *duplicate* (a copy after it), *delete* (in both voices), **meter** (only for an empty bar - music is never re-barred), **key** from this bar on (pitches stay; notes are re-spelled), *remove change* | Bar rules: an inserted bar joins the line of the bar before it; a line longer than four bars is split. Deleting bars keeps the key that was in effect after them, and a section that started inside moves to the cut. Duplicating a whole section gives two sections of that name; duplicating part of a section makes the section longer. ## The piano roll The roll shows every sounding note of both voices as a bar: its left edge is where the note starts, its length is how long it sounds (tied notes are one bar), its height is its pitch (the rows are the semitones, C rows are marked and labelled). Above the notes are the **chord lane** and the bar numbers with the section names. The bar numbers are the **ruler**, as in Cubase: click in it (or drag along it) to put the **cursor** there - a white line through the roll with a marker in the ruler, on the grid of *snap*. Playback starts at the cursor (Space); while it plays, a green line follows the music and the roll pages along. On stop the green line disappears and the cursor stays where it was. Clicking a section or a bar in the navigator puts the cursor at the bar's start; **Home** / **End** put it at the start / end of the score. The transport shows where the cursor is as *bar.beat.sixteenth* (Cubase's position display, e.g. `5.2.1`). Without the roll (layout *Text*, or the roll switched off) the cursor follows the selected bar. Two modes, switched in the roll's toolbar, decide what a drag on an **empty place** does. The roll always opens in **✎ Draw**; the mode is not remembered. - **✎ Draw** - a click on an empty place inserts a note of the last drawn length (a beat at first; while notes are selected, the click only lets them go), a drag draws one, **Shift+drag** pulls a selection frame. - **⬚ Select** - a drag on an empty place pulls a dashed **frame**: every note it touches is selected when you let go (the roll shows them while you pull). Hold **Shift** to add the framed notes to the selection. The frame selects notes of both voices; when it reaches into the **chord lane** (or starts there) it takes the chord symbols it passes too. The notation and the ABC text show the same selection, so you can see there which notes you caught. Select mode never draws a note. Clicking, moving and resizing notes, and all keys, work the same in both modes. So you can frame a phrase in *Select*, then drag one of its notes to move the whole phrase, or press ↑ to transpose it. | Gesture | Result | |---|---| | click or drag in the ruler (bar numbers) | set the cursor; the selection stays | | click a note | select it (Shift/Ctrl+click adds to the selection); the notation and the ABC text select it too | | drag a note | move it in time and pitch (all selected notes together; you hear the new pitch); where it lands it replaces what its voice played there, and the place it left becomes a rest | | **Alt**+drag a note | copy it (all selected notes) to where you drop it; the originals stay | | drag the right end of a note | make it longer or shorter; longer grows into the rests after it and **stops at the next note** of its voice - hold **Alt** to play over it (it is shortened or removed) | | click an empty place (**Draw**) | a new note of the last drawn length into the voice chosen under *draw into* (with notes selected: only lets them go) | | drag on an empty place (**Draw**) | draw a new note of that length | | double-click an empty place (**Draw**) | a new note of one beat | | Shift+drag on an empty place (**Draw**) | a frame, as in Select mode | | click a key of the keyboard (left) | hear its pitch | | Ctrl+wheel, **G** / **H** | zoom along the bars (around the pointer / the cursor); never the browser page | | Alt+wheel, **Shift+G** / **Shift+H** | zoom the rows (taller or lower key rows) | | **Q** / **Shift+Q** | quantize: the selected notes' starts on the grid of *snap* (all notes when none is selected) / their lengths too; where a note lands it replaces what its voice played there | | drag on an empty place (**Select**) | a frame: select every note it touches (Shift: add them to the selection) | | Ctrl+A | select all notes of both voices and all chord symbols | | click an empty place / Esc | clear the selection (Esc during a frame cancels the frame; in the score, Esc never closes the editor) | | click a chord symbol | select it and hear it once, in the chords' sound (with *hear* on): root and quality, a slash bass under them. The toolbar's chord field shows it: **set** renames it, **remove** removes it (several selected: all of them) | | drag a chord symbol | move it; a chord already at that place is replaced. The roll stays where it is | | double-click the chord lane | type a new chord symbol (Enter adds it, Esc cancels); double-click a chord to rename it, an empty name removes it | While you drag, a dashed **ghost** shows the result; nothing changes before you let go. Then the backend checks the edit and writes the text; if it refuses (for example a note that cannot grow because another note follows), the ghost disappears and the reason is shown. Keys with the roll focused: ↑/↓ semitone (Shift: octave) - selected **chord symbols** move too, one or many, spelled for the key where they stand (an octave leaves them as they are), ←/→ move by the grid (Shift: a beat), Alt+←/→ shorter/longer, **Delete** turns the selected notes into rests (and removes selected chord symbols), **Shift+Delete** deletes and lets the note before take the time (*close the gap*). **snap** sets the grid (*auto* is the score's finest length) - also for **Q** (quantize); **−/+**, **G / H** and Ctrl+wheel zoom along the bars, **↕−/↕+**, **Shift+G / H** and Alt+wheel zoom the rows. With *follow* switched off the roll stays where you look while it plays. A note wide enough shows its pitch (`E5`), and a drawn, grabbed or moved note is heard (switch it off with *hear* in the roll's toolbar). Only the visible part of a long score is drawn. The roll covers the whole piano range (A0 to C8, more for a note beyond it) and **scrolls both ways**: the mouse wheel moves through the pitches, Shift+wheel (or the scrollbar) through the bars. It opens centred on the score's notes; the pitch names stay on the left and the bar numbers, sections and the chord lane stay on top while you scroll, and a note you select - or the note that plays - is scrolled into view. Dragging a note to the top or bottom edge scrolls along, so a note can be moved or drawn anywhere in the range. ### Lyrics where they are sung When the song has lyrics, the roll shows a **lyrics lane** under the chord lane. Each line stands over the Vocal notes it is sung on, and each syllable stands small over its note (`beau-` `ti-` `ful`). The notation shows the same syllables under the Vocal notes; there they are read-only. **Double-click a line** in the lane to edit its words there (Enter keeps it, Esc cancels, an empty line is removed): the line keeps its span, and no other line moves. **Double-click where the lane is free** to type a new line there: it starts at the click (on the grid; in a phrase no line sings, at the phrase's start) and goes to the end of that phrase - or of the next one -, never past the next line. Each edit is one undo step. Where the edited lyrics go: | Sheet | The lyrics come from | An edit goes | |---|---|---| | score sheet of *1 · YuE2 · Song*, *5 · YuE2 · DAW* | *Song Sheet · Text* | into that sheet on **Apply** (the side column says so; *Revert the lyrics* goes back) - that sheet then asks for approval again | | text sheet of *2 · YuE2 · Cover* (the score is the other sheet's, read-only) | this sheet | straight into its **Lyrics** tab | **Place lines by hand**, like notes: | Action | Mouse | Keys (after a click on a line) | |---|---|---| | select | click a line; **Ctrl+click** or **Shift+click** adds or removes one; a click on a note or the empty lane lets them go | Esc: none | | move | drag the selected lines (on the grid of *snap*) | ← / →: one grid step | | longer / shorter | drag a line's **end** (the light edge) or its **start**; it stops at the next line | | | delete | | Del (the words go too) | | copy, cut, duplicate | the roll's **Copy** / **Cut** buttons | Ctrl+C, Ctrl+X, Ctrl+D (right after the last selected line) | | paste | set the cursor in the ruler, then the roll's **Paste** button | Ctrl+V: into the lyrics block sung at the cursor, from the cursor on, where the lane is free | **One edit in the lane places every sung line by hand:** each keeps the span it has (the box), and its syllables take the notes that start inside that span, shared over the phrases there. So an edit changes the line you edit and no other - also not the lines of other blocks. **Lines never overlap and never push one another:** a line made longer stops at the next line, one dragged stops at the nearest line in its way (drawn with an orange edge, and the status line says so) - dragged far enough past it, it lands in the free room behind it, and the lyrics text changes its order too. A paste into a line is refused: shorten, move or delete that line first. A block's lines stay between the lines of the blocks before and after it - so a block's first line can be moved onto a pickup in the bar before its section, or a line on to where the next block starts. A line with no note inside its span has no syllables (a dashed box) and is not counted as sung. **auto-place lyrics** (in the roll's tools, while lines are placed by hand) lays the lyrics out on the notes again by the rule below; the words stay, Ctrl+Z brings the places back. The spans are kept with the sheet (like the Guide notes), move with the bars when sections or bars are arranged, go into the project file, the MusicXML export and Export Release's sheet music, and every edit is one undo step. Lines placed by hand with Plenio 0.4.4 or 0.4.5 keep their place. How the words are placed follows what YuE2 does: it sings the lines **in their order over the Vocal melody**, about one syllable per note - whatever the sections are called. The lines take the Vocal notes in order, as many as their syllables ask for. The notes form **phrases**, split at rests of an eighth or more; a line starts where a phrase starts wherever it can and runs on over the next phrase when its syllables need it, so a long line is not crammed onto a short phrase while another phrase stays empty. A lyrics block starts where a section of its kind starts - on the section's pickup when its first phrase begins in the bar before - but it may also follow the block before inside a section (a plan that sings the chorus and the outro in one section) or start in a section of another kind (a second verse in the plan's bridge). Notes no line sings are left free: an intro's ad-libs, the end of a section after its block. Each syllable takes a note. A line over several phrases breaks between them at a word - after a comma or a full stop where it can, never inside a word unless it must. A phrase with fewer syllables than notes holds its last one (a melisma); one with more lets neighbouring syllables share a note - two of the same word first (`Ba-de-`), spread over the phrase, not piled up on its last note. **No line is lost:** lyrics no note sings - the notes ran out (YuE2 planned fewer notes than the lyrics need), an outro without Vocal notes - follow the music as text under *Lyrics without notes in this score*, with their section tags, in the notation, its PDF/PNG/SVG and Export Release's sheet music. YuE2 sings the words its own way; this is the editor's picture of where they fall - in the renders measured about three of four words within a beat of where they are sung ([the study](../../design/lyrics-placement.md)). This is a picture of where the words fall. YuE2 itself places the syllables. Syllables are split by Plenio's syllable rules, in the language of the lyrics (English or German, found from their common words; other languages at vowel groups) - the same count *Fit Lyrics* uses. German has no silent *e* (*bei-de*, *Lie-be*) and keeps its consonant groups together (*ver-schos-sen*, *Mäd-chen*, *Kopf-hö-rer*). ### Notes that fit the lyrics YuE2 sings about one syllable per note: where a line has more syllables than notes the words are crammed, where it has fewer they drag or the melody goes on without them. The lyrics lane marks such a line with what it lacks (**+2**: two notes too few) or has to spare (**−3**), and the palette counts them. **Fit notes to lyrics** repairs the whole song, **fit selection** the lines of the selected notes or lyrics lines; the text stays as it is, and one Ctrl+Z takes the whole repair back. - **Lines and phrases are aligned first**: a line on a phrase, on two or three short ones, or two or three short lines on a long one - whichever needs the fewest changes. A line you placed by hand stays on its span. - **The song's own melody first**: where the same melody stands elsewhere with the right number of notes (the first verse has the note the second lacks) and fits the chords here, that passage is taken over. A repeated section that needs the same repair gets the same one, so chorus and verse stay one melody. - **Too few notes**: long notes are split on the song's own rhythm, and what still lacks goes into a rest of the line or after it, never up to the next line. A new note's pitch is the best way between the notes around it: chord tones on strong beats, on weak ones also steps of the scale, the intervals and pitch classes this melody uses - never a note that clashes with its chord (as the song's genre allows) or grinds against the instrument line. - **Too many notes**: the note that carries least goes - the same pitch as the note before first, then an unaccented note off the chord, a turning point of the melody last - and the note before it holds on, unless that would clash with the chord there. - **Spare notes** chooses what becomes of notes the text does not need. *Smart*: a phrase no line sings and a long rest of a line move to the Ins where it is silent, single notes are left out. *Leave out*: all go. *To the Ins*: all move, where the Ins is silent. - **A line no note sings** gets a phrase in the free bars around it, from a melody of the song with as many notes or on the rhythm of the line before. Where there is no room the status line says so: add bars or shorten the line. Bars, chords and the lyrics never change. Syllables are counted by rule, so a word may count one more or less than it is sung; a new note is a suggestion for YuE2, and the render is what you judge. ### Locking a track The lock next to *draw into* **Vocal** and **Ins** (and in the DAW layout's track headers) keeps a melody as it is while you work on the other one. A locked track is drawn pale in the roll and the notation, its notes cannot be selected, moved or deleted, nothing is drawn or recorded into it, and *silence*, *melody → Ins*, the octave buttons and pasted notes leave it alone. It still plays. What belongs to the whole song still reaches it, so that the two voices stay together: bars inserted, deleted, copied or moved, sections arranged, bars pasted with *Insert*, changes of meter, tempo and key and the whole score's transposition. The ABC text and a new score (a project, a MIDI or MusicXML file) replace the whole document and are not stopped by a lock. The lock is a setting of this editor in this browser: it stays until you open it again, and never reaches the score or the render. ### Copy and paste at the cursor The roll's **Copy**, **Cut**, **Paste** and **Insert** buttons and the keys below work like Cubase's key editor. They work wherever the score has the focus (roll, notation, section list), not in a text field. A clip holds notes and chord symbols. It starts at its earliest event, which lands on the cursor when it is pasted. | Key | Button | What it does | |---|---|---| | Ctrl+C | Copy | copy the selected notes and chord symbols (also from a read-only score) | | Ctrl+X | Cut | copy them; the notes become rests and the chord symbols are removed | | Ctrl+V | Paste | **paste at the cursor, overwriting**: in the voices the clip has, what played from the cursor for the clip's length is replaced (its rests too); chord symbols are replaced only when the clip has chord symbols | | Ctrl+Shift+V | Insert | **insert at the cursor** (Cubase: *Paste Time*): everything from the cursor on - both voices, chord symbols, keys, sections - moves later by the clip's length rounded up to whole bars, then the clip goes into the gap | | Ctrl+D | | duplicate the selection right after itself (overwriting what follows; the clipboard stays as it is) | A Vocal clip goes into the Vocal voice and an Ins clip into the Ins voice. **Sections** copied in the section list paste as a range of both voices with their chord symbols. Insert them and they keep their names, so a copied chorus becomes a new chorus at the cursor. The clipboard belongs to the editor page, so a clip can be pasted into the other sheet's score. A clip from a score with a finer grid (L:1/32) pastes into a coarser one (L:1/16) only when every note fits that grid; the status line says so otherwise. Each paste is one undo step. Deleting a note never shortens a bar: the note's time becomes a rest. *Close the gap* only happens with Shift+Delete, and only when a note of the same voice ends exactly where the deleted one started - otherwise the time stays a rest and the status line says why. ## Editing notes with the palette and the keyboard Select a note, then use the palette or the keyboard (in the notation): | Key | Action | |---|---| | ← / → | previous / next note or rest of the voice | | Alt+↑ / Alt+↓ | the other voice at the same time | | ↑ / ↓ | one semitone up / down (a tied note moves as a whole) | | Shift+↑ / Shift+↓ | one octave up / down | | `[` / `]` | shorter / longer: a note tied over a bar line as the one note it is | | R or Delete | turn into a rest | | N | turn a rest into a note (the pitch of the nearest note) | | Space | play / stop (from the cursor) | | Home / End | cursor to the start / end of the score | | Ctrl+Z, Ctrl+Y (Ctrl+Shift+Z) | undo, redo | | Esc | clear the selection | Rules the editor keeps for you: - **Bars stay exactly full.** *Longer* only grows into the rests after the note; *shorter* fills the freed time with a rest. An edit that would overfill a bar or cross a chord symbol is refused with the reason and a hint (for example: "Only 2 units of rest follow the note in bar 12 - turn the following note into a rest first"). A note **tied over a bar line** (or a chord symbol) is one note: *shorter* and *longer* give the whole note the next length from its start, and its ties follow - still over the bar line it stays tied, ending before it the tie goes, and there is no second attack. - **Only the edited bars change.** Every other character of the text stays exactly as it was. An edited bar is rewritten in the native spelling: accidentals only where the key and the bar need them. Native accidentals apply to the letter in every octave until the bar line, so raising one `F` can add a `=` to a later `f` in the same bar - that keeps the other notes where they were. - **Ties** are one note: a pitch change moves every tied part; shortening a tied note removes the tie (a warning says so). - **Chord symbols** belong to the Vocal voice and start at a Vocal note or rest; selecting a note of the Ins voice puts the chord at the Vocal onset at the same time. - Every result is checked against the upstream YuE2 parser before it replaces the text. The editor never decides musical validity itself. ## Editing the text Type in the ABC view like in any code editor. The analysis follows after a short pause. While the text is invalid, the notation and the piano roll show the **last valid score** (dimmed) with the note *"The text has errors - the notation shows the last valid score"*, the bar with the error is underlined and marked in the bar strip, and the diagnostic links to it. Palette operations and roll gestures work only on a valid text, and **Apply** and **Approve** are off (their tooltip says why): an invalid text never replaces the score in the node. **Revert to last valid** puts the last valid text back (one undo step). One undo history covers both kinds of edits: a burst of typing is one step, each palette operation is one step (its tooltip names the step), and a document replaced by the dialog (for example *use the new draft* after a conflict) is one step too. ## Files: MIDI, MusicXML and the project A score goes in and out as a standard MIDI file, so a sketch from any DAW can become the score - and the score can go back to a DAW. The sheet music goes out as MusicXML, PDF, PNG or SVG, and the whole editor's work goes into a project file to go on later. | Button | What it does | |---|---| | **Save project** | Downloads everything the score editor holds as one file, `