Transforms
Transforms modify the selected elements in an ABC document. They are applied through the editor (via LSP commands) or through the CLI. Each transform operates on the current selection and returns the modified text along with updated cursor positions.
Some transforms are context-aware: they use the key signature, chord symbols, or measure accidental state from the surrounding document to produce correct results.
Transposition and pitch
Section titled “Transposition and pitch”transpose
Section titled “transpose”Transposes selected notes by N semitones, respecting the key signature and measure accidentals. Context-aware.
Before: K:C C D E FAfter (transpose +2): K:C D E ^F Genharmonize
Section titled “enharmonize”Cycles through the enharmonic spellings of selected notes.
^F -> _G -> ^FenharmonizeToKey
Section titled “enharmonizeToKey”Re-spells selected notes to best fit the current key signature. Context-aware.
K:F ^E -> FK:Bb _A -> _A (already fits)addSharp
Section titled “addSharp”Advances the accidental state of selected notes one step toward sharp. A natural note becomes sharp, a flat becomes natural, etc.
addFlat
Section titled “addFlat”Advances the accidental state of selected notes one step toward flat. A natural note becomes flat, a sharp becomes natural, etc.
Harmonization
Section titled “Harmonization”This is an EXPERIMENTAL series of harmonization capabilities based off arranging techniques from the Berklee college. The goal is to provide some helpers to aid in arranging scores.
Expect bugs while using.
harmonize
Section titled “harmonize”Adds a harmonizing note N diatonic steps above or below each selected note.
Before: K:C C E GAfter (harmonize +3): K:C [CE] [EG] [GB]harmonizeVoicing
Section titled “harmonizeVoicing”Generates a fully-voiced harmonic arrangement from chord symbols using a specified voicing type. Context-aware.
Available voicing types: close, drop2, drop24, drop3, cluster, spread.
Before: "Cmaj7"CAfter (close voicing): "Cmaj7"[CEGB]parallelVoicing
Section titled “parallelVoicing”Shifts selected notes in parallel motion, following chord symbols. Can move diatonically, chromatically, or in a voicing-aware manner. Context-aware.
parallelDiatonic
Section titled “parallelDiatonic”Shifts selected notes to match the voicing of an adjacent chord (previous or next) using diatonic intervals. Each note is moved by the diatonic distance between the current chord root and the reference chord root. Context-aware.
parallelChromatic
Section titled “parallelChromatic”Shifts selected notes to match the voicing of an adjacent chord (previous or next) using chromatic intervals. Each note is moved by the semitone distance between the current chord root and the reference chord root. Context-aware.
Rhythm
Section titled “Rhythm”setRhythm
Section titled “setRhythm”Sets the rhythm of selected notes and chords to a given rational duration (numerator/denominator).
Before: C D E FAfter (setRhythm 1/4): C/4 D/4 E/4 F/4addToRhythm
Section titled “addToRhythm”Adds a rational duration to the rhythm of selected notes and chords.
multiplyRhythm
Section titled “multiplyRhythm”Multiplies the duration of selected notes by a factor (default 2).
Before: C D E FAfter (multiplyRhythm 2): C2 D2 E2 F2divideRhythm
Section titled “divideRhythm”Divides the duration of selected notes by a factor (default 2).
Before: C2 D2 E2 F2After (divideRhythm 2): C D E FConversion
Section titled “Conversion”toRest
Section titled “toRest”Converts selected notes or chords to rests of the same duration.
Before: C2 [CEG] DAfter: z2 z DconsolidateRests
Section titled “consolidateRests”Merges consecutive rests into a single rest of the combined duration.
Before: z z z zAfter: z4legato
Section titled “legato”Extends selected notes through the rests that follow them by replacing the rests with tied copies of the preceding note. Only regular rests are targeted (multi-measure rests are left unchanged).
Before: C2 z2 z2After: C2-C2-C2consolidateTiedNotes
Section titled “consolidateTiedNotes”Merges tied note sequences into single notes of the combined duration. This is the inverse of legato.
Before: C2-C2-C2After: C6toSlashNotation
Section titled “toSlashNotation”Replaces selected measures with slash notation (stemless quarter-note slashes). Context-aware.
Structure
Section titled “Structure”remove
Section titled “remove”Removes all selected nodes from the tree.
unwrapSingle
Section titled “unwrapSingle”Unwraps single-note chords into plain notes by removing the chord brackets.
Before: [C] [E] [G]After: C E Gexplode2, explode3, explode4
Section titled “explode2, explode3, explode4”Splits chords into 2, 3, or 4 separate voice lines, distributing chord notes across the voices.
Before: [CEGB]After (explode2):V:1 [GB]V:2 [CE]explosion
Section titled “explosion”Time-aware chord explosion: distributes chord notes into separate voice lines synchronized by duration. Context-aware.
splitSystems
Section titled “splitSystems”Splits or joins system line breaks at the given cursor positions. Context-aware.
addVoice
Section titled “addVoice”Inserts a new V: voice declaration into the tune header.
insertVoiceLine
Section titled “insertVoiceLine”Duplicates lines containing selected notes into a new voice. Non-selected notes are replaced with rests.
voiceInfoLineToInline
Section titled “voiceInfoLineToInline”Converts V: info-line voice markers to inline [V:...] form.
Before:V:1C D E F
After:[V:1] C D E FvoiceInlineToInfoLine
Section titled “voiceInlineToInfoLine”Converts [V:...] inline voice markers to V: info-line form. The inverse of voiceInfoLineToInline.