lilypond-user
[Top][All Lists]
Advanced

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

Re: hardcoded names in percussion notation?


From: Thomas Morley
Subject: Re: hardcoded names in percussion notation?
Date: Fri, 12 Jul 2013 21:23:09 +0200

2013/7/12 jboogie <address@hidden>:
> Hi, I'm very new to lilypond and trying to hack my way to a
> score for a small brazilian percussion ensemble. Actually the visive
> output is fine for now, there's just one piece of code I don't
> understand.
>
> To achieve a staff with two lines for an agogo bell, I used the example
> for woodblocks in the "Common notation for percussions" manual section:
>
>
> #(define agogo '((hiwoodblock default #t  2)
>                    (lowoodblock default #t -2)))
>
> agogostaff = {
>   \set DrumStaff.instrumentName = #"Agogo"
>   \override DrumStaff.StaffSymbol #'line-positions = #'(-2 2)
>   \set DrumStaff.drumStyleTable = #(alist->hash-table agogo)
>   \override Staff.BarLine #'bar-size = #3
> }
>
> \new DrumStaff {
>   \agogostaff
>   \drummode {
>     \time 2/4
>     wbl8 wbl16 wbl wbh8-> wbl |
>     wbl8 wbl16 wbh-> ~ wbh wbl16 r8 |
>   }
> }
>
>
> This works and produces the desired output. What I don't understand is
> if "hiwoodblock", "lowoodblock", "wbl" and "wbh" are hardcoded, or if I
> can change them, and if yes how?
>
> cheers,
> renato
>
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user

Hi renato,

easiest might be to insert new some namings into 'drumPitchNames' via:

%%%%%%%%
%% snippet1-start
%%%%%%%%

\version "2.12.3"

drumPitchNames =
#(append '(
  (xyz . hiwoodblock)
  (qwertz . lowoodblock)
  )
  drumPitchNames)

#(define agogo '((hiwoodblock default #f  2)
                 (lowoodblock default #f -2)))

agogostaff = {
  \set DrumStaff.instrumentName = #"Agogo"
  \override DrumStaff.StaffSymbol #'line-positions = #'(-2 2)
  \set DrumStaff.drumStyleTable = #(alist->hash-table agogo)
  \override Staff.BarLine #'bar-size = #3
  %% for versions > 2.12.3
  %\override Staff.BarLine #'bar-extent = #'(-1.5 . 1.5)
}

\new DrumStaff {
  \agogostaff
  \drummode {
    \time 2/4
    qwertz8 qwertz16 qwertz xyz8-> qwertz |
    xyz8 qwertz16 xyz-> ~ xyz qwertz16 r8 |
  }
}

%%%%%%%%
%% snippet1-end
%%%%%%%%

Here another example (more a joke):

%%%%%%%%
%% snippet2-start
%%%%%%%%

drumPitchNames =
#(append  '(
  (ac . agatha-christie)
  (dh . dashiell-hammet)
  (rc . raymond-chandler)
  (ph . patricia-highsmith)
  )
drumPitchNames
)

#(define myset '(
  (agatha-christie    la      #f -1)
  (dashiell-hammet    default #f  0)
  (raymond-chandler   diamond #f  1)
  (patricia-highsmith cross   #f  1)
))

\new DrumStaff \with { drumStyleTable = #(alist->hash-table myset) }
  \drummode {
     ac4 dh4 rc ph |
  }

%%%%%%%%
%% snippet2-end
%%%%%%%%

HTH,
  Harm

Btw, from your code (\override Staff.BarLine #'bar-size = #3) I think
you're using 2.12.3.
Why?



reply via email to

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