From 3f57efa0cde39bf0642fb6fb3672a19262ceda83 Mon Sep 17 00:00:00 2001 From: James Lowe Date: Sat, 18 Feb 2017 11:51:05 +0000 Subject: [PATCH] Snippets: Replace \set Staff.instrumentName Note: This patch includes a makelsr.py run Issue 5039 3rd Patch - Snippets Replace appropriate instances of \set Staff.instrumentName = " ... " with \new Staff \with { instrumentName = " ... " } --- Documentation/snippets/adding-drum-parts.ly | 31 +- ...aligning-and-centering-instrument-names.ly | 66 +++-- Documentation/snippets/clip-systems.ly | 18 +- .../combining-two-parts-on-the-same-staff.ly | 39 +-- .../snippets/figured-bass-headword.ly | 93 +++--- ...y-customized-polymetric-time-signatures.ly | 23 +- ...ynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly | 69 +++-- Documentation/snippets/jazz-combo-template.ly | 58 ++-- .../snippets/new/adding-drum-parts.ly | 50 ++++ ...aligning-and-centering-instrument-names.ly | 62 ++++ Documentation/snippets/new/clip-systems.ly | 88 ++++++ .../combining-two-parts-on-the-same-staff.ly | 65 +++++ .../snippets/new/figured-bass-headword.ly | 101 +++++++ ...y-customized-polymetric-time-signatures.ly | 38 +++ ...ynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly | 187 ++++++++++++ .../snippets/new/jazz-combo-template.ly | 276 ++++++++++++++++++ .../orchestra,-choir-and-piano-template.ly | 153 ++++++++++ .../snippets/new/piano-template-simple.ly | 37 +++ ...uoting-another-voice-with-transposition.ly | 42 +++ .../snippets/new/quoting-another-voice.ly | 54 ++++ Documentation/snippets/new/staff-headword.ly | 31 +- .../new/string-quartet-template-simple.ly | 58 ++++ ...ng-quartet-template-with-separate-parts.ly | 146 +++++++++ Documentation/snippets/new/wind-headword.ly | 12 +- .../orchestra,-choir-and-piano-template.ly | 163 ++++++----- .../snippets/piano-template-simple.ly | 22 +- ...uoting-another-voice-with-transposition.ly | 25 +- .../snippets/quoting-another-voice.ly | 40 +-- Documentation/snippets/staff-headword.ly | 33 ++- .../string-quartet-template-simple.ly | 42 ++- ...ng-quartet-template-with-separate-parts.ly | 107 ++++--- Documentation/snippets/wind-headword.ly | 14 +- 32 files changed, 1829 insertions(+), 414 deletions(-) create mode 100644 Documentation/snippets/new/adding-drum-parts.ly create mode 100644 Documentation/snippets/new/aligning-and-centering-instrument-names.ly create mode 100644 Documentation/snippets/new/clip-systems.ly create mode 100644 Documentation/snippets/new/combining-two-parts-on-the-same-staff.ly create mode 100644 Documentation/snippets/new/figured-bass-headword.ly create mode 100644 Documentation/snippets/new/heavily-customized-polymetric-time-signatures.ly create mode 100644 Documentation/snippets/new/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly create mode 100644 Documentation/snippets/new/jazz-combo-template.ly create mode 100644 Documentation/snippets/new/orchestra,-choir-and-piano-template.ly create mode 100644 Documentation/snippets/new/piano-template-simple.ly create mode 100644 Documentation/snippets/new/quoting-another-voice-with-transposition.ly create mode 100644 Documentation/snippets/new/quoting-another-voice.ly create mode 100644 Documentation/snippets/new/string-quartet-template-simple.ly create mode 100644 Documentation/snippets/new/string-quartet-template-with-separate-parts.ly diff --git a/Documentation/snippets/adding-drum-parts.ly b/Documentation/snippets/adding-drum-parts.ly index 7ce432bcfc..18a3696de4 100644 --- a/Documentation/snippets/adding-drum-parts.ly +++ b/Documentation/snippets/adding-drum-parts.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.56 +\version "2.19.56" \header { lsrtags = "percussion, preparing-parts, really-simple, rhythms, specific-notation" @@ -24,7 +25,8 @@ lines is possible. drh = \drummode { cymc4.^"crash" hhc16^"h.h." hh hhc8 hho hhc8 hh16 hh hhc4 r4 r2 - } + } % begin verbatim + drl = \drummode { bd4 sn8 bd bd4 << bd ss >> bd8 tommh tommh bd toml toml bd tomfh16 tomfh @@ -37,21 +39,20 @@ timb = \drummode { \score { << \new DrumStaff \with { + instrumentName = #"timbales" drumStyleTable = #timbales-style \override StaffSymbol.line-count = #2 \override BarLine.bar-extent = #'(-1 . 1) - } << - \set Staff.instrumentName = #"timbales" + } + << \timb >> - \new DrumStaff << - \set Staff.instrumentName = #"drums" + \new DrumStaff \with { instrumentName = #"drums" } + << \new DrumVoice { \stemUp \drh } \new DrumVoice { \stemDown \drl } >> >> \layout { } - \midi { - \tempo 4 = 120 - } + \midi { \tempo 4 = 120 } } diff --git a/Documentation/snippets/aligning-and-centering-instrument-names.ly b/Documentation/snippets/aligning-and-centering-instrument-names.ly index 4aa325956f..30bfc4acd8 100644 --- a/Documentation/snippets/aligning-and-centering-instrument-names.ly +++ b/Documentation/snippets/aligning-and-centering-instrument-names.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.56 +\version "2.19.56" \header { lsrtags = "paper-and-layout, text, titles" @@ -20,44 +21,47 @@ and the following systems, respectively. doctitle = "Aligning and centering instrument names" } % begin verbatim -\paper { - left-margin = 3\cm -} +\paper { left-margin = 3\cm } % begin verbatim + \score { \new StaffGroup << - \new Staff { - \override Staff.InstrumentName.self-alignment-X = #LEFT - \set Staff.instrumentName = \markup \left-column { + + \new Staff \with { + \override InstrumentName.self-alignment-X = #LEFT + instrumentName = \markup \left-column { "Left aligned" "instrument name" + } + shortInstrumentName = "Left" } - \set Staff.shortInstrumentName = #"Left" - c''1 - \break - c''1 - } - \new Staff { - \override Staff.InstrumentName.self-alignment-X = #CENTER - \set Staff.instrumentName = \markup \center-column { + + { c''1 \break c''1 } + + \new Staff \with { + \override InstrumentName.self-alignment-X = #CENTER + instrumentName = \markup \center-column { Centered "instrument name" - } - \set Staff.shortInstrumentName = #"Centered" - g'1 - g'1 + } + shortInstrumentName = "Centered" } - \new Staff { - \override Staff.InstrumentName.self-alignment-X = #RIGHT - \set Staff.instrumentName = \markup \right-column { + + { g'1 g'1} + + \new Staff \with { + \override InstrumentName.self-alignment-X = #RIGHT + instrumentName = \markup \right-column { "Right aligned" "instrument name" } - \set Staff.shortInstrumentName = #"Right" - e'1 - e'1 + shortInstrumentName = "Right" } + + { e'1 e'1 } + >> + \layout { ragged-right = ##t indent = 4\cm diff --git a/Documentation/snippets/clip-systems.ly b/Documentation/snippets/clip-systems.ly index 736586bb94..ed8ac5596c 100644 --- a/Documentation/snippets/clip-systems.ly +++ b/Documentation/snippets/clip-systems.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.19.22" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.56 +\version "2.19.56" \header { lsrtags = "paper-and-layout" @@ -38,7 +39,8 @@ are generated. origScore = \score { \relative c' { - \set Staff.instrumentName = #"bla" + \new Staff \with { instrumentName = "Instrument" } % begin verbatim + c1 d1 \grace c16 e1 diff --git a/Documentation/snippets/combining-two-parts-on-the-same-staff.ly b/Documentation/snippets/combining-two-parts-on-the-same-staff.ly index 643dacbe86..e869f243e7 100644 --- a/Documentation/snippets/combining-two-parts-on-the-same-staff.ly +++ b/Documentation/snippets/combining-two-parts-on-the-same-staff.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.56 +\version "2.19.56" \header { lsrtags = "simultaneous-notes, syntax-and-expressions, text" @@ -37,7 +38,8 @@ musicUp = \relative c'' { a4 c4.( g8) a4 | g4 e' g,( a8 b) | c b a2. -} +} % begin verbatim + musicDown = \relative c'' { g4 e4.( d8) c4 | @@ -46,22 +48,21 @@ musicDown = \relative c'' { } \score { - << << - \new Staff { - \set Staff.instrumentName = #"Standard polyphony" + \new Staff \with { instrumentName = #"Standard polyphony" } + << \musicUp \\ \musicDown >> + + \new Staff \with { + instrumentName = #"PartCombine without text" + printPartCombineTexts = ##f } - \new Staff \with { printPartCombineTexts = ##f } { - \set Staff.instrumentName = #"PartCombine without texts" - \partcombine \musicUp \musicDown - } - \new Staff { - \set Staff.instrumentName = #"PartCombine with texts" + + \partcombine \musicUp \musicDown + + \new Staff \with { instrumentName = #"PartCombine with text" } \partcombine \musicUp \musicDown - } >> - >> \layout { indent = 6.0\cm \context { diff --git a/Documentation/snippets/figured-bass-headword.ly b/Documentation/snippets/figured-bass-headword.ly index 190cec94a0..f15b8974c4 100644 --- a/Documentation/snippets/figured-bass-headword.ly +++ b/Documentation/snippets/figured-bass-headword.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.56 +\version "2.19.56" \header { lsrtags = "headword" @@ -29,53 +30,49 @@ extendOff = \bassFigureExtendersOff \score { \new StaffGroup << \new GrandStaff << - \new Staff = "violinoI" { - \set Staff.instrumentName = \markup { - \line { Violino I. } - } - \time 4/4 - \mark \markup { \italic Adagio. } - \partial 8 - r16 a'16 | - a'8. [ d''16 d''8. e''16 ] cis''8 a'4 a''16 bes''16 | - cis''8 d''16 ( e'' ) e''8. d''16 d''4 r8 d''16 e''16 | - f''8 f''4 g''16 ( f''16 ) e''8 e''4 f''16 ( e''16 ) | - d''8. d''16 g''16 ( f''16 ) e''16 ( d''16 ) cis''8 - cis''4 cis''16 cis''16 | - d''8 d''8 c''8. c''16 c''8 ( b'4 ) b'16 b'16 | - c''8 c''8 bes'8. bes'16 bes'8 ( a'4 ) a''16 a''16 | - a''8 g''8 g''8. g''16 g''8 ( f''8 ) r8 f''8 | - } + \new Staff = "violinoI" \with { instrumentName = "Violino I." } % begin verbatim - \new Staff = "violinoII" { - \set Staff.instrumentName = \markup { - \line { Violino II. } - } - \time 4/4 - \partial 8 - r16 f'16 | - f'8. g'16 g'4 a'4 r8 d''16 d''16 | - e''8 a'8 cis''8. d''16 d''4 r8 f''16 g''16 | - a''8 a''8 d''8. d''16 g'8 g'8 c''8. c''16 | - f'8. f''16 bes''16 ( a''16 ) g''16 ( f''16 ) e''8 e''4 e''16 e''16 | - a'8 fis''8 g''8 a''8 d''8 d''4 d''16 d''16 | - g'8 e''8 f''8 g''8 c''8 c''4 cis''16 cis''16 | - d''8 d''8 e''8. e''16 e''8 a'8 r8 d''8 | - } + + { + \time 4/4 + \mark \markup { \italic Adagio. } + \partial 8 r16 a'16 | + a'8. [ d''16 d''8. e''16 ] cis''8 a'4 a''16 bes''16 | + cis''8 d''16 ( e'' ) e''8. d''16 d''4 r8 d''16 e''16 | + f''8 f''4 g''16 ( f''16 ) e''8 e''4 f''16 ( e''16 ) | + d''8. d''16 g''16 ( f''16 ) e''16 ( d''16 ) cis''8 + cis''4 cis''16 cis''16 | + d''8 d''8 c''8. c''16 c''8 ( b'4 ) b'16 b'16 | + c''8 c''8 bes'8. bes'16 bes'8 ( a'4 ) a''16 a''16 | + a''8 g''8 g''8. g''16 g''8 ( f''8 ) r8 f''8 | + } + + \new Staff = "violinoII" \with { instrumentName = "Violino II." } + + { + \time 4/4 + \partial 8 r16 f'16 | + f'8. g'16 g'4 a'4 r8 d''16 d''16 | + e''8 a'8 cis''8. d''16 d''4 r8 f''16 g''16 | + a''8 a''8 d''8. d''16 g'8 g'8 c''8. c''16 | + f'8. f''16 bes''16 ( a''16 ) g''16 ( f''16 ) e''8 e''4 e''16 e''16 | + a'8 fis''8 g''8 a''8 d''8 d''4 d''16 d''16 | + g'8 e''8 f''8 g''8 c''8 c''4 cis''16 cis''16 | + d''8 d''8 e''8. e''16 e''8 a'8 r8 d''8 | + } >> - \new Staff = "violone" { - \set Staff.instrumentName = \markup { - \center-column { - Violone, - \line { e Cembalo. } - } + \new Staff = "violone" \with { + instrumentName = \markup { + \center-column { Violone, \line { e Cembalo. } } } + } + + { \time 4/4 \clef bass - \partial 8 - r16 d16 | + \partial 8 r16 d16 | d4 bes,4 a,4 f4 | g8 f16 g16 a8 a,8 d4 d'4 ~ | d'8 c'8 b4 c'8 c'16 bes16 a4 | @@ -83,6 +80,7 @@ extendOff = \bassFigureExtendersOff fis8 d8 e8 fis8 g8 g,4 g16 f16 | e8 c8 d8 e8 f8 f,4 a,8 | b,4 cis4 d4 r8 d'8 | + } \new FiguredBass \figuremode { @@ -98,7 +96,6 @@ extendOff = \bassFigureExtendersOff <6>4 <6->8 <6 5->8 <5 4->8 \extendOn <5 3>4 \extendOff <5 _+>8 | <7>8 <6>8 <5>4 <9 4>8 <8 3>8 s4 | } - >> \layout { diff --git a/Documentation/snippets/heavily-customized-polymetric-time-signatures.ly b/Documentation/snippets/heavily-customized-polymetric-time-signatures.ly index 53d7f2120e..79bb34efc0 100644 --- a/Documentation/snippets/heavily-customized-polymetric-time-signatures.ly +++ b/Documentation/snippets/heavily-customized-polymetric-time-signatures.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.56 +\version "2.19.56" \header { lsrtags = "contemporary-notation, percussion, real-music, rhythms" @@ -19,7 +20,6 @@ is the template of a real Balkan song!). } % begin verbatim melody = \relative c'' { - \set Staff.instrumentName = #"Bb Sop." \key g \major \compoundMeter #'((3 8) (2 8) (2 8) (3 8) (2 8) (2 8) (2 8) (2 8) (3 8) (2 8) (2 8)) @@ -28,13 +28,18 @@ melody = \relative c'' { c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 \break c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 \break -} +} % begin verbatim + drum = \new DrumStaff \drummode { \bar ".|:" bd4.^\markup { Drums } sn4 bd \bar ";" sn4. bd4 sn \bar ";" bd sn bd4. sn4 bd \bar ":|." } + \new Staff \with { + instrumentName = \markup { \concat { "B" \flat " Sop." } } + } + { \melody \drum diff --git a/Documentation/snippets/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly b/Documentation/snippets/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly index 5e43ce5333..b515ee3282 100644 --- a/Documentation/snippets/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly +++ b/Documentation/snippets/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.56 +\version "2.19.56" \header { lsrtags = "expressive-marks, tweaks-and-overrides, version-specific" @@ -57,7 +58,8 @@ not at the center of pp. \paper { ragged-right = ##f indent = 2.5\cm -} +} % begin verbatim + % Solution 1: Using a simple markup with a particular halign value % Drawback: It's a markup, not a dynamic command, so \dynamicDown @@ -120,27 +122,28 @@ semppMII = #:italic "sempre" #:dynamic "pp"))) -\context StaffGroup << - \context Staff = "s" << - \set Staff.instrumentName = #"Normal" +\new StaffGroup << + \new Staff = "s" \with { instrumentName = \markup \column { Normal } } + << \relative c'' { - \override Staff.InstrumentName.self-alignment-X = #LEFT \key es \major c4\pp c\p c c | c\ff c c\pp c } >> - \context Staff = "sMarkup" << - \set Staff.instrumentName = \markup \column { Normal markup } + \new Staff = "sMarkup" \with { + instrumentName = \markup \column { Normal markup } + } + << \relative c'' { - \override Staff.InstrumentName.self-alignment-X = #LEFT \key es \major c4-\semppMarkup c\p c c | c\ff c c-\semppMarkup c } >> - \context Staff = "sK" << - \set Staff.instrumentName = \markup \column { Explicit shifting } + \new Staff = "sK" \with { + instrumentName = \markup \column { Explicit shifting } + } + << \relative c'' { - \override Staff.InstrumentName.self-alignment-X = #LEFT \key es \major \once \override DynamicText.X-offset = #-9.2 c4\semppK c\p c c @@ -149,34 +152,38 @@ semppMII = c4\semppK c } >> - \context Staff = "sT" << - \set Staff.instrumentName = \markup \column { Right padding } + \new Staff = "sT" \with { + instrumentName = \markup \column { Right padding } + } + << \relative c'' { - \override Staff.InstrumentName.self-alignment-X = #LEFT \key es \major c4\semppT c\p c c | c\ff c c\semppT c } >> - \context Staff = "sM" << - \set Staff.instrumentName = \markup \column { Setting dimension "to zero" } + \new Staff = "sM" \with { + instrumentName = \markup \column { Set dimension "to zero" } + } + << \relative c'' { - \override Staff.InstrumentName.self-alignment-X = #LEFT \key es \major c4\semppM c\p c c | c\ff c c\semppM c } >> - \context Staff = "sG" << - \set Staff.instrumentName = \markup \column { Shifting inside dynamics } + \new Staff = "sG" \with { + instrumentName = \markup \column { Shift inside dynamics} + } + << \relative c'' { - \override Staff.InstrumentName.self-alignment-X = #LEFT \key es \major c4\semppG c\p c c | c\ff c c\semppG c } >> - \context Staff = "sMII" << - \set Staff.instrumentName = \markup \column { Alignment inside dynamics } + \new Staff = "sMII" \with { + instrumentName = \markup \column { Alignment inside dynamics } + } + << \relative c'' { - \override Staff.InstrumentName.self-alignment-X = #LEFT \key es \major % Setting to ##f (false) gives the same result \override DynamicText.X-offset = #0 @@ -184,3 +191,5 @@ semppMII = } >> >> + +\layout { \override Staff.InstrumentName.self-alignment-X = #LEFT } diff --git a/Documentation/snippets/jazz-combo-template.ly b/Documentation/snippets/jazz-combo-template.ly index 9d0dc82fc3..f16a6970a0 100644 --- a/Documentation/snippets/jazz-combo-template.ly +++ b/Documentation/snippets/jazz-combo-template.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.56 +\version "2.19.56" \header { lsrtags = "fretted-strings, keyboards, percussion, real-music, template" @@ -29,7 +30,8 @@ music is within a @code{\\transpose} section. \column { "LilyPond example file by Amelie Zapf," "Berlin 07/07/2003" - } + } % begin verbatim + } } % To make the example display in the documentation @@ -74,7 +76,6 @@ trpHarmony = \transpose c' d { } trumpet = { \global - \set Staff.instrumentName = #"Trumpet" \clef treble << \trpt @@ -91,7 +92,6 @@ altoHarmony = \transpose c' a { } altoSax = { \global - \set Staff.instrumentName = #"Alto Sax" \clef treble << \alto @@ -112,7 +112,6 @@ bariHarmony = \transpose c' a \chordmode { } bariSax = { \global - \set Staff.instrumentName = #"Bari Sax" \clef treble << \bari @@ -129,7 +128,6 @@ tboneHarmony = \chordmode { } trombone = { \global - \set Staff.instrumentName = #"Trombone" \clef bass << \tbone @@ -153,7 +151,6 @@ gtrHarmony = \chordmode { } guitar = { \global - \set Staff.instrumentName = #"Guitar" \clef treble << \gtr @@ -186,7 +183,6 @@ lhLower = \relative c { PianoRH = { \clef treble \global - \set Staff.midiInstrument = #"acoustic grand" << \new Voice = "one" \rhUpper \new Voice = "two" \rhLower @@ -195,7 +191,6 @@ PianoRH = { PianoLH = { \clef bass \global - \set Staff.midiInstrument = #"acoustic grand" << \new Voice = "one" \lhUpper \new Voice = "two" \lhLower @@ -204,7 +199,6 @@ PianoLH = { piano = { << - \set PianoStaff.instrumentName = #"Piano" \new Staff = "upper" \PianoRH \new Staff = "lower" \PianoLH >> @@ -217,7 +211,6 @@ Bass = \relative c { } bass = { \global - \set Staff.instrumentName = #"Bass" \clef bass << \Bass @@ -241,7 +234,6 @@ down = \drummode { drumContents = { \global << - \set DrumStaff.instrumentName = #"Drums" \new DrumVoice \up \new DrumVoice \down >> @@ -252,19 +244,31 @@ drumContents = { \score { << \new StaffGroup = "horns" << - \new Staff = "trumpet" \trumpet - \new Staff = "altosax" \altoSax - \new ChordNames = "barichords" \bariHarmony - \new Staff = "barisax" \bariSax - \new Staff = "trombone" \trombone + \new Staff = "trumpet" \with { instrumentName = #"Trumpet" } + \trumpet + \new Staff = "altosax" \with { instrumentName = #"Alto Sax" } + \altoSax + \new ChordNames = "barichords" \with { instrumentName = #"Trumpet" } + \bariHarmony + \new Staff = "barisax" \with { instrumentName = #"Bari Sax" } + \bariSax + \new Staff = "trombone" \with { instrumentName = #"Trombone" } + \trombone >> \new StaffGroup = "rhythm" << \new ChordNames = "chords" \gtrHarmony - \new Staff = "guitar" \guitar - \new PianoStaff = "piano" \piano - \new Staff = "bass" \bass - \new DrumStaff \drumContents + \new Staff = "guitar" \with { instrumentName = #"Guitar" } + \guitar + \new PianoStaff = "piano" \with { + instrumentName = #"Piano" + midiInstrument = #"acoustic grand" + } + \piano + \new Staff = "bass" \with { instrumentName = #"Bass" } + \bass + \new DrumStaff \with { instrumentName = #"Drums" } + \drumContents >> >> \layout { diff --git a/Documentation/snippets/new/adding-drum-parts.ly b/Documentation/snippets/new/adding-drum-parts.ly new file mode 100644 index 0000000000..9c90056815 --- /dev/null +++ b/Documentation/snippets/new/adding-drum-parts.ly @@ -0,0 +1,50 @@ +\version "2.19.56" + +\header { + lsrtags = "percussion, preparing-parts, really-simple, rhythms, specific-notation" + + texidoc = " +Using the powerful pre-configured tools such as the @code{\\drummode} +function and the @code{DrumStaff} context, inputting drum parts is +quite easy: drums are placed at their own staff positions (with a +special clef symbol) and have note heads according to the drum. +Attaching an extra symbol to the drum or restricting the number of +lines is possible. + +" + doctitle = "Adding drum parts" +} % begin verbatim + +drh = \drummode { + cymc4.^"crash" hhc16^"h.h." hh hhc8 hho hhc8 hh16 hh + hhc4 r4 r2 + } +drl = \drummode { + bd4 sn8 bd bd4 << bd ss >> + bd8 tommh tommh bd toml toml bd tomfh16 tomfh + } +timb = \drummode { + timh4 ssh timl8 ssh r timh r4 + ssh8 timl r4 cb8 cb + } + +\score { + << + \new DrumStaff \with { + instrumentName = #"timbales" + drumStyleTable = #timbales-style + \override StaffSymbol.line-count = #2 + \override BarLine.bar-extent = #'(-1 . 1) + } + << + \timb + >> + \new DrumStaff \with { instrumentName = #"drums" } + << + \new DrumVoice { \stemUp \drh } + \new DrumVoice { \stemDown \drl } + >> + >> + \layout { } + \midi { \tempo 4 = 120 } +} diff --git a/Documentation/snippets/new/aligning-and-centering-instrument-names.ly b/Documentation/snippets/new/aligning-and-centering-instrument-names.ly new file mode 100644 index 0000000000..1d89f9434e --- /dev/null +++ b/Documentation/snippets/new/aligning-and-centering-instrument-names.ly @@ -0,0 +1,62 @@ +\version "2.19.56" + +\header { + lsrtags = "paper-and-layout, text, titles" + + texidoc = " +The horizontal alignment of instrument names is tweaked by changing the +@code{Staff.InstrumentName #'self-alignment-X} property. The +@code{\\layout} variables @code{indent} and @code{short-indent} define +the space in which the instrument names are aligned before the first +and the following systems, respectively. + +" + doctitle = "Aligning and centering instrument names" +} % begin verbatim + +\paper { left-margin = 3\cm } + +\score { + \new StaffGroup << + + \new Staff \with { + \override InstrumentName.self-alignment-X = #LEFT + instrumentName = \markup \left-column { + "Left aligned" + "instrument name" + } + shortInstrumentName = "Left" + } + + { c''1 \break c''1 } + + \new Staff \with { + \override InstrumentName.self-alignment-X = #CENTER + instrumentName = \markup \center-column { + Centered + "instrument name" + } + shortInstrumentName = "Centered" + } + + { g'1 g'1} + + \new Staff \with { + \override InstrumentName.self-alignment-X = #RIGHT + instrumentName = \markup \right-column { + "Right aligned" + "instrument name" + } + shortInstrumentName = "Right" + } + + { e'1 e'1 } + + >> + + \layout { + ragged-right = ##t + indent = 4\cm + short-indent = 2\cm + } +} diff --git a/Documentation/snippets/new/clip-systems.ly b/Documentation/snippets/new/clip-systems.ly new file mode 100644 index 0000000000..e099aae47e --- /dev/null +++ b/Documentation/snippets/new/clip-systems.ly @@ -0,0 +1,88 @@ +\version "2.19.56" + +\header { + lsrtags = "paper-and-layout" + + texidoc = " +This code shows how to clip (extract) snippets from a full score. + +This file needs to be run separately with @code{-dclip-systems}; the +snippets page may not adequately show the results. + +The result will be files named +@samp{base-from-start-to-end[-count].eps}. + + +If system starts and ends are included, they include extents of the +System grob, e.g., instrument names. + + +Grace notes at the end point of the region are not included. + + +Regions can span multiple systems. In this case, multiple EPS files +are generated. + +" + doctitle = "Clip systems" +} % begin verbatim + +#(ly:set-option 'clip-systems) +#(define output-suffix "1") + +origScore = \score { + \relative c' { + \new Staff \with { instrumentName = "Instrument" } + c1 + d1 + \grace c16 e1 + \key d \major + f1 \break + \clef bass + g,1 + fis1 + } +} + +\book { + \score { + \origScore + \layout { + % Each clip-region is a (START . END) pair + % where both are rhythmic-locations. + + % (make-rhythmic-locations BAR-NUMBER NUM DEN) + % means NUM/DEN whole-notes into bar numbered BAR-NUMBER + + clip-regions = #(list + (cons + (make-rhythmic-location 2 0 1) + (make-rhythmic-location 4 0 1)) + + (cons + (make-rhythmic-location 0 0 1) + (make-rhythmic-location 4 0 1)) + + (cons + (make-rhythmic-location 0 0 1) + (make-rhythmic-location 6 0 1)) + ) + } + } +} + +#(ly:set-option 'clip-systems #f) +#(define output-suffix #f) + +\book { + \score { \origScore } + \markup { \bold \fontsize #6 clips } + \score { + \lyrics { + \markup { from-2.0.1-to-4.0.1-clip.eps } + \markup { + \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps" + (ly:parser-output-name)) } + } + } +} diff --git a/Documentation/snippets/new/combining-two-parts-on-the-same-staff.ly b/Documentation/snippets/new/combining-two-parts-on-the-same-staff.ly new file mode 100644 index 0000000000..341ac8d3af --- /dev/null +++ b/Documentation/snippets/new/combining-two-parts-on-the-same-staff.ly @@ -0,0 +1,65 @@ +\version "2.19.56" + +\header { + lsrtags = "simultaneous-notes, syntax-and-expressions, text" + + texidoc = " +The part combiner tool ( @code{\\partcombine} command ) allows the +combination of several different parts on the same staff. Text +directions such as @qq{solo} or @qq{a2} are added by default; to remove +them, simply set the property @code{printPartCombineTexts} to @code{f}. +For vocal scores (hymns), there is no need to add @qq{solo/a2} texts, +so they should be switched off. However, it might be better not to use +it if there are any solos, as they won't be indicated. In such cases, +standard polyphonic notation may be preferable. + +This snippet presents the three ways two parts can be printed on a same +staff: standard polyphony, @code{\\partcombine} without texts, and +@code{\\partcombine} with texts. + + + + +" + doctitle = "Combining two parts on the same staff" +} % begin verbatim + +%% Combining pedal notes with clef changes + +musicUp = \relative c'' { + \time 4/4 + a4 c4.( g8) a4 | + g4 e' g,( a8 b) | + c b a2. +} + +musicDown = \relative c'' { + g4 e4.( d8) c4 | + r2 g'4( f8 e) | + d2 \stemDown a +} + +\score { + << + \new Staff \with { instrumentName = #"Standard polyphony" } + + << \musicUp \\ \musicDown >> + + \new Staff \with { + instrumentName = #"PartCombine without text" + printPartCombineTexts = ##f + } + + \partcombine \musicUp \musicDown + + \new Staff \with { instrumentName = #"PartCombine with text" } + \partcombine \musicUp \musicDown + >> + \layout { + indent = 6.0\cm + \context { + \Score + \override SystemStartBar.collapse-height = #30 + } + } +} diff --git a/Documentation/snippets/new/figured-bass-headword.ly b/Documentation/snippets/new/figured-bass-headword.ly new file mode 100644 index 0000000000..4f29b597aa --- /dev/null +++ b/Documentation/snippets/new/figured-bass-headword.ly @@ -0,0 +1,101 @@ +\version "2.19.56" + +\header { + lsrtags = "headword" + + texidoc = " +Figured bass headword + +" + doctitle = "Figured bass headword" +} % begin verbatim + +% NR 2.7.3 Figured bass + +% Arcangelo Corelli, 12 Sonate da Camera, Op. 2 +% Sonata II, Allemanda +% measures 1 - 88 +% Coded by Neil Puttock; modified by Carl Sorensen + +extendOn = \bassFigureExtendersOn +extendOff = \bassFigureExtendersOff + +\score { + \new StaffGroup << + \new GrandStaff << + \new Staff = "violinoI" \with { instrumentName = "Violino I." } + + { + \time 4/4 + \mark \markup { \italic Adagio. } + \partial 8 r16 a'16 | + a'8. [ d''16 d''8. e''16 ] cis''8 a'4 a''16 bes''16 | + cis''8 d''16 ( e'' ) e''8. d''16 d''4 r8 d''16 e''16 | + f''8 f''4 g''16 ( f''16 ) e''8 e''4 f''16 ( e''16 ) | + d''8. d''16 g''16 ( f''16 ) e''16 ( d''16 ) cis''8 + cis''4 cis''16 cis''16 | + d''8 d''8 c''8. c''16 c''8 ( b'4 ) b'16 b'16 | + c''8 c''8 bes'8. bes'16 bes'8 ( a'4 ) a''16 a''16 | + a''8 g''8 g''8. g''16 g''8 ( f''8 ) r8 f''8 | + } + + \new Staff = "violinoII" \with { instrumentName = "Violino II." } + + { + \time 4/4 + \partial 8 r16 f'16 | + f'8. g'16 g'4 a'4 r8 d''16 d''16 | + e''8 a'8 cis''8. d''16 d''4 r8 f''16 g''16 | + a''8 a''8 d''8. d''16 g'8 g'8 c''8. c''16 | + f'8. f''16 bes''16 ( a''16 ) g''16 ( f''16 ) e''8 e''4 e''16 e''16 | + a'8 fis''8 g''8 a''8 d''8 d''4 d''16 d''16 | + g'8 e''8 f''8 g''8 c''8 c''4 cis''16 cis''16 | + d''8 d''8 e''8. e''16 e''8 a'8 r8 d''8 | + } + + >> + + \new Staff = "violone" \with { + instrumentName = \markup { + \center-column { Violone, \line { e Cembalo. } } + } + } + + { + \time 4/4 + \clef bass + \partial 8 r16 d16 | + d4 bes,4 a,4 f4 | + g8 f16 g16 a8 a,8 d4 d'4 ~ | + d'8 c'8 b4 c'8 c'16 bes16 a4 | + bes8 bes16 a16 g4 a8 a,4 a16 g16 | + fis8 d8 e8 fis8 g8 g,4 g16 f16 | + e8 c8 d8 e8 f8 f,4 a,8 | + b,4 cis4 d4 r8 d'8 | + + } + + \new FiguredBass \figuremode { + \set figuredBassAlterationDirection = #RIGHT + \set figuredBassPlusDirection = #RIGHT + \override BassFigureAlignment.stacking-dir = #DOWN + s8 | + s4 <6>4 <_+>4 <6>4 | + <6 4\+ 2>8 <6>8 <_+> s8 s2 | + <5>8 <6 4>8 <6 5>4 s4 <5>8 <6>8 | + s4 <6 5 _-> <_+>2 | + <6>8 <_+>8 <6>8 <6 5>8 <5 4>8 \extendOn <5 _!>8 \extendOff s4 | + <6>4 <6->8 <6 5->8 <5 4->8 \extendOn <5 3>4 \extendOff <5 _+>8 | + <7>8 <6>8 <5>4 <9 4>8 <8 3>8 s4 | + } + >> + + \layout { + \context { + \Score + \override RehearsalMark.break-align-symbols = #'(time-signature) + \override RehearsalMark.self-alignment-X = #LEFT + \override TimeSignature.break-align-anchor-alignment = #LEFT + } + } +} diff --git a/Documentation/snippets/new/heavily-customized-polymetric-time-signatures.ly b/Documentation/snippets/new/heavily-customized-polymetric-time-signatures.ly new file mode 100644 index 0000000000..ad57ab2561 --- /dev/null +++ b/Documentation/snippets/new/heavily-customized-polymetric-time-signatures.ly @@ -0,0 +1,38 @@ +\version "2.19.56" + +\header { + lsrtags = "contemporary-notation, percussion, real-music, rhythms" + + texidoc = " +Though the polymetric time signature shown was not the most essential +item here, it has been included to show the beat of this piece (which +is the template of a real Balkan song!). + +" + doctitle = "Heavily customized polymetric time signatures" +} % begin verbatim + +melody = \relative c'' { + \key g \major + \compoundMeter #'((3 8) (2 8) (2 8) (3 8) (2 8) (2 8) + (2 8) (2 8) (3 8) (2 8) (2 8)) + c8 c c d4 c8 c b c b a4 g fis8 e d c b' c d e4-^ fis8 g \break + c,4. d4 c4 d4. c4 d c2 d4. e4-^ d4 + c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 \break + c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 + c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 \break +} + +drum = \new DrumStaff \drummode { + \bar ".|:" bd4.^\markup { Drums } sn4 bd \bar ";" sn4. + bd4 sn \bar ";" bd sn bd4. sn4 bd \bar ":|." +} + + \new Staff \with { + instrumentName = \markup { \concat { "B" \flat " Sop." } } + } + +{ + \melody + \drum +} diff --git a/Documentation/snippets/new/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly b/Documentation/snippets/new/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly new file mode 100644 index 0000000000..912cad8ad7 --- /dev/null +++ b/Documentation/snippets/new/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly @@ -0,0 +1,187 @@ +\version "2.19.56" + +\header { + lsrtags = "expressive-marks, tweaks-and-overrides, version-specific" + + texidoc = " +Some dynamic expressions involve additional text, like @qq{sempre pp}. +Since dynamics are usually centered under the note, the \\pp would be +displayed way after the note it applies to. + +To correctly align the @qq{sempre pp} horizontally, so that it is +aligned as if it were only the \\pp, there are several approaches: + +* Simply use @code{\\once\\override DynamicText.X-offset = #-9.2} +before the note with the dynamics to manually shift it to the correct +position. Drawback: This has to be done manually each time you use that +dynamic markup... + +* Add some padding (@code{#:hspace 7.1}) into the definition of your +custom dynamic mark, so that after lilypond center-aligns it, it is +already correctly aligned. Drawback: The padding really takes up that +space and does not allow any other markup or dynamics to be shown in +that position. + +* Shift the dynamic script @code{\\once\\override ... .X-offset = ..}. +Drawback: @code{\\once\\override} is needed for every invocation! + +* Set the dimensions of the additional text to 0 (using +@code{#:with-dimensions '(0 . 0) '(0 . 0)}). Drawback: To LilyPond +@qq{sempre} has no extent, so it might put other stuff there and create +collisions (which are not detected by the collision detection!). Also, +there seems to be some spacing, so it's not exactly the same alignment +as without the additional text + +* Add an explicit shifting directly inside the scheme function for the +dynamic-script. + +* Set an explicit alignment inside the dynamic-script. By default, this +won't have any effect, only if one sets X-offset! Drawback: One needs +to set @code{DynamicText.X-offset}, which will apply to all dynamic +texts! Also, it is aligned at the right edge of the additional text, +not at the center of pp. + + + + +" + doctitle = "Horizontally aligning custom dynamics (e.g. \"sempre pp\" \"piu f\" \"subito p\")" +} % begin verbatim + +\paper { + ragged-right = ##f + indent = 2.5\cm +} + +% Solution 1: Using a simple markup with a particular halign value +% Drawback: It's a markup, not a dynamic command, so \dynamicDown +% etc. will have no effect +semppMarkup = \markup { \halign #1.4 \italic "sempre" \dynamic "pp" } + +% Solution 2: Using a dynamic script & shifting with +% \once \override ...X-offset = .. +% Drawback: \once \override needed for every invocation +semppK = +#(make-dynamic-script + (markup #:line + (#:normal-text + #:italic "sempre" + #:dynamic "pp"))) + +% Solution 3: Padding the dynamic script so the center-alignment +% puts it at the correct position +% Drawback: the padding really reserves the space, nothing else can be there +semppT = +#(make-dynamic-script + (markup #:line + (#:normal-text + #:italic "sempre" + #:dynamic "pp" + #:hspace 7.1))) + +% Solution 4: Dynamic, setting the dimensions of the additional text to 0 +% Drawback: To lilypond "sempre" has no extent, so it might put +% other stuff there => collisions +% Drawback: Also, there seems to be some spacing, so it's not exactly the +% same alignment as without the additional text +semppM = +#(make-dynamic-script + (markup #:line + (#:with-dimensions '(0 . 0) '(0 . 0) + #:right-align + #:normal-text + #:italic "sempre" + #:dynamic "pp"))) + +% Solution 5: Dynamic with explicit shifting inside the scheme function +semppG = +#(make-dynamic-script + (markup #:hspace 0 + #:translate '(-18.85 . 0) + #:line (#:normal-text + #:italic "sempre" + #:dynamic "pp"))) + +% Solution 6: Dynamic with explicit alignment. This has only effect +% if one sets X-offset! +% Drawback: One needs to set DynamicText.X-offset! +% Drawback: Aligned at the right edge of the additional text, +% not at the center of pp +semppMII = +#(make-dynamic-script + (markup #:line (#:right-align + #:normal-text + #:italic "sempre" + #:dynamic "pp"))) + +\new StaffGroup << + \new Staff = "s" \with { instrumentName = \markup \column { Normal } } + << + \relative c'' { + \key es \major + c4\pp c\p c c | c\ff c c\pp c + } + >> + \new Staff = "sMarkup" \with { + instrumentName = \markup \column { Normal markup } + } + << + \relative c'' { + \key es \major + c4-\semppMarkup c\p c c | c\ff c c-\semppMarkup c + } + >> + \new Staff = "sK" \with { + instrumentName = \markup \column { Explicit shifting } + } + << + \relative c'' { + \key es \major + \once \override DynamicText.X-offset = #-9.2 + c4\semppK c\p c c + c4\ff c + \once \override DynamicText.X-offset = #-9.2 + c4\semppK c + } + >> + \new Staff = "sT" \with { + instrumentName = \markup \column { Right padding } + } + << + \relative c'' { + \key es \major + c4\semppT c\p c c | c\ff c c\semppT c + } + >> + \new Staff = "sM" \with { + instrumentName = \markup \column { Set dimension "to zero" } + } + << + \relative c'' { + \key es \major + c4\semppM c\p c c | c\ff c c\semppM c + } + >> + \new Staff = "sG" \with { + instrumentName = \markup \column { Shift inside dynamics} + } + << + \relative c'' { + \key es \major + c4\semppG c\p c c | c\ff c c\semppG c + } + >> + \new Staff = "sMII" \with { + instrumentName = \markup \column { Alignment inside dynamics } + } + << + \relative c'' { + \key es \major + % Setting to ##f (false) gives the same result + \override DynamicText.X-offset = #0 + c4\semppMII c\p c c | c\ff c c\semppMII c + } + >> +>> + +\layout { \override Staff.InstrumentName.self-alignment-X = #LEFT } diff --git a/Documentation/snippets/new/jazz-combo-template.ly b/Documentation/snippets/new/jazz-combo-template.ly new file mode 100644 index 0000000000..c1543ca923 --- /dev/null +++ b/Documentation/snippets/new/jazz-combo-template.ly @@ -0,0 +1,276 @@ +\version "2.19.56" + +\header { + lsrtags = "fretted-strings, keyboards, percussion, real-music, template" + + texidoc = " +This is quite an advanced template, for a jazz ensemble. Note that all +instruments are notated in @code{\\key c \\major}. This refers to the +key in concert pitch; the key will be automatically transposed if the +music is within a @code{\\transpose} section. + +" + doctitle = "Jazz combo template" +} % begin verbatim + +\header { + title = "Song" + subtitle = "(tune)" + composer = "Me" + meter = "moderato" + piece = "Swing" + tagline = \markup { + \column { + "LilyPond example file by Amelie Zapf," + "Berlin 07/07/2003" + } + } +} +% To make the example display in the documentation +\paper { + paper-width = 130 +} +%#(set-global-staff-size 16) +\include "english.ly" + +%%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%% + +sl = { + \override NoteHead.style = #'slash + \hide Stem +} +nsl = { + \revert NoteHead.style + \undo \hide Stem +} +crOn = \override NoteHead.style = #'cross +crOff = \revert NoteHead.style + +%% insert chord name style stuff here. + +jazzChords = { } + +%%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%% + +global = { \time 4/4 } + +Key = { \key c \major } + +% ############ Horns ############ + +% ------ Trumpet ------ +trpt = \transpose c d \relative c'' { + \Key + c1 | c | c | +} +trpHarmony = \transpose c' d { + \jazzChords +} +trumpet = { + \global + \clef treble + << + \trpt + >> +} + +% ------ Alto Saxophone ------ +alto = \transpose c a \relative c' { + \Key + c1 | c | c | +} +altoHarmony = \transpose c' a { + \jazzChords +} +altoSax = { + \global + \clef treble + << + \alto + >> +} + +% ------ Baritone Saxophone ------ +bari = \transpose c a' \relative c { + \Key + c1 + c1 + \sl + d4^"Solo" d d d + \nsl +} +bariHarmony = \transpose c' a \chordmode { + \jazzChords s1 s d2:maj e:m7 +} +bariSax = { + \global + \clef treble + << + \bari + >> +} + +% ------ Trombone ------ +tbone = \relative c { + \Key + c1 | c | c +} +tboneHarmony = \chordmode { + \jazzChords +} +trombone = { + \global + \clef bass + << + \tbone + >> +} + +% ############ Rhythm Section ############# + +% ------ Guitar ------ +gtr = \relative c'' { + \Key + c1 + \sl + b4 b b b + \nsl + c1 +} +gtrHarmony = \chordmode { + \jazzChords + s1 c2:min7+ d2:maj9 +} +guitar = { + \global + \clef treble + << + \gtr + >> +} + +%% ------ Piano ------ +rhUpper = \relative c'' { + \voiceOne + \Key + c1 | c | c +} +rhLower = \relative c' { + \voiceTwo + \Key + e1 | e | e +} + +lhUpper = \relative c' { + \voiceOne + \Key + g1 | g | g +} +lhLower = \relative c { + \voiceTwo + \Key + c1 | c | c +} + +PianoRH = { + \clef treble + \global + << + \new Voice = "one" \rhUpper + \new Voice = "two" \rhLower + >> +} +PianoLH = { + \clef bass + \global + << + \new Voice = "one" \lhUpper + \new Voice = "two" \lhLower + >> +} + +piano = { + << + \new Staff = "upper" \PianoRH + \new Staff = "lower" \PianoLH + >> +} + +% ------ Bass Guitar ------ +Bass = \relative c { + \Key + c1 | c | c +} +bass = { + \global + \clef bass + << + \Bass + >> +} + +% ------ Drums ------ +up = \drummode { + \voiceOne + hh4 hh + hh4 hh + hh4 hh +} +down = \drummode { + \voiceTwo + bd4 s bd s + bd4 s bd s + bd4 s bd s +} + +drumContents = { + \global + << + \new DrumVoice \up + \new DrumVoice \down + >> +} + +%%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%% + +\score { + << + \new StaffGroup = "horns" << + \new Staff = "trumpet" \with { instrumentName = #"Trumpet" } + \trumpet + \new Staff = "altosax" \with { instrumentName = #"Alto Sax" } + \altoSax + \new ChordNames = "barichords" \with { instrumentName = #"Trumpet" } + \bariHarmony + \new Staff = "barisax" \with { instrumentName = #"Bari Sax" } + \bariSax + \new Staff = "trombone" \with { instrumentName = #"Trombone" } + \trombone + >> + + \new StaffGroup = "rhythm" << + \new ChordNames = "chords" \gtrHarmony + \new Staff = "guitar" \with { instrumentName = #"Guitar" } + \guitar + \new PianoStaff = "piano" \with { + instrumentName = #"Piano" + midiInstrument = #"acoustic grand" + } + \piano + \new Staff = "bass" \with { instrumentName = #"Bass" } + \bass + \new DrumStaff \with { instrumentName = #"Drums" } + \drumContents + >> + >> + \layout { + \context { \Staff \RemoveEmptyStaves } + \context { + \Score + \override BarNumber.padding = #3 + \override RehearsalMark.padding = #2 + skipBars = ##t + } + } + \midi { } +} diff --git a/Documentation/snippets/new/orchestra,-choir-and-piano-template.ly b/Documentation/snippets/new/orchestra,-choir-and-piano-template.ly new file mode 100644 index 0000000000..6e784d4264 --- /dev/null +++ b/Documentation/snippets/new/orchestra,-choir-and-piano-template.ly @@ -0,0 +1,153 @@ +\version "2.19.56" + +\header { + lsrtags = "pitches, staff-notation, template, vocal-music" + + texidoc = " +This template demonstrates the use of nested @code{StaffGroup} and +@code{GrandStaff} contexts to sub-group instruments of the same type +together, and a way to use @code{\\transpose} so that variables hold +music for transposing instruments at concert pitch. + +" + doctitle = "Orchestra choir and piano template" +} % begin verbatim + +#(set-global-staff-size 17) +\paper { + indent = 3.0\cm % add space for instrumentName + short-indent = 1.5\cm % add less space for shortInstrumentName +} + +fluteMusic = \relative c' { \key g \major g'1 b } + +% Pitches as written on a manuscript for Clarinet in A +% are transposed to concert pitch. + +clarinetMusic = \transpose c' a + \relative c'' { \key bes \major bes1 d } + +trumpetMusic = \relative c { \key g \major g''1 b } + +% Key signature is often omitted for horns + +hornMusic = \transpose c' f + \relative c { d'1 fis } + +percussionMusic = \relative c { \key g \major g1 b } + +sopranoMusic = \relative c'' { \key g \major g'1 b } + +sopranoLyrics = \lyricmode { Lyr -- ics } + +altoIMusic = \relative c' { \key g \major g'1 b } + +altoIIMusic = \relative c' { \key g \major g'1 b } + +altoILyrics = \sopranoLyrics + +altoIILyrics = \lyricmode { Ah -- ah } + +tenorMusic = \relative c' { \clef "treble_8" \key g \major g1 b } + +tenorLyrics = \sopranoLyrics + +pianoRHMusic = \relative c { \key g \major g''1 b } + +pianoLHMusic = \relative c { \clef bass \key g \major g1 b } + +violinIMusic = \relative c' { \key g \major g'1 b } + +violinIIMusic = \relative c' { \key g \major g'1 b } + +violaMusic = \relative c { \clef alto \key g \major g'1 b } + +celloMusic = \relative c { \clef bass \key g \major g1 b } + +bassMusic = \relative c { \clef "bass_8" \key g \major g,1 b } + +\score { + << + \new StaffGroup = "StaffGroup_woodwinds" << + \new Staff = "Staff_flute" \with { instrumentName = #"Flute" } + \fluteMusic + + \new Staff = "Staff_clarinet" \with { + instrumentName = \markup { \concat { "Clarinet in B" \flat } } + } + + % Declare that written Middle C in the music + % to follow sounds a concert B flat, for + % output using sounded pitches such as MIDI. + %\transposition bes + + % Print music for a B-flat clarinet + \transpose bes c' \clarinetMusic + >> + + \new StaffGroup = "StaffGroup_brass" << + \new Staff = "Staff_hornI" \with { instrumentName = #"Horn in F" } + % \transposition f + \transpose f c' \hornMusic + + \new Staff = "Staff_trumpet" \with { instrumentName = #"Trumpet in C" } + \trumpetMusic + + >> + \new RhythmicStaff = "RhythmicStaff_percussion" + \with { instrumentName = #"Percussion" } + << + \percussionMusic + >> + \new PianoStaff \with { instrumentName = #"Piano" } + << + \new Staff { \pianoRHMusic } + \new Staff { \pianoLHMusic } + >> + \new ChoirStaff = "ChoirStaff_choir" << + \new Staff = "Staff_soprano" \with { instrumentName = #"Soprano" } + \new Voice = "soprano" + \sopranoMusic + + \new Lyrics \lyricsto "soprano" { \sopranoLyrics } + \new GrandStaff = "GrandStaff_altos" + \with { \accepts Lyrics } << + \new Staff = "Staff_altoI" \with { instrumentName = #"Alto I" } + \new Voice = "altoI" + \altoIMusic + + \new Lyrics \lyricsto "altoI" { \altoILyrics } + \new Staff = "Staff_altoII" \with { instrumentName = #"Alto II" } + \new Voice = "altoII" + \altoIIMusic + + \new Lyrics \lyricsto "altoII" { \altoIILyrics } + >> + + \new Staff = "Staff_tenor" \with { instrumentName = #"Tenor" } + \new Voice = "tenor" + \tenorMusic + + \new Lyrics \lyricsto "tenor" { \tenorLyrics } + >> + \new StaffGroup = "StaffGroup_strings" << + \new GrandStaff = "GrandStaff_violins" << + \new Staff = "Staff_violinI" \with { instrumentName = #"Violin I" } + \violinIMusic + + \new Staff = "Staff_violinII" \with { instrumentName = #"Violin II" } + \violinIIMusic + >> + + \new Staff = "Staff_viola" \with { instrumentName = #"Viola" } + \violaMusic + + \new Staff = "Staff_cello" \with { instrumentName = #"Cello" } + \celloMusic + + \new Staff = "Staff_bass" \with { instrumentName = #"Double Bass" } + \bassMusic + >> + >> + \layout { } +} diff --git a/Documentation/snippets/new/piano-template-simple.ly b/Documentation/snippets/new/piano-template-simple.ly new file mode 100644 index 0000000000..33df86c58e --- /dev/null +++ b/Documentation/snippets/new/piano-template-simple.ly @@ -0,0 +1,37 @@ +\version "2.19.56" + +\header { + lsrtags = "keyboards, really-simple, template" + + texidoc = " +Here is a simple piano staff with some notes. + +" + doctitle = "Piano template (simple)" +} % begin verbatim + +upper = \relative c'' { + \clef treble + \key c \major + \time 4/4 + + a4 b c d +} + +lower = \relative c { + \clef bass + \key c \major + \time 4/4 + + a2 c +} + +\score { + \new PianoStaff \with { instrumentName = #"Piano" } + << + \new Staff = "upper" \upper + \new Staff = "lower" \lower + >> + \layout { } + \midi { } +} diff --git a/Documentation/snippets/new/quoting-another-voice-with-transposition.ly b/Documentation/snippets/new/quoting-another-voice-with-transposition.ly new file mode 100644 index 0000000000..5687876784 --- /dev/null +++ b/Documentation/snippets/new/quoting-another-voice-with-transposition.ly @@ -0,0 +1,42 @@ +\version "2.19.56" + +\header { + lsrtags = "pitches, staff-notation" + + texidoc = " +Quotations take into account the transposition of both source and +target. In this example, all instruments play sounding middle C; the +target is an instrument in F. The target part may be transposed using +@code{\\transpose}. In this case, all the pitches (including the +quoted ones) are transposed. + +" + doctitle = "Quoting another voice with transposition" +} % begin verbatim + +\addQuote clarinet { + \transposition bes + \repeat unfold 8 { d'16 d' d'8 } +} + +\addQuote sax { + \transposition es' + \repeat unfold 16 { a8 } +} + +quoteTest = { + % french horn + \transposition f + g'4 + << \quoteDuring #"clarinet" { \skip 4 } s4^"clar." >> + << \quoteDuring #"sax" { \skip 4 } s4^"sax." >> + g'4 +} + +{ + \new Staff \with { + instrumentName = \markup { \column { Horn "in F" } } + } + \quoteTest + \transpose c' d' << \quoteTest s4_"up a tone" >> +} diff --git a/Documentation/snippets/new/quoting-another-voice.ly b/Documentation/snippets/new/quoting-another-voice.ly new file mode 100644 index 0000000000..1eece949c8 --- /dev/null +++ b/Documentation/snippets/new/quoting-another-voice.ly @@ -0,0 +1,54 @@ +\version "2.19.56" + +\header { + lsrtags = "staff-notation" + + texidoc = " +The @code{quotedEventTypes} property determines the music event types +which should be quoted. The default value is @code{(note-event +rest-event tie-event beam-event tuplet-span-event)}, which means that +only the notes, rests, ties, beams and tuplets of the quoted voice will +appear in the @code{\\quoteDuring} expression. In the following +example, a 16th rest is not quoted since @code{rest-event} is not in +@code{quotedEventTypes}. + +For a list of event types, consult the @qq{Music classes} section of +the Internals Reference. + +" + doctitle = "Quoting another voice" +} % begin verbatim + +quoteMe = \relative c' { + fis4 r16 a8.-> b4\ff c +} +\addQuote quoteMe \quoteMe + +original = \relative c'' { + c8 d s2 + \once \override NoteColumn.ignore-collision = ##t + es8 gis8 +} + +<< + \new Staff \with { instrumentName = "quoteMe" } + \quoteMe + + \new Staff \with { instrumentName = "orig" } + \original + + \new Staff \with { + instrumentName = "orig+quote" + quotedEventTypes = #'(note-event articulation-event) + } + \relative c'' + << + \original + \new Voice { + s4 + \set fontSize = #-4 + \override Stem.length-fraction = #(magstep -4) + \quoteDuring #"quoteMe" { \skip 2. } + } + >> +>> diff --git a/Documentation/snippets/new/staff-headword.ly b/Documentation/snippets/new/staff-headword.ly index 4c7aff1f02..ce794e9f14 100644 --- a/Documentation/snippets/new/staff-headword.ly +++ b/Documentation/snippets/new/staff-headword.ly @@ -1,4 +1,4 @@ -\version "2.19.0" +\version "2.19.55" \include "catalan.ly" \header { @@ -69,38 +69,39 @@ lower = \relative do { \score { << - \context Staff = "trumpet" << - \set Staff.instrumentName = \markup { "Trumpet" \concat{ B \teeny \raise #0.4 \flat } } + \context Staff = "trumpet" + \with { instrumentName = \markup { "Trumpet" \concat{ B \teeny \raise #0.4 \flat } } } + << \transpose sib do' \trompette >> - \context RhythmicStaff = "tambourin" << - \set Staff.instrumentName = "Tambourine" + \context RhythmicStaff = "tambourin" + \with { instrumentName = "Tambourine" } + << \tambourin >> - \context PianoStaff = "prima" << - \set PianoStaff.instrumentName = "Piano " + \context PianoStaff = "prima" + \with { instrumentName = "Piano" } + << \context Staff = "uppera" \upper \context Staff = "lowera" \lower >> >> \layout { } } + \score { << - \context Staff = "trumpet" { - \set Staff.midiInstrument = "trumpet" - \trompette - } + \context Staff = "trumpet" \with { midiInstrument = "trumpet" } + \trompette \context DrumStaff = "tambourin" { \tambourin } - \context Staff = "piano" << + \context Staff = "piano" + << \upper \lower >> >> - \midi { - \tempo 4 = 72 - } + \midi { \tempo 4 = 72 } } diff --git a/Documentation/snippets/new/string-quartet-template-simple.ly b/Documentation/snippets/new/string-quartet-template-simple.ly new file mode 100644 index 0000000000..71530cab99 --- /dev/null +++ b/Documentation/snippets/new/string-quartet-template-simple.ly @@ -0,0 +1,58 @@ +\version "2.19.56" + +\header { + lsrtags = "really-simple, template, unfretted-strings" + + texidoc = " +This template demonstrates a simple string quartet. It also uses a +@code{\\global} section for time and key signatures + +" + doctitle = "String quartet template (simple)" +} % begin verbatim + +global= { + \time 4/4 + \key c \major +} + +violinOne = \new Voice \relative c'' { + c2 d + e1 + \bar "|." +} + +violinTwo = \new Voice \relative c'' { + g2 f + e1 + \bar "|." +} + +viola = \new Voice \relative c' { + \clef alto + e2 d + c1 + \bar "|." +} + +cello = \new Voice \relative c' { + \clef bass + c2 b + a1 + \bar "|." +} + +\score { + \new StaffGroup << + \new Staff \with { instrumentName = "Violin 1" } + << \global \violinOne >> + \new Staff \with { instrumentName = "Violin 2" } + << \global \violinTwo >> + \new Staff \with { instrumentName = "Viola" } + << \global \viola >> + \new Staff \with { instrumentName = "Cello" } + << \global \cello >> + >> + \layout { } + \midi { } +} diff --git a/Documentation/snippets/new/string-quartet-template-with-separate-parts.ly b/Documentation/snippets/new/string-quartet-template-with-separate-parts.ly new file mode 100644 index 0000000000..092336c09c --- /dev/null +++ b/Documentation/snippets/new/string-quartet-template-with-separate-parts.ly @@ -0,0 +1,146 @@ +\version "2.19.56" + +\header { + lsrtags = "preparing-parts, template, unfretted-strings" + + texidoc = " +The @qq{String quartet template} snippet produces a nice string +quartet, but what if you needed to print parts? This new template +demonstrates how to use the @code{\\tag} feature to easily split a +piece into individual parts. + +You need to split this template into separate files; the filenames are +contained in comments at the beginning of each file. @code{piece.ly} +contains all the music definitions. The other files – @code{score.ly}, +@code{vn1.ly}, @code{vn2.ly}, @code{vla.ly}, and @code{vlc.ly} – +produce the appropriate part. + + +Do not forget to remove specified comments when using separate files! + +" + doctitle = "String quartet template with separate parts" +} % begin verbatim + +%%%%% piece.ly +%%%%% (This is the global definitions file) + +global= { + \time 4/4 + \key c \major +} + + +Violinone = \new Voice { + \relative c'' { + c2 d e1 + \bar "|." + } +} + + +Violintwo = \new Voice { + \relative c'' { + g2 f e1 + \bar "|." + } +} + + +Viola = \new Voice { + \relative c' { + \clef alto + e2 d c1 + \bar "|." + } +} + + +Cello = \new Voice { + \relative c' { + \clef bass + c2 b a1 + \bar "|." + } +} + + +music = { + << + \tag #'score \tag #'vn1 + \new Staff \with { instrumentName = "Violin 1" } + << \global \Violinone >> + + \tag #'score \tag #'vn2 + \new Staff \with { instrumentName = "Violin 2" } + << \global \Violintwo>> + + \tag #'score \tag #'vla + \new Staff \with { instrumentName = "Viola" } + << \global \Viola>> + + \tag #'score \tag #'vlc + \new Staff \with { instrumentName = "Cello" } + << \global \Cello >> + >> +} + +% These are the other files you need to save on your computer + +% score.ly +% (This is the main file) + +% uncomment the line below when using a separate file +%\include "piece.ly" + +#(set-global-staff-size 14) + +\score { + \new StaffGroup \keepWithTag #'score \music + \layout { } + \midi { } +} + + +%{ Uncomment this block when using separate files + +% vn1.ly +% (This is the Violin 1 part file) + +\include "piece.ly" +\score { + \keepWithTag #'vn1 \music + \layout { } +} + + +% vn2.ly +% (This is the Violin 2 part file) + +\include "piece.ly" +\score { + \keepWithTag #'vn2 \music + \layout { } +} + + +% vla.ly +% (This is the Viola part file) + +\include "piece.ly" +\score { + \keepWithTag #'vla \music + \layout { } +} + + +% vlc.ly +% (This is the Cello part file) + +\include "piece.ly" +\score { + \keepWithTag #'vlc \music + \layout { } +} + +%} diff --git a/Documentation/snippets/new/wind-headword.ly b/Documentation/snippets/new/wind-headword.ly index eae9e1df18..b76e171ffb 100644 --- a/Documentation/snippets/new/wind-headword.ly +++ b/Documentation/snippets/new/wind-headword.ly @@ -1,5 +1,5 @@ -\version "2.19.20" +\version "2.19.56" \header { lsrtags = "headword" @@ -19,8 +19,8 @@ Wind headword % Nutcracker Suite, VII Dance of the Merlitons \score { \new StaffGroup << - \new Staff \relative c'' { - \set Staff.instrumentName = "Flauto I,II" + \new Staff \with { instrumentName = "Flauto I,II" } + \relative c'' { \once \override Score.RehearsalMark.self-alignment-X = #-1 \once \override Score.RehearsalMark.break-align-symbols = #'(time-signature) \once \override Score.TimeSignature.break-align-anchor-alignment = #LEFT @@ -32,11 +32,11 @@ Wind headword 16-.\p -. -. -. 8-. -. -.\< 32( 4--)\mf 16-. -. -. -. - (\> ) -. -.\! + (\> ) -. -.\! 4--\sf \acciaccatura {8} 4--\mf } - \new Staff \relative c' { - \set Staff.instrumentName = "Flauto III" + \new Staff \with { instrumentName = "Flauto III" } + \relative c' { \key d \major \time 2/4 \compressMMRests R2*2_\markup{Gr.Fl.} diff --git a/Documentation/snippets/orchestra,-choir-and-piano-template.ly b/Documentation/snippets/orchestra,-choir-and-piano-template.ly index e3b6eff963..0aa89b54b5 100644 --- a/Documentation/snippets/orchestra,-choir-and-piano-template.ly +++ b/Documentation/snippets/orchestra,-choir-and-piano-template.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.56 +\version "2.19.56" \header { lsrtags = "pitches, staff-notation, template, vocal-music" @@ -21,129 +22,139 @@ music for transposing instruments at concert pitch. #(set-global-staff-size 17) \paper { - paper-height = 10\cm - indent = 3.0\cm % space for instrumentName - short-indent = 1.5\cm % space for shortInstrumentName -} + indent = 3.0\cm % add space for instrumentName + short-indent = 1.5\cm % add less space for shortInstrumentName +} % begin verbatim + fluteMusic = \relative c' { \key g \major g'1 b } + % Pitches as written on a manuscript for Clarinet in A % are transposed to concert pitch. + clarinetMusic = \transpose c' a \relative c'' { \key bes \major bes1 d } + trumpetMusic = \relative c { \key g \major g''1 b } + % Key signature is often omitted for horns + hornMusic = \transpose c' f \relative c { d'1 fis } + percussionMusic = \relative c { \key g \major g1 b } + sopranoMusic = \relative c'' { \key g \major g'1 b } + sopranoLyrics = \lyricmode { Lyr -- ics } + altoIMusic = \relative c' { \key g \major g'1 b } + altoIIMusic = \relative c' { \key g \major g'1 b } + altoILyrics = \sopranoLyrics + altoIILyrics = \lyricmode { Ah -- ah } + tenorMusic = \relative c' { \clef "treble_8" \key g \major g1 b } + tenorLyrics = \sopranoLyrics + pianoRHMusic = \relative c { \key g \major g''1 b } + pianoLHMusic = \relative c { \clef bass \key g \major g1 b } + violinIMusic = \relative c' { \key g \major g'1 b } + violinIIMusic = \relative c' { \key g \major g'1 b } + violaMusic = \relative c { \clef alto \key g \major g'1 b } + celloMusic = \relative c { \clef bass \key g \major g1 b } + bassMusic = \relative c { \clef "bass_8" \key g \major g,1 b } \score { << \new StaffGroup = "StaffGroup_woodwinds" << - \new Staff = "Staff_flute" { - \set Staff.instrumentName = #"Flute" - % shortInstrumentName, midiInstrument, etc. - % may be set here as well - \fluteMusic - } - \new Staff = "Staff_clarinet" { - \set Staff.instrumentName = - \markup { \concat { "Clarinet in B" \flat } } - % Declare that written Middle C in the music - % to follow sounds a concert B flat, for - % output using sounded pitches such as MIDI. - \transposition bes - % Print music for a B-flat clarinet - \transpose bes c' \clarinetMusic + \new Staff = "Staff_flute" \with { instrumentName = #"Flute" } + \fluteMusic + + \new Staff = "Staff_clarinet" \with { + instrumentName = \markup { \concat { "Clarinet in B" \flat } } } + + % Declare that written Middle C in the music + % to follow sounds a concert B flat, for + % output using sounded pitches such as MIDI. + %\transposition bes + + % Print music for a B-flat clarinet + \transpose bes c' \clarinetMusic >> + \new StaffGroup = "StaffGroup_brass" << - \new Staff = "Staff_hornI" { - \set Staff.instrumentName = #"Horn in F" - \transposition f + \new Staff = "Staff_hornI" \with { instrumentName = #"Horn in F" } + % \transposition f \transpose f c' \hornMusic - } - \new Staff = "Staff_trumpet" { - \set Staff.instrumentName = #"Trumpet in C" - \trumpetMusic - } + + \new Staff = "Staff_trumpet" \with { instrumentName = #"Trumpet in C" } + \trumpetMusic + >> - \new RhythmicStaff = "RhythmicStaff_percussion" << - \set RhythmicStaff.instrumentName = #"Percussion" + \new RhythmicStaff = "RhythmicStaff_percussion" + \with { instrumentName = #"Percussion" } + << \percussionMusic >> - \new PianoStaff << - \set PianoStaff.instrumentName = #"Piano" + \new PianoStaff \with { instrumentName = #"Piano" } + << \new Staff { \pianoRHMusic } \new Staff { \pianoLHMusic } >> \new ChoirStaff = "ChoirStaff_choir" << - \new Staff = "Staff_soprano" { - \set Staff.instrumentName = #"Soprano" - \new Voice = "soprano" - \sopranoMusic - } + \new Staff = "Staff_soprano" \with { instrumentName = #"Soprano" } + \new Voice = "soprano" + \sopranoMusic + \new Lyrics \lyricsto "soprano" { \sopranoLyrics } \new GrandStaff = "GrandStaff_altos" \with { \accepts Lyrics } << - \new Staff = "Staff_altoI" { - \set Staff.instrumentName = #"Alto I" - \new Voice = "altoI" - \altoIMusic - } + \new Staff = "Staff_altoI" \with { instrumentName = #"Alto I" } + \new Voice = "altoI" + \altoIMusic + \new Lyrics \lyricsto "altoI" { \altoILyrics } - \new Staff = "Staff_altoII" { - \set Staff.instrumentName = #"Alto II" - \new Voice = "altoII" - \altoIIMusic - } + \new Staff = "Staff_altoII" \with { instrumentName = #"Alto II" } + \new Voice = "altoII" + \altoIIMusic + \new Lyrics \lyricsto "altoII" { \altoIILyrics } >> - \new Staff = "Staff_tenor" { - \set Staff.instrumentName = #"Tenor" + + \new Staff = "Staff_tenor" \with { instrumentName = #"Tenor" } \new Voice = "tenor" \tenorMusic - } + \new Lyrics \lyricsto "tenor" { \tenorLyrics } >> \new StaffGroup = "StaffGroup_strings" << \new GrandStaff = "GrandStaff_violins" << - \new Staff = "Staff_violinI" { - \set Staff.instrumentName = #"Violin I" - \violinIMusic - } - \new Staff = "Staff_violinII" { - \set Staff.instrumentName = #"Violin II" - \violinIIMusic - } + \new Staff = "Staff_violinI" \with { instrumentName = #"Violin I" } + \violinIMusic + + \new Staff = "Staff_violinII" \with { instrumentName = #"Violin II" } + \violinIIMusic >> - \new Staff = "Staff_viola" { - \set Staff.instrumentName = #"Viola" - \violaMusic - } - \new Staff = "Staff_cello" { - \set Staff.instrumentName = #"Cello" - \celloMusic - } - \new Staff = "Staff_bass" { - \set Staff.instrumentName = #"Double Bass" - \bassMusic - } + + \new Staff = "Staff_viola" \with { instrumentName = #"Viola" } + \violaMusic + + \new Staff = "Staff_cello" \with { instrumentName = #"Cello" } + \celloMusic + + \new Staff = "Staff_bass" \with { instrumentName = #"Double Bass" } + \bassMusic >> >> \layout { } diff --git a/Documentation/snippets/piano-template-simple.ly b/Documentation/snippets/piano-template-simple.ly index b2728932e4..8a921fcc97 100644 --- a/Documentation/snippets/piano-template-simple.ly +++ b/Documentation/snippets/piano-template-simple.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.56 +\version "2.19.56" \header { lsrtags = "keyboards, really-simple, template" @@ -22,7 +23,8 @@ upper = \relative c'' { \time 4/4 a4 b c d -} +} % begin verbatim + lower = \relative c { \clef bass @@ -33,8 +35,8 @@ lower = \relative c { } \score { - \new PianoStaff << - \set PianoStaff.instrumentName = #"Piano " + \new PianoStaff \with { instrumentName = #"Piano" } + << \new Staff = "upper" \upper \new Staff = "lower" \lower >> diff --git a/Documentation/snippets/quoting-another-voice-with-transposition.ly b/Documentation/snippets/quoting-another-voice-with-transposition.ly index 82f02f0f0d..8a5eec2583 100644 --- a/Documentation/snippets/quoting-another-voice-with-transposition.ly +++ b/Documentation/snippets/quoting-another-voice-with-transposition.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.56 +\version "2.19.56" \header { lsrtags = "pitches, staff-notation" @@ -22,7 +23,8 @@ quoted ones) are transposed. \addQuote clarinet { \transposition bes - \repeat unfold 8 { d'16 d' d'8 } + \repeat unfold 8 { d'16 d' d'8 } % begin verbatim + } \addQuote sax { @@ -40,10 +42,9 @@ quoteTest = { } { - \set Staff.instrumentName = - \markup { - \center-column { Horn \line { in F } } - } + \new Staff \with { + instrumentName = \markup { \column { Horn "in F" } } + } \quoteTest \transpose c' d' << \quoteTest s4_"up a tone" >> } diff --git a/Documentation/snippets/quoting-another-voice.ly b/Documentation/snippets/quoting-another-voice.ly index cbc1ce7534..40963ab6a9 100644 --- a/Documentation/snippets/quoting-another-voice.ly +++ b/Documentation/snippets/quoting-another-voice.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.56 +\version "2.19.56" \header { lsrtags = "staff-notation" @@ -27,7 +28,8 @@ the Internals Reference. quoteMe = \relative c' { fis4 r16 a8.-> b4\ff c -} +} % begin verbatim + \addQuote quoteMe \quoteMe original = \relative c'' { @@ -37,18 +39,18 @@ original = \relative c'' { } << - \new Staff { - \set Staff.instrumentName = #"quoteMe" - \quoteMe - } - \new Staff { - \set Staff.instrumentName = #"orig" - \original + \new Staff \with { instrumentName = "quoteMe" } + \quoteMe + + \new Staff \with { instrumentName = "orig" } + \original + + \new Staff \with { + instrumentName = "orig+quote" + quotedEventTypes = #'(note-event articulation-event) } - \new Staff \relative c'' << - \set Staff.instrumentName = #"orig+quote" - \set Staff.quotedEventTypes = - #'(note-event articulation-event) + \relative c'' + << \original \new Voice { s4 diff --git a/Documentation/snippets/staff-headword.ly b/Documentation/snippets/staff-headword.ly index 056cfca008..b959f0713a 100644 --- a/Documentation/snippets/staff-headword.ly +++ b/Documentation/snippets/staff-headword.ly @@ -4,8 +4,8 @@ % and then run scripts/auxiliar/makelsr.py % % This file is in the public domain. -%% Note: this file works from version 2.19.0 -\version "2.19.0" +%% Note: this file works from version 2.19.55 +\version "2.19.55" \include "catalan.ly" \header { @@ -77,38 +77,39 @@ lower = \relative do { \score { << - \context Staff = "trumpet" << - \set Staff.instrumentName = \markup { "Trumpet" \concat{ B \teeny \raise #0.4 \flat } } + \context Staff = "trumpet" + \with { instrumentName = \markup { "Trumpet" \concat{ B \teeny \raise #0.4 \flat } } } + << \transpose sib do' \trompette >> - \context RhythmicStaff = "tambourin" << - \set Staff.instrumentName = "Tambourine" + \context RhythmicStaff = "tambourin" + \with { instrumentName = "Tambourine" } + << \tambourin >> - \context PianoStaff = "prima" << - \set PianoStaff.instrumentName = "Piano " + \context PianoStaff = "prima" + \with { instrumentName = "Piano" } + << \context Staff = "uppera" \upper \context Staff = "lowera" \lower >> >> \layout { } } + \score { << - \context Staff = "trumpet" { - \set Staff.midiInstrument = "trumpet" - \trompette - } + \context Staff = "trumpet" \with { midiInstrument = "trumpet" } + \trompette \context DrumStaff = "tambourin" { \tambourin } - \context Staff = "piano" << + \context Staff = "piano" + << \upper \lower >> >> - \midi { - \tempo 4 = 72 - } + \midi { \tempo 4 = 72 } } diff --git a/Documentation/snippets/string-quartet-template-simple.ly b/Documentation/snippets/string-quartet-template-simple.ly index e435da4877..6e7f6e1a23 100644 --- a/Documentation/snippets/string-quartet-template-simple.ly +++ b/Documentation/snippets/string-quartet-template-simple.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.56 +\version "2.19.56" \header { lsrtags = "really-simple, template, unfretted-strings" @@ -20,52 +21,45 @@ This template demonstrates a simple string quartet. It also uses a global= { \time 4/4 \key c \major -} +} % begin verbatim -violinOne = \new Voice \relative c'' { - \set Staff.instrumentName = #"Violin 1 " +violinOne = \new Voice \relative c'' { c2 d e1 - \bar "|." } violinTwo = \new Voice \relative c'' { - \set Staff.instrumentName = #"Violin 2 " - g2 f e1 - \bar "|." } viola = \new Voice \relative c' { - \set Staff.instrumentName = #"Viola " \clef alto - e2 d c1 - \bar "|." } cello = \new Voice \relative c' { - \set Staff.instrumentName = #"Cello " \clef bass - c2 b a1 - \bar "|." } \score { \new StaffGroup << - \new Staff << \global \violinOne >> - \new Staff << \global \violinTwo >> - \new Staff << \global \viola >> - \new Staff << \global \cello >> + \new Staff \with { instrumentName = "Violin 1" } + << \global \violinOne >> + \new Staff \with { instrumentName = "Violin 2" } + << \global \violinTwo >> + \new Staff \with { instrumentName = "Viola" } + << \global \viola >> + \new Staff \with { instrumentName = "Cello" } + << \global \cello >> >> \layout { } \midi { } diff --git a/Documentation/snippets/string-quartet-template-with-separate-parts.ly b/Documentation/snippets/string-quartet-template-with-separate-parts.ly index 7efde9f3a7..e4e82c5ec0 100644 --- a/Documentation/snippets/string-quartet-template-with-separate-parts.ly +++ b/Documentation/snippets/string-quartet-template-with-separate-parts.ly @@ -1,10 +1,11 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.di.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.18.0" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.56 +\version "2.19.56" \header { lsrtags = "preparing-parts, template, unfretted-strings" @@ -34,52 +35,74 @@ Do not forget to remove specified comments when using separate files! global= { \time 4/4 \key c \major -} +} % begin verbatim + -Violinone = \new Voice { \relative c''{ - \set Staff.instrumentName = #"Violin 1 " - c2 d e1 +Violinone = \new Voice { + \relative c'' { + c2 d e1 + \bar "|." + } +} -\bar "|." }} %********************************* -Violintwo = \new Voice { \relative c''{ - \set Staff.instrumentName = #"Violin 2 " - g2 f e1 +Violintwo = \new Voice { + \relative c'' { + g2 f e1 + \bar "|." + } +} -\bar "|." }} %********************************* -Viola = \new Voice { \relative c' { - \set Staff.instrumentName = #"Viola " - \clef alto - e2 d c1 +Viola = \new Voice { + \relative c' { + \clef alto + e2 d c1 + \bar "|." + } +} -\bar "|." }} %********************************* -Cello = \new Voice { \relative c' { - \set Staff.instrumentName = #"Cello " - \clef bass - c2 b a1 +Cello = \new Voice { + \relative c' { + \clef bass + c2 b a1 + \bar "|." + } +} -\bar "|."}} %********************************** music = { << - \tag #'score \tag #'vn1 \new Staff { << \global \Violinone >> } - \tag #'score \tag #'vn2 \new Staff { << \global \Violintwo>> } - \tag #'score \tag #'vla \new Staff { << \global \Viola>> } - \tag #'score \tag #'vlc \new Staff { << \global \Cello>> } + \tag #'score \tag #'vn1 + \new Staff \with { instrumentName = "Violin 1" } + << \global \Violinone >> + + \tag #'score \tag #'vn2 + \new Staff \with { instrumentName = "Violin 2" } + << \global \Violintwo>> + + \tag #'score \tag #'vla + \new Staff \with { instrumentName = "Viola" } + << \global \Viola>> + + \tag #'score \tag #'vlc + \new Staff \with { instrumentName = "Cello" } + << \global \Cello >> >> } -%%% These are the other files you need to save on your computer +% These are the other files you need to save on your computer -%%%%% score.ly -%%%%% (This is the main file) +% score.ly +% (This is the main file) -%%% uncomment the line below when using a separate file +% uncomment the line below when using a separate file %\include "piece.ly" + #(set-global-staff-size 14) + \score { \new StaffGroup \keepWithTag #'score \music \layout { } @@ -89,8 +112,8 @@ music = { %{ Uncomment this block when using separate files -%%%%% vn1.ly -%%%%% (This is the Violin 1 part file) +% vn1.ly +% (This is the Violin 1 part file) \include "piece.ly" \score { @@ -99,8 +122,8 @@ music = { } -%%%%% vn2.ly -%%%%% (This is the Violin 2 part file) +% vn2.ly +% (This is the Violin 2 part file) \include "piece.ly" \score { @@ -109,8 +132,8 @@ music = { } -%%%%% vla.ly -%%%%% (This is the Viola part file) +% vla.ly +% (This is the Viola part file) \include "piece.ly" \score { @@ -119,8 +142,8 @@ music = { } -%%%%% vlc.ly -%%%%% (This is the Cello part file) +% vlc.ly +% (This is the Cello part file) \include "piece.ly" \score { diff --git a/Documentation/snippets/wind-headword.ly b/Documentation/snippets/wind-headword.ly index 2cd83c1bf5..f3bef5585e 100644 --- a/Documentation/snippets/wind-headword.ly +++ b/Documentation/snippets/wind-headword.ly @@ -4,9 +4,9 @@ % and then run scripts/auxiliar/makelsr.py % % This file is in the public domain. -%% Note: this file works from version 2.19.20 +%% Note: this file works from version 2.19.56 -\version "2.19.20" +\version "2.19.56" \header { lsrtags = "headword" @@ -27,8 +27,8 @@ Wind headword % Nutcracker Suite, VII Dance of the Merlitons \score { \new StaffGroup << - \new Staff \relative c'' { - \set Staff.instrumentName = "Flauto I,II" + \new Staff \with { instrumentName = "Flauto I,II" } + \relative c'' { \once \override Score.RehearsalMark.self-alignment-X = #-1 \once \override Score.RehearsalMark.break-align-symbols = #'(time-signature) \once \override Score.TimeSignature.break-align-anchor-alignment = #LEFT @@ -40,11 +40,11 @@ Wind headword 16-.\p -. -. -. 8-. -. -.\< 32( 4--)\mf 16-. -. -. -. - (\> ) -. -.\! + (\> ) -. -.\! 4--\sf \acciaccatura {8} 4--\mf } - \new Staff \relative c' { - \set Staff.instrumentName = "Flauto III" + \new Staff \with { instrumentName = "Flauto III" } + \relative c' { \key d \major \time 2/4 \compressMMRests R2*2_\markup{Gr.Fl.} -- 2.39.2