lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Explicit placement of rests in a percussion staff


From: Lukas-Fabian Moser
Subject: Re: Explicit placement of rests in a percussion staff
Date: Sat, 27 Feb 2021 11:54:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

Hi Aaron,

\tweak form is a little shorter, although you could bake this into a function if you needed to use this a lot:

%%%%
\version "2.22.0"

"\\@" =
#(define-music-function
  (staff-position music)
  (integer? ly:music?)
  #{ \tweak staff-position #staff-position #music #})

\new DrumStaff \drummode { bd4 sn \@4 r4 r8 \@-4 r }
%%%%

Not sure if \@ is a good name for this, but it is conveniently short like \=.

I think the naming is a stroke of genius :-). But perhaps surprisingly, David Kastrup's \etc shorthand is even robust enough to allow for:

\version "2.22.0"

"\\@" = \tweak staff-position \etc

\new DrumStaff \drummode { bd4 sn \@2 r4 r8 \@-4 r }

Lukas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]