Jump to content

Mixing harmonics and regular notes: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
m New category
Tags: Mobile edit Mobile web edit
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
In passages where there are harmonics in one voice and regular notes in the other, the note head <code>'style</code> override only applies to the voice in which it is declared.
In passages where there are harmonics in one voice and regular notes in the other, the note head <code>'style</code> override only applies to the voice in which it is declared.


<lilypond version="2.24.0">
<lilypond version="2.24">
%% http://lsr.di.unimi.it/LSR/Item?id=539
%% http://lsr.di.unimi.it/LSR/Item?id=539


Line 30: Line 30:
[[Category:Fretted strings]]
[[Category:Fretted strings]]
[[Category:Tweaks and overrides]]
[[Category:Tweaks and overrides]]
[[Category:Snippet]]

Latest revision as of 23:21, 21 November 2025

In passages where there are harmonics in one voice and regular notes in the other, the note head 'style override only applies to the voice in which it is declared.

\version "2.24"

%% http://lsr.di.unimi.it/LSR/Item?id=539

upper = \relative c' {
  \voiceOne
  \clef "treble_8"
  \override NoteHead.style = #'harmonic
  g8 a b c b4 d
  <g b>1
}

lower = \relative c {
  \voiceTwo
  \clef "treble_8"
  e2 d
  g,1
}

\score {
  \new Staff = "guitar" <<
    \context Voice = "upper" { \upper }
    \context Voice = "lower" { \lower }
  >>
  \layout { }
}