Jump to content

Combining beam and slur in one keystroke: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
m New category
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
If a vocal part contains many short note values and melismata, and melismata are shown by both beams and slurs, there are many instances of <code> d([ b)] </code> for example. To save tedious keystrokes, it’s very convenient to redefine [ and ] so they provoke both the beam and the slur. Alternatively, the slurs may be omitted as in the second example, to avoid misinterpretations (performers might take the slur as an indication for dynamics and articulation, even if it’s only intended to provide information on melismata) or to get a clearer, less crowded look.
If a vocal part contains many short note values and melismata, and melismata are shown by both beams and slurs, there are many instances of <code> d([ b)] </code> for example. To save tedious keystrokes, it’s very convenient to redefine [ and ] so they provoke both the beam and the slur. Alternatively, the slurs may be omitted as in the second example, to avoid misinterpretations (performers might take the slur as an indication for dynamics and articulation, even if it’s only intended to provide information on melismata) or to get a clearer, less crowded look.


<lilypond version="2.24.0" full>
<lilypond version="2.24" full>
\paper { tagline = ##f }
\paper { tagline = ##f }


Line 64: Line 64:
[[Category:Vocal music]]
[[Category:Vocal music]]
[[Category:Syntax and expressions]]
[[Category:Syntax and expressions]]
[[Category:Snippet]]

Latest revision as of 23:15, 21 November 2025

If a vocal part contains many short note values and melismata, and melismata are shown by both beams and slurs, there are many instances of d([ b)] for example. To save tedious keystrokes, it’s very convenient to redefine [ and ] so they provoke both the beam and the slur. Alternatively, the slurs may be omitted as in the second example, to avoid misinterpretations (performers might take the slur as an indication for dynamics and articulation, even if it’s only intended to provide information on melismata) or to get a clearer, less crowded look.

\version "2.24"

\paper { tagline = ##f }

"[" =
- #(make-music
    'SlurEvent
    'span-direction
    -1)
- #(make-music
    'BeamEvent
    'span-direction
    -1)
"]" =
- #(make-music
    'SlurEvent
    'span-direction
    1)
- #(make-music
    'BeamEvent
    'span-direction
    1)

\score {
  \relative {
    \autoBeamOff
    r8 c' a' g16[ f] g8 c, f16[ e f] d
    e4( d\prall) c\fermata \bar "|." }
  \addlyrics {
    This on -- ly serves as an ex -- am -- ple. }
}

"[" =
- \tweak stencil ##f
- #(make-music
    'SlurEvent
    'span-direction
    -1)
- #(make-music
    'BeamEvent
    'span-direction
    -1)
"]" =
- #(make-music
    'SlurEvent
    'span-direction
    1)
- #(make-music
    'BeamEvent
    'span-direction
    1)

\score {
  \relative {
    \autoBeamOff
    r8 c' a' g16[ f] g8 c, f16[ e f] d
    e4( d\prall) c\fermata \bar "|." }
  \addlyrics {
    This on -- ly serves as an ex -- am -- ple. }
}