From 041cb33a404a829a8cdeeaebce17e45f613f10d8 Mon Sep 17 00:00:00 2001 From: James Lowe Date: Mon, 23 Jan 2017 20:52:53 +0000 Subject: [PATCH] NR: Replace \set Staff.instrumentName Issue 5039 1st Patch - Notation Reference Replace appropriate instances of \set Staff.instrumentName = " ... " with \new Staff \with { instrumentName = " ... " } --- Documentation/notation/editorial.itely | 20 +++--- Documentation/notation/percussion.itely | 82 ++++++++++--------------- Documentation/notation/pitches.itely | 36 +++++------ Documentation/notation/staff.itely | 19 +++--- 4 files changed, 70 insertions(+), 87 deletions(-) diff --git a/Documentation/notation/editorial.itely b/Documentation/notation/editorial.itely index b1fbb8b1c9..458fce1ff4 100644 --- a/Documentation/notation/editorial.itely +++ b/Documentation/notation/editorial.itely @@ -507,12 +507,13 @@ If @code{x11-color} cannot make sense of the parameter then the color returned defaults to black. @lilypond[verbatim,quote] -\relative c'' { - \override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2) - \set Staff.instrumentName = \markup { - \with-color #(x11-color 'navy) "Clarinet" +\new Staff \with { + instrumentName = \markup { + \with-color #(x11-color 'red) "Clarinet" + } } - + \relative c'' { + \override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2) gis8 a \override Beam.color = #(x11-color "medium turquoise") gis a @@ -536,12 +537,13 @@ Exact RGB colors can be specified using the Scheme function @code{rgb-color}. @lilypond[verbatim,quote] +\new Staff \with { + instrumentName = \markup { + \with-color #(x11-color 'red) "Clarinet" + } + } \relative c'' { \override Staff.StaffSymbol.color = #(x11-color 'SlateBlue2) - \set Staff.instrumentName = \markup { - \with-color #(x11-color 'navy) "Clarinet" - } - \override Stem.color = #(rgb-color 0 0 0) gis8 a \override Stem.color = #(rgb-color 1 1 1) diff --git a/Documentation/notation/percussion.itely b/Documentation/notation/percussion.itely index c6502992b0..da730eb5f3 100644 --- a/Documentation/notation/percussion.itely +++ b/Documentation/notation/percussion.itely @@ -466,27 +466,22 @@ delicate things have a look at @ref{Staff symbol}. A tambourine, entered with @q{tamb}: -@lilypond[quote,verbatim] +@lilypond[verbatim,quote] #(define mydrums '((tambourine default #t 0))) -tambustaff = { - \override Staff.StaffSymbol.line-positions = #'( 0 ) - \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5) - \set DrumStaff.instrumentName = #"Tambourine" -} +\new DrumStaff \with { instrumentName = #"Tambourine" } -\new DrumStaff { - \tambustaff +\drummode { \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) + \override Staff.StaffSymbol.line-positions = #'( 0 ) + \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5) - \drummode { - \time 6/8 - tamb8. 16 8 8 8 8 | - tamb4. 8 8 8 | - % the trick with the scaled duration and the shorter rest - % is neccessary for the correct ending of the trill-span! - tamb2.*5/6 \startTrillSpan s8 \stopTrillSpan | - } + \time 6/8 + tamb8. 16 8 8 8 8 | + tamb4. 8 8 8 | + % the trick with the scaled duration and the shorter rest + % is neccessary for the correct ending of the trill-span! + tamb2.*5/6 \startTrillSpan s8 \stopTrillSpan | } @end lilypond @@ -495,19 +490,14 @@ Music for Tam-Tam (entered with @q{tt}): @lilypond[quote,verbatim] #(define mydrums '((tamtam default #t 0))) -tamtamstaff = { - \override Staff.StaffSymbol.line-positions = #'( 0 ) - \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5) - \set DrumStaff.instrumentName = #"Tamtam" -} +\new DrumStaff \with { instrumentName = #"Tamtam" } -\new DrumStaff { - \tamtamstaff - \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) +\drummode { +\set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) +\override Staff.StaffSymbol.line-positions = #'( 0 ) +\override Staff.BarLine.bar-extent = #'(-1.5 . 1.5) - \drummode { - tt 1 \pp \laissezVibrer - } + tt 1 \pp \laissezVibrer } @end lilypond @@ -517,20 +507,16 @@ Two different bells, entered with @q{cb} (cowbell) and @q{rb} (ridebell) #(define mydrums '((ridebell default #t 3) (cowbell default #t -2))) -bellstaff = { - \override DrumStaff.StaffSymbol.line-positions = #'(-2 3) +\new DrumStaff \with { instrumentName = #"Different Bells" } + +\drummode { \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) + \override DrumStaff.StaffSymbol.line-positions = #'(-2 3) \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5) - \set DrumStaff.instrumentName = #"Different Bells" -} -\new DrumStaff { - \bellstaff - \drummode { - \time 2/4 - rb8 8 cb8 16 rb16-> ~ | - 16 8 16 cb8 8 | - } + \time 2/4 + rb8 8 cb8 16 rb16-> ~ | + 16 8 16 cb8 8 | } @end lilypond @@ -575,22 +561,22 @@ drumsB = { \score { \new StaffGroup << - \new DrumStaff { - \set DrumStaff.instrumentName = \markup { + \new DrumStaff \with { + instrumentName = \markup { \column { "Tambourine" "et" "caisse claire s. timbre" } } - \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) - \drumsA - } - - \new DrumStaff { - \set DrumStaff.instrumentName = #"Grosse Caisse" - \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) - \drumsB } + drumStyleTable = #(alist->hash-table mydrums) + } + \drumsA + \new DrumStaff \with { + instrumentName = #"Grosse Caisse" + drumStyleTable = #(alist->hash-table mydrums) + } + \drumsB >> } @end lilypond diff --git a/Documentation/notation/pitches.itely b/Documentation/notation/pitches.itely index 6b9e098121..15af95d140 100644 --- a/Documentation/notation/pitches.itely +++ b/Documentation/notation/pitches.itely @@ -1523,26 +1523,24 @@ playing in unison. @lilypond[verbatim,quote] \new GrandStaff << - \new Staff = "violin" { - \relative c'' { - \set Staff.instrumentName = #"Vln" - \set Staff.midiInstrument = #"violin" - % not strictly necessary, but a good reminder - \transposition c' - - \key c \major - g4( c8) r c r c4 - } + \new Staff = "violin" \with { + instrumentName = #"Vln" + midiInstrument = #"violin" } - \new Staff = "clarinet" { - \relative c'' { - \set Staff.instrumentName = \markup { Cl (B\flat) } - \set Staff.midiInstrument = #"clarinet" - \transposition bes - - \key d \major - a4( d8) r d r d4 - } + \relative c'' { + % not strictly necessary, but a good reminder + \transposition c' + \key c \major + g4( c8) r c r c4 + } + \new Staff = "clarinet" \with { + instrumentName = \markup { Cl (B\flat) } + midiInstrument = #"clarinet" + } + \relative c'' { + \transposition bes + \key d \major + a4( d8) r d r d4 } >> @end lilypond diff --git a/Documentation/notation/staff.itely b/Documentation/notation/staff.itely index d097535643..d7ed3e6738 100644 --- a/Documentation/notation/staff.itely +++ b/Documentation/notation/staff.itely @@ -215,8 +215,8 @@ that it supports printing the instrument name directly. For details, see @ref{Instrument names}. @lilypond[verbatim,quote] -\new PianoStaff << - \set PianoStaff.instrumentName = #"Piano" +\new PianoStaff \with { instrumentName = #"Piano" } +<< \new Staff \relative { c''1 c } \new Staff \relative { \clef bass c1 c } >> @@ -961,20 +961,14 @@ printed and subsequent changes will be ignored: @lilypond[verbatim,quote,ragged-right] prepPiccolo = <>^\markup \italic { muta in Piccolo } +prepFlute = <>^\markup \italic { muta in Flauto } + setPiccolo = { - \set Staff.instrumentName = #"Piccolo" - \set Staff.shortInstrumentName = #"Picc." - \set Staff.midiInstrument = #"piccolo" <>^\markup \bold { Piccolo } \transposition c'' } -prepFlute = <>^\markup \italic { muta in Flauto } - setFlute = { - \set Staff.instrumentName = #"Flute" - \set Staff.shortInstrumentName = #"Flt." - \set Staff.midiInstrument = #"flute" <>^\markup \bold { Flute } \transposition c' } @@ -982,14 +976,17 @@ setFlute = { \new Staff \with { instrumentName = #"Flute" shortInstrumentName = #"Flt." - midiInstrument = #"flute" } \relative { g'1 g g g \break g1 g \prepPiccolo R R \break + \set Staff.instrumentName = #"Piccolo" + \set Staff.shortInstrumentName = #"Picc." \setPiccolo g1 g g g \break g1 g \prepFlute R R \break + \set Staff.instrumentName = #"Flute" + \set Staff.shortInstrumentName = #"Flt." \setFlute g1 g g g } -- 2.39.2