lilypond-user
[Top][All Lists]
Advanced

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

Automatically identify beats


From: Daniel Sales
Subject: Automatically identify beats
Date: Sat, 6 Oct 2018 14:01:02 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

Hi, is it possible to identify the beats on each different timing automatically, in order to set a different color for strong, medium and weak beats ?

something like

\coloredBeats <color_for_strong_beat> <color_for_medium_beat> <color_for_weak_beat> (black as default)
...

For example, the expected output for

\score {
  \new Staff  {
    \coloredBeats #red #green #black
    \time 2/4 a4 b |
    \time 3/4 a4 b c |
    \time 4/4 a4 b c d |
    \time 6/8 f8 g a b c d
  }
}

 would be equivalent to:

strongBeat = {
    \override NoteHead.color = #red
    \override Stem.color = #red
}
mediumBeat = {
    \override NoteHead.color = #green
    \override Stem.color = #green
}
weakBeat = {
    \override NoteHead.color = #black
    \override Stem.color = #black
}
\score {
  \new Staff  {
    \time 2/4 \strongBeat a4 \weakBeat b |
    \time 3/4 \strongBeat a4 \mediumBeat b \weakBeat c |
    \time 4/4 \strongBeat a4 \weakBeat b \mediumBeat c \weakBeat d |
    \time 6/8 \strongBeat f8 \mediumBeat g \weakBeat a \strongBeat b \mediumBeat c \weakBeat d
  }
}







reply via email to

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