Jump to content

Using \autoChange with more than one voice: Difference between revisions

From LilyPond wiki
m New category
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Using <code>autochange</code> with more than one voice.
Here is a demonstration of how to use <code>\autoChange</code> with more than one voice.


<lilypond version="2.24">
<lilypond version="2.24">
Line 36: Line 36:
</lilypond>
</lilypond>


[[Category:Keyboards]]
[[Category:Pitches]]
[[Category:Pitches]]
[[Category:Staff notation]]
[[Category:Staff notation]]
[[Category:Keyboards]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]
[[Category:Snippet]]

Latest revision as of 06:37, 11 December 2025

Here is a demonstration of how to use \autoChange with more than one voice.

\version "2.24"

\score {
  \new PianoStaff
  <<
    \new Staff = "up" {
      <<
        \set Timing.beamExceptions = #'()
        \set Timing.beatStructure = #'(4)
        \new Voice {
          \voiceOne
          \autoChange
          \relative c' {
            g8 a b c d e f g
            g,8 a b c d e f g
          }
        }

        \new Voice {
          \voiceTwo
          \autoChange
          \relative c' {
            g8 a b c d e f g
            g,,8 a b c d e f g
          }
        }
      >>
    }

    \new Staff = "down" {
      \clef bass
    }
  >>
}