Jump to content

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

From LilyPond wiki
Import snippet from LSR
 
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
Line 1: Line 1:
Using <code>autochange</code> with more than one voice.
Using <code>autochange</code> with more than one voice.


<lilypond version="2.24.0">
<lilypond version="2.24">
\score {
\score {
   \new PianoStaff
   \new PianoStaff

Revision as of 18:56, 16 November 2025

Using 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
    }
  >>
}