\version "2.20.0" scorePart = #(define-music-function (scoreMarkup partMarkup) (markup? markup?) #{ << \tag #'removeFromPart { <>^#scoreMarkup } \tag #'removeFromScore { <>^#partMarkup } >> #} ) \paper { ragged-right = ##t left-margin = 3\cm } global = { \time 4/4 \key c \major s1*5 \bar "|." } "Fl1 1-4" = \relative c''' { c4 c c c | R1 c8 b c b c b c b | R1 } "Fl1 5-5" = \relative g'' { \tag #'removeFromPart <>^"Fl 1,2" g4 g g g | } "Fl2 1-4" = \relative g'' { g4 g g g | R1 g4 g g g | R1 } "Fl2 5-5" = \relative g'' { g4 g g g | } "Fl3 1-4" = \relative e'' { e4 e e e | R1 e4 e e e | % scorePart takes two markups, % one for the score and one for the part \scorePart \markup \left-column { "Flute 3" "to piccolo" } "To piccolo" R1 } "Fl3 5-5" = \relative b' { \transposition c' b4^"Piccolo" b b b | } fluteOnePart = { \"Fl1 1-4" \"Fl1 5-5" } fluteTwoPart = { \"Fl2 1-4" \"Fl2 5-5" } fluteThreePart = { \"Fl3 1-4" \"Fl3 5-5" } \score { \new Staff \removeWithTag #'removeFromPart << \global \fluteOnePart >> \layout {} } \score { \new Staff \removeWithTag #'removeFromPart << \global \fluteTwoPart >> \layout {} } \score { \new Staff \removeWithTag #'removeFromPart << \global \fluteThreePart >> \layout {} } flutesTop = \new Staff << \global { \set Staff.instrumentName = "Fl. 1,2" \partcombine \"Fl1 1-4" \"Fl2 1-4" \break \set Staff.shortInstrumentName = "Picc" \"Fl3 5-5" } >> flutesBottom = \new Staff << \global { \set Staff.instrumentName = "Fl. 3" \"Fl3 1-4" \break \set Staff.shortInstrumentName = "Fl. 1,2" \partcombine \"Fl1 5-5" \"Fl2 5-5" } >> \score { \removeWithTag #'removeFromScore \new StaffGroup << \flutesTop \flutesBottom >> \layout {} }