Automatic staff changes - GNU LilyPond
Description: GNU LilyPond

Next: Manual staff switches, Up: Piano music

#### 7.1.1 Automatic staff changes

Voices can be made to switch automatically between the top and the bottom staff. The syntax for this is

>          \autochange ...music...

This will create two staves inside the current PianoStaff, called `up` and `down`. The lower staff will be in bass clef by default.

A `\relative` section that is outside of `\autochange` has no effect on the pitches of music, so, if necessary, put `\relative` inside `\autochange` like

>          \autochange \relative ... ...

The autochanger switches on basis of the pitch (middle C is the turning point), and it looks ahead skipping over rests to switch in advance. Here is a practical example

>          \new PianoStaff
>            \autochange \relative c'
>            {
>              g4 a b c d r4 a g
>            }

##### See also

In this manual: Manual staff switches.

Program reference: AutoChangeMusic.

##### Bugs

The staff switches may not end up in optimal places. For high quality output, staff switches should be specified manually.

`\autochange` cannot be inside `\times`.

This page is for LilyPond-2.8.8 (stable-branch).

Other languages: English.
Using automatic language selection.