From: Jan Nieuwenhuizen Date: Fri, 14 Aug 2009 11:49:46 +0000 (+0200) Subject: Doc: add web-gop examples. FIXME: check sesto [changed], granados [broken]. X-Git-Tag: release/2.13.4-1~179^2~68 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=82509dfbd88f9d4fac9681880720cf7bff1ff05a;p=lilypond.git Doc: add web-gop examples. FIXME: check sesto [changed], granados [broken]. --- diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile index 4f18f08e39..36e3d43792 100644 --- a/Documentation/GNUmakefile +++ b/Documentation/GNUmakefile @@ -164,6 +164,14 @@ $(OUT_TEXINFO_MANUALS): $(outdir)/pictures $(outdir)/pictures: $(MAKE) -C pictures WWW-1 ln -sf ../pictures/$(outdir) $@ + +$(outdir)/general.texi: $(outdir)/examples + +$(outdir)/examples: + $(MAKE) -C general/examples +# FIXME: who is replacing src="examples --> src="../examples" ? +# [ugh, why do most scripts not even say they run anymore?] + ln -sf general/examples $@ endif # Ugh, using '%' twice not possible diff --git a/Documentation/general/GNUmakefile b/Documentation/general/GNUmakefile index c93c9e0624..985bf0c5c8 100644 --- a/Documentation/general/GNUmakefile +++ b/Documentation/general/GNUmakefile @@ -1,5 +1,4 @@ depth = ../.. - LOCALSTEPMAKE_TEMPLATES = ly - +SUBDIRS = examples include $(depth)/make/stepmake.make diff --git a/Documentation/general/examples/GNUmakefile b/Documentation/general/examples/GNUmakefile new file mode 100644 index 0000000000..b31eae8c94 --- /dev/null +++ b/Documentation/general/examples/GNUmakefile @@ -0,0 +1,32 @@ +depth=../../.. +LOCALSTEPMAKE_TEMPLATES=lilypond ly +include $(depth)/make/stepmake.make + +LILYPOND_PREVIEW = $(LILYPOND_BINARY) --png -dpreview -dresolution=150 + +BROKEN = granados.ly #sesto.ly +FINE_LY_FILES = $(filter-out $(BROKEN), $(LY_FILES)) +PNG_PAGES = sesto-1 sesto-2 + +OUT_PNG_FILES = $(FINE_LY_FILES:%.ly=$(outdir)/%.png) +OUT_PNG_PAGES = $(PNG_PAGES:%=$(outdir)/%.png) +OUT_PNG_FILES += $(OUT_PNG_PAGES) + +OUT_SMALL_PNG_FILES = $(OUT_PNG_FILES:%.png=%-small.png) + +ifeq ($(out),www) +all: $(OUT_PNG_FILES) $(OUT_SMALL_PNG_FILES) +endif + +$(outdir)/%.png: %.ly + $(LILYPOND_PREVIEW) -o $(outdir) $< + mv $(outdir)/$*.preview.png $@ + +$(outdir)/%-small.png: $(outdir)/%.png + pngtopnm $< | pnmscale -w=600 | pnmtopng > $@ + +$(outdir)/%-1.png: $(outdir)/%.png + mv $(outdir)/$*-1.preview.png $@ + +$(outdir)/%-2.png: $(outdir)/%.png + mv $(outdir)/$*-2.preview.png $@ diff --git a/Documentation/general/examples/ancient-headword.ly b/Documentation/general/examples/ancient-headword.ly new file mode 100644 index 0000000000..ff337da7d0 --- /dev/null +++ b/Documentation/general/examples/ancient-headword.ly @@ -0,0 +1,124 @@ +\version "2.12.0" +\include "example-header.ily" + +#(set-global-staff-size 15) + +\include "gregorian.ly" + +\score { + << + \new VaticanaVoice = "cantus" { + \clef "vaticana-do3" + % Verse 1 — Salve, Regína + a\melisma \[ a \flexa g \pes a\melismaEnd \] d + \divisioMinima + \[ a\melisma \flexa g\melismaEnd \] + \[ f\melisma \flexa e f \pes g \flexa f\melismaEnd \] + \[ e\melisma \flexa d\melismaEnd \] + \divisioMaior + c d \[d\melisma \flexa c\melismaEnd \] d + \[ e\melisma \pes f\melismaEnd\] g + \[d\melisma \pes e \flexa c\melismaEnd \] d + \finalis + % Verse 2 — Vita, dulcédo + % a\melisma \[ a \flexa g \pes a\melismaEnd \] d + % \divisioMinima + % \[ a\melisma \flexa g\melismaEnd \] + % \[ f\melisma \flexa e f \pes g \flexa f\melismaEnd \] + % \[ e\melisma \flexa d\melismaEnd \] + % \divisioMaior + % c d \[e\melisma \pes f\melismaEnd \] g + % \[d\melisma \pes e \flexa c\melismaEnd \] d + % \finalis + % Verse 3 — Ad te clamámus + \[ d\melisma \pes f\melismaEnd\] a g + \[ g\melisma \flexa f \pes a\melismaEnd\] e + \divisioMaior + g f \[ e\melisma \flexa d \pes g\melismaEnd \] + \divisioMinima + c d \[ e\melisma \flexa d \pes g\melismaEnd \] + \[ f\melisma \flexa e\melismaEnd \] d + \finalis + % Verse 4 — Ad te suspirámus + \[ d\melisma \pes f\melismaEnd \] a c' g + \[ g\melisma \flexa f \pes g\melismaEnd \] a + \divisioMaior + d \[ f\melisma \pes \deminutum g\melismaEnd \] g d + \[ \virga f\melisma \inclinatum e \inclinatum d\melismaEnd \] + c \divisioMaior + d \[ d\melisma \flexa c \pes f\melismaEnd \] + \[ g\melisma \pes a\melismaEnd \] + g \[ f\melisma \flexa e\melismaEnd \] g + \[ f\melisma \flexa \deminutum e\melismaEnd \] + \[ d\melisma \flexa c \pes d\melismaEnd \] + \finalis + % Verse 5 — Eia ergo, Advocáta nostra + f\melisma \[ f \pes g\melismaEnd \] f + \[ g\melisma \pes \deminutum a\melismaEnd \] a + \divisioMinima + c' g \[ \virga a\melisma \inclinatum g \inclinatum f\melismaEnd \] d g a + \divisioMaior + d' d' \[ c'\melisma \flexa b c' \pes d'\melismaEnd \] a + \divisioMinima + d' c' a \[ g\melisma \flexa f \pes a\melismaEnd \] g + \[ d\melisma \pes e\melismaEnd \] f + \[ \virga e\melisma \inclinatum d \inclinatum c\melismaEnd \] + \divisioMaior + \[ c\melisma \pes d\melismaEnd \] + f \[ g\melisma \flexa \deminutum f\melismaEnd \] + \[ d\melisma \flexa c \pes d\melismaEnd \] d + \finalis + % Verse 6 — Et Jesum + d a, \[ c\melisma \pes d\melismaEnd \] + \divisioMinima + d \[ d\melisma \pes e\melismaEnd \] \[ e\melisma \flexa d d\melismaEnd \] + c g f \[ e\melisma \flexa \deminutum d\melismaEnd \] g + \[ f\melisma \flexa e\melismaEnd \] + \[ d\melisma \flexa c \pes d\melismaEnd \] + \[ d\melisma \pes a \] \virga bes\melismaEnd a + \divisioMinima + \[ \virga a\melisma \inclinatum g \inclinatum f\melismaEnd \] g d f + \[ f\melisma \flexa e\melismaEnd \] \[ d\melisma \flexa c\melismaEnd \] + \divisioMinima + \[ e\melisma \pes f \flexa e\melismaEnd \] d d + \finalis + % Verse 7 ad finem — O clemens: O pia: O dulcis Virgo María + a\melisma \[a \flexa g a \quilisma b \pes c'\melismaEnd \] + \[ \virga b\melisma \inclinatum a \inclinatum g\melismaEnd \] a + \finalis + \[ g\melisma \pes a \quilisma b \pes c' \] \[ c' \flexa b\melismaEnd \] + \[ a\melisma \flexa g\melismaEnd \] \[ g\melisma \pes a\melismaEnd \] + \finalis + \[ a\melisma \flexa d \virga f \inclinatum e \inclinatum d \inclinatum c d \] + \divisioMinima + \[ d \pes e f \pes g\melismaEnd \] + \[ g\melisma \flexa \deminutum f\melismaEnd \] + \[ g\melisma \pes a\melismaEnd \] + d c d \[ d\melisma \pes g \flexa f f\melismaEnd \] + \[ e\melisma \flexa d\melismaEnd \] + \finalis + } + \new Lyrics \lyricsto "cantus" { + Sal- ve, Re- gí- na, ma- ter mi- se- ri- cór- di- ae: + % Vi- ta, dul- cé- do, et spes no- stra, sal- ve. + Ad te cla- má- mus, éx- su- les, fi- li- i He- vae. + Ad te su- spi- rá- mus, ge- mén- tes et flen- tes in hac la- cri- má- rum + val- le. + E- ia er- go, Ad- vo- cá- ta no- stra, il- los tu- os mi- se- ri- cór- des + ó- cu- los ad nos con- vér- te. + Et Je- sum, be- ne- díc- tum fruc- tum ven- tris tu- i, no- bis post hoc + ex- sí- li- um os- tén- de. + O cle- mens: + O pi- a: + O dul- cis Vir- go Ma- rí- a. + } + >> +} + +\layout { + \context { + \Staff + \consists Custos_engraver + } +} + diff --git a/Documentation/general/examples/aucun-snippet.ly b/Documentation/general/examples/aucun-snippet.ly new file mode 100644 index 0000000000..4dc345ee97 --- /dev/null +++ b/Documentation/general/examples/aucun-snippet.ly @@ -0,0 +1,257 @@ +\version "2.12.0" +\include "example-header.ily" + +\paper { +% line-width=158\mm % produces 624 pixels + line-width = 143\mm % reserve 15mm for incipit +} + +% Aucun ont trouvé, from Montpellier Codex +% +% Put brackets in where the original has ligatures, using +% "Analysis Brackets," and adjust the "bracket-flare" property +% to make the ends vertical instead of slanted. + +#(set-global-staff-size 15) + +%%%%%%%%%%% INCIPIT DEFS %%%%%%%%%% + +incipitGlobal = { + \override NoteHead #'style = #'mensural + \override Accidental #'style = #'mensural + \override KeySignature #'style = #'mensural + \override Rest #'style = #'mensural +% \override Staff.TimeSignature #'style = #'mensural + \cadenzaOn + \override Score.Clef #'extra-offset = #'(-0.0 . 0.5) + \override Score.Clef #'font-size = #3 + \clef "vaticana-do1" +} + +incipitTriplum = \markup{ + \score{ + { + \set Staff.instrumentName="Triplum " + \incipitGlobal + s1. + } + \layout { + %indent = 1\cm + \context {\Voice + \remove Ligature_bracket_engraver + \consists Mensural_ligature_engraver + } + \context {\Staff + \remove "Time_signature_engraver" + } + line-width=5\mm + } + } +} + +incipitMotetus = \markup{ + \score{ + { + \set Staff.instrumentName="Motetus" + \incipitGlobal + s1. + } + \layout { + % indent = 1\cm + \context {\Voice + \remove Ligature_bracket_engraver + \consists Mensural_ligature_engraver + } + \context {\Staff + \remove "Time_signature_engraver" + } + line-width=5\mm + } + } +} + +incipitTenor = \markup{ + \score{ + { + \set Staff.instrumentName = "Tenor " + \incipitGlobal + s1.*2 + } + \layout { + %indent = 1\cm + \context {\Voice + \remove Ligature_bracket_engraver + \consists Mensural_ligature_engraver + } + \context {\Staff + \remove "Time_signature_engraver" + } + line-width=5\mm +} +} +} + +incipitBassus = \markup{ + \score{ { + \set Staff.instrumentName = "Bassus " + \override NoteHead #'style = #'neomensural + \override Accidental #'style = #'neomensural + \override Rest #'style = #'neomensural + \override Staff.TimeSignature #'style = #'neomensural + \cadenzaOn + \clef "petrucci-f3" + \key f \major + \time 3/2 + \relative c' { + s1. % R1.*2 + } + } + \layout { + \context { \Voice + \remove Ligature_bracket_engraver + \consists Mensural_ligature_engraver + } + line-width=5\mm + } + } +} + +%%%%%%%%%%% END INCIPIT DEFS %%%%%%%%%%% + +#(ly:set-option 'point-and-click #f) + +global = { + \override Staff.TimeSignature #'stencil = #(lambda (grob) + (bracketify-stencil (ly:time-signature::print grob) Y 0.1 0.2 0.1)) + \time 3/4 + \override Staff.BarLine #'transparent = ##t + \override HorizontalBracket #'direction = #UP + \override HorizontalBracket #'bracket-flare = #'(0 . 0) +} + +%%%%%%%%% MACRO FOR MAKING SLASHES THROUGH STEMS %%%%%%%%%% +MakeSlash = #(define-music-function (parser location angle len-left len-right +thick y-factor offset) + (number? number? number? number? number? +pair?) +#{ +\once \override Voice.Stem #'text = \markup { + \postscript #(let ((x-off (car $offset)) + (y-off (cdr $offset))) + (string-append + (ly:number->string (car $offset)) " " (ly:number->string (cdr $offset)) " +translate " + (ly:number->string $angle) " rotate " + (ly:number->string (- x-off)) " " + (ly:number->string (- y-off)) " translate 0 setlinewidth " + (ly:number->string (- x-off $len-left)) " " (ly:number->string (+ y-off +$thick)) " moveto " + (ly:number->string (- x-off $len-left)) " " (ly:number->string y-off) + " " (ly:number->string $thick) " +90 270 arc " + (ly:number->string (+ x-off $len-right)) " " (ly:number->string y-off) + " " (ly:number->string $thick) " +270 90 arc " + " gsave fill grestore stroke")) } + +\once \override Voice.Stem #'stencil = #(lambda (grob) + (let* ((sten1 (ly:stem::print grob)) + (sten2 (ly:text-interface::print grob)) + (extent1 (ly:stencil-extent sten1 Y)) + (extent2 (ly:stencil-extent sten2 Y))) + (ly:stencil-add + sten1 + (ly:stencil-translate sten2 + (cons 0 (+ (* $y-factor (cdr extent1)) + (* (- 1 $y-factor) (car extent1)))))))) +#}) + + +slash = { \MakeSlash #20 #1.0 #1.1 #0.05 #0.75 #'(0 . -.5) } + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +triplumWords = \lyricmode { + Au -- cun ont trou -- ve chant par u -- sa -- ge, + mes a moi en doune o -- choi -- son __ + a -- mours, qui res -- bou -- dist mon cou -- ra -- ge + si que m'ès -- tuet fai -- re _ chan -- _ _ çon +} + +triplumNotes = \relative c' { + \clef "treble_8" + %\set Staff.midiInstrument = "flute" +% \global + \override StemTremolo #'beam-thickness = #.125 + \override StemTremolo #'slope = #1.0 + f8 f4 e8 d c f f f | % 1 + % the \scaleDurations command below makes 5 notes last the + % duration of a dotted quarter + e8 c4 \scaleDurations #'(3 . 2) { \times 4/5{e16[ d e d e]} } e8 f4 | % 2 + g2. ~ g4. | % 3 + f8 d4 f4. \scaleDurations #'(3 . 2) { \times 4/6{ g16[ f e f e f]}} % 4 + g8 g4 g4. e4. | % 5 + fis8 d4 e8\startGroup g4\stopGroup f8[ e d] | % 6 + c2. r4. | % 7 +} + +motetusWords = \lyricmode { + lonc tans _ _ me fiu -- te -- nu de chan -- _ _ ter __ + mes or ai _ _ +} + +motetusNotes = \relative c' { + \clef "treble_8" + c2. c8\startGroup b8 \slash c\stopGroup | % 1 + a2. c4. | d2. e4. | % 2-3 + f2. f8 e d | % 4 + c2. ~ c4. | r2. r4. | % 5-6 + g'4. g g8 f e | % 7 +} + + +tenorNotes = \relative c { + \clef "treble_8" + f2. | a2. | g2. | r2. | % 1-4 + c2. | b2. | c2. | % 5-7 +} + +\score { + \new StaffGroup << + \new Staff = "triplum" << + %\set Staff.instrumentName = "Triplum" + \set Staff.instrumentName = \incipitTriplum + \set Staff.shortInstrumentName = "Tr." + \set Staff.timeSignatureFraction = #'(9 . 8) + \scaleDurations #'(2 . 3) + \context Voice = "triplum" { \global \triplumNotes } +% \scaleDurations #'(2 . 3) +% \context Voice = "slashes" { \triplumSkips } + \new Lyrics { \lyricsto "triplum" { \triplumWords }} + >> + \new Staff = "motetus" << + %\set Staff.instrumentName = "Motetus" + \set Staff.instrumentName = \incipitMotetus + \set Staff.shortInstrumentName = "M." + \set Staff.timeSignatureFraction = #'(9 . 8) + \scaleDurations #'(2 . 3) + \context Voice = "motetus" { \global \motetusNotes } + \new Lyrics { \lyricsto "motetus" { \motetusWords }} + >> + \new Staff = "tenor" { + %\set Staff.instrumentName = "Tenor" + \set Staff.instrumentName = \incipitTenor + \set Staff.shortInstrumentName = "T." + \global \tenorNotes + } + >> + %\midi {} + \layout { + %\context { + % \Staff \consists "Horizontal_bracket_engraver" + %} + \context { + \Voice \consists "Horizontal_bracket_engraver" + } + } +} diff --git a/Documentation/general/examples/bach-bwv610.ly b/Documentation/general/examples/bach-bwv610.ly new file mode 100644 index 0000000000..f74a383915 --- /dev/null +++ b/Documentation/general/examples/bach-bwv610.ly @@ -0,0 +1,183 @@ +\version "2.12.0" +%\include "example-header.ily" + + +\header { + mutopiatitle = "Jesu, meine Freude" + mutopiacomposer = "BachJS" + poet = "BWV 610" + %mutopiaopus = "BWV 610" + mutopiainstrument = "Organ" + date = "" + source = "Bach-Album, Ernst H. Wolfram (editor), 6787, C. F. Peters, Leipzig" + style = "Baroque" + copyright = "Public Domain" + maintainer = "Urs Metzger" + maintainerEmail = "urs@ursmetzger.de" + lastupdated = "2006/Mar/15" + + title = "Jesu, meine Freude" + composer = "Johann Sebastian Bach" + %opus="BWV 610" + + footer = "Mutopia-2006/03/27-706" + tagline = \markup { \override #'(box-padding . 1.0) \override #'(baseline-skip . 2.7) \box \center-column { \small \line { Sheet music from \with-url #"http://www.MutopiaProject.org" \line { \teeny www. \hspace #-1.0 MutopiaProject \hspace #-1.0 \teeny .org \hspace #0.5 } • \hspace #0.5 \italic Free to download, with the \italic freedom to distribute, modify and perform. } \line { \small \line { Typeset using \with-url #"http://www.LilyPond.org" \line { \teeny www. \hspace #-1.0 LilyPond \hspace #-1.0 \teeny .org } by \maintainer \hspace #-1.0 . \hspace #0.5 Reference: \footer } } \line { \teeny \line { This sheet music has been placed in the public domain by the typesetter, for details see: \hspace #-0.5 \with-url #"http://creativecommons.org/licenses/publicdomain" http://creativecommons.org/licenses/publicdomain } } } } + +} + +\include "deutsch.ly" + +global = { + \key c \minor + \time 4/4 + #(set-accidental-style 'default) +} + +halsup = { + \stemUp + \tieUp +} + +halsdown = { + \stemDown + \tieDown +} + +staffup = { + \change Staff = "right" \halsdown +} + +staffdown = { + \change Staff = "left" \halsup +} + +sopran = { + \new Voice \relative g' { + \global + \halsup + \repeat volta 2 { + g4^\markup { \hspace #-4 \large "Largo" } g f es + d2 c\fermata + g'4 g a h + c2 h\fermata + %% Takt 5 ============================================== + c8. d16 es4 d4. d8 + c1\fermata + } + g4 g as g + f4. f8 es2\fermata + g4 g a h + %% Takt 10 ============================================= + c4 b! a2 + g1\fermata + g4 g f es + d2 c2\fermata \bar "|." + } +} + +alt = { + \new Voice \relative es' { + \global + \halsdown + \repeat volta 2 { + es16 d es8~ es16 f es d c8 d~ d c + c8 c4 h8 c8. \staffdown g16 \staffup c h c d + es16 d es8~ es16 f es d c8 d16 es f as g f~ + f16 e f8~ f16 g f es d es d8~ d16 es f d + %% Takt 5 ============================================== + g8 f es16 g as es f es f d g as g f + e8 f16 g as g as e f g f8~ f16 f es d + } + es16 d es8~ es16 f es des c8 \staffdown b~ b16 b c g + as16 g as f b c b as g f g8~ g16 b \staffup c d + es16 d es8~ es16 f es d c8 d16 es f as g f + %% Takt 10 ============================================= + es16 d es8 d g~g g4 fis8 + g16 d es c \staffdown d h c a h a h c d h g h + c16 h c \staffup d es d es8~ es d4 c8~ + c16 h c8~ c h c16 \staffdown g as8 g4\fermata + } +} + +tenor = { + \new Voice \relative c' { + \global + \repeat volta 2 { + c16 h c8~ c16 h c g a8 g~ g16 g as es + f16 es f d g as g f es d \tieDown es8~ es16 \tieNeutral f es d + c16 h c g' c h c c, f8. g16 as!4~ + as16 g as b c h c8 d8. c16 h c d h + %% Takt 5 ============================================== + es16 d es d~ d8 c~c c4 h8 + c4~ c8. b16 as b as8 g16 as g f + } + \halsdown es16 f g as b des c b as g f8~ f es + es8 es4 d8 es8. b16 es d es f + es16 f g8 c16 d c b a g f8~ f4 + %% Takt 10 ============================================= + g16 fis g a b a b g c b c a d es d c + h8 c16 a h g a fis g8 d16 es f es f8~ + f16 d es h c h c8 r16 f g d es g as fis + g16 d f! es f as g f e8. f16~ f d e8\fermata + } +} + +right = { + \clef treble + << + \alt + \sopran + >> +} + +left = { + \clef bass + << + \tenor + >> +} + +pedal = { + \global + \clef "bass" + \relative c { + \repeat volta 2 { + r8 c16 d es d es8~ es16 a, h g c h c8 + r16 g as f g f g8 c,2 + r8 c'16 d es d es8~ es16 c f es d c d8 + c8 f16 g as g as8~ as16 d, fis d g fis g8 + %% Takt 5 ============================================== + r8 a16 h c h c8 + r16 g as f g f g8 + r16 g as e f e f8 r16 e f h, c h c8 + } + r8 es16 f g f g8~ g16 c, d! b es d es8 + r16 b c as b as b8 es,2 + r8 c'16 d es d es8~ es16 c f es d c d8 + %% Takt 10 ============================================= + c8 es16 f! g fis g8 r16 d es c d c d8 + g,1 + c4 c,8 c'16 b! a8 h c16 h c8 + r16 g as fis g fis g8 c,2_\fermata + } +} + +\score { + \new PianoStaff + { \set PianoStaff.instrumentName = \markup { \large \center-column { + "a" "" "2 Clav." "" "e" "" "Pedale." } \hspace #0.5 } + << + \context Staff = right + { + \context Voice = right \right + } + \context Staff = left { + \context Voice = left \left + } + \context Staff = pedal { + \context Voice = pedal \pedal + } + >> + } + \layout{} +} diff --git a/Documentation/general/examples/bach-schenker.ly b/Documentation/general/examples/bach-schenker.ly new file mode 100644 index 0000000000..242307d612 --- /dev/null +++ b/Documentation/general/examples/bach-schenker.ly @@ -0,0 +1,258 @@ +% -*-coding: utf-8 -*- + +\header{ + composer = "J.S. Bach" + title = "Wenn wir in höchsten Nöten sein" + subtitle = "Analysis from Gene Biringer's Schenker Text, Ex. 5-27" +% "BWV641" + enteredby = "Kris Shaffer" +} + +%% +%% See http://www.shaffermusic.com/doc/schenker/index.html for more information +%% + +I = \once \override NoteColumn #'ignore-collision = ##t + +\version "2.12.0" + +staffPiano = \new PianoStaff { + \set Score.timing = ##f + \set PianoStaff.followVoice = ##t + + << + \new Staff = "RH" { % Right hand + \clef treble + \key g \major + \relative c'' { + \override Staff.NoteCollision + #'merge-differently-headed = ##t + << + { + \override Beam #'positions = #'(8 . 8) + \override NoteHead #'transparent = ##t + \override NoteHead #'duration-log = #1 + s1 b8[^\markup { + \override #'(baseline-skip . 0.5) + \column { \small {^ 3} } + } + s4. s1 a8^\markup { + \override #'(baseline-skip . 0.5) + \column { \small {^ 2} } + } + s4. s2 g8]^\markup { + \override #'(baseline-skip . 0.5) + \column { \small {^ 1} } + } + s4. + \revert Beam #'positions + \revert NoteHead #'transparent + \revert NoteHead #'duration-log + } + \\ + { + \override Stem #'transparent = ##t + s1 + \once \override Slur #'height-limit = #6 + \once \override Slur #'extra-offset = #'(1.25 . 0) + \slurDashed + \I b2_( s2 + \once \override NoteHead #'transparent = ##t + b4) s + \once \override Slur #'height-limit = #3.25 + \once \override Slur #'extra-offset = #'(.75 . 0) + a2_( s4 + \once \override NoteHead #'transparent = ##t + a) + g2 + \revert Stem #'transparent + } + \\ + \override Staff.NoteCollision + #'merge-differently-headed = ##t + { + \override Beam #'positions = #'(4 . -3.25) + \stemUp + g8[ s s4 s2 + \stemDown + \once \override NoteHead #'transparent = ##t + \I b8] s8 + \override Beam #'positions = #'(3 . -2.25) + \stemUp + a8[ s s4 + \stemDown + c8] s s2 s s + } + \\ + { + \override Stem #'transparent = ##t + \override Stem #'length = #0 + g4_\( fis^(_\markup { \tiny N } g)\) + a^(^\markup { \tiny P } b2) + b4^(^\markup { \tiny P } + \stemUp + \revert Stem #'transparent + \override Stem #'length = #10 + c8)^( s + \override Stem #'length = #14 + b4) s s + \override Stem #'length = #0 + \override Stem #'transparent = ##t + \once \override Slur #'extra-offset = #'(0 . 0.35) + c4^\( b_(_\markup { \tiny P } a)\) s2 + \revert Stem #'length + } + \\ + { + \override Stem #'transparent = ##t + \override NoteHead #'transparent = ##t + \override Stem #'length = #0 + s1 s4 e4 s + \change Staff = "LH" + fis,4 s2 + \revert Stem #'transparent + \revert NoteHead #'transparent + \revert Stem #'length + } + \\ + { + \override Stem #'transparent = ##t + \override NoteHead #'transparent = ##t + \override Stem #'length = #0 + s1 s s2 + fis'4 s + \change Staff = "LH" + g,4 s s2 + \revert Stem #'transparent + \revert NoteHead #'transparent + \revert Stem #'length + } + >> + \bar "|." + } + } + + \new Staff = "LH" { % Left hand + \clef bass + \key g \major + \relative c' { + \override Staff.NoteCollision + #'merge-differently-headed = ##t + << + { + \override Beam #'positions = #'(-8 . -8) + \override NoteHead #'transparent = ##t + \stemDown + \I g8[_\markup { \bold I } s4. s1 s s2 + \I d8_\markup { \bold V } s4. + \I g,8]_\markup { \bold I } s4. + \revert Beam #'positions + \revert NoteHead #'transparent + } + \\ + { + \override Stem #'transparent = ##t + \stemDown + \override TextScript #'extra-offset = #'(-11.75 . -12.25) + \I g'2 s1 s s2 \I d2 g,2 + \revert Stem #'transparent + } + \\ + { + \override Stem #'transparent = ##t + \once \override NoteHead #'transparent = ##t + \override Stem #'length = #0 + g'4 + \once \override TextScript #'padding = #0.25 + a4_(^\markup { \tiny P } b) + fis4^(^\markup { \tiny P } e) + \once \override NoteHead #'transparent = ##t + \once \override Slur #'height-limit = #1.5 + c4^( + d)^\markup { \tiny N } + \once \override NoteHead #'transparent = ##t + \once \override Slur #'extra-offset = #'(0 . 0.5) + \I fis,4_( + \revert Stem #'transparent + \override Stem #'length = #10 + \stemDown + g4) s + \once \override Slur #'extra-offset = #'(0 . 0.25) + \I c8_( s + \override Stem #'transparent = ##t + \revert Stem #'length + a4) + \once \override NoteHead #'transparent = ##t + \I d4^( d,4) s2 + } + \\ + { + \override Stem #'transparent = ##t + \override NoteHead #'transparent = ##t + \I g'4^( s b) s2 + \revert Stem #'transparent + \revert NoteHead #'transparent + \override Beam #'positions = #'(-4 . 1) + \stemDown + c,8[ s s4 + \stemUp + fis,8] s + \override Beam #'positions = #'(1 . -4) + g8[ s + \stemDown + b8] s + \revert Beam #'positions + \override Stem #'transparent = ##t + \override NoteHead #'transparent = ##t + c4^( s d4) s s2 + } + \\ + { + \override Stem #'transparent = ##t + \override NoteHead #'transparent = ##t + \override Stem #'length = #0 + \stemDown + \once \override Slur #'height-limit = #3 + \once \override Slur #'extra-offset = #'(0 . 0.25) + \I g4_( s2. e4) s2. s2 s1 s2 + \revert Stem #'transparent + \revert NoteHead #'transparent + } + \\ + { + \override Stem #'transparent = ##t + \override NoteHead #'transparent = ##t + \slurDashed + \once \override Slur #'height-limit = #6.0 + \once \override Slur #'extra-offset = #'(0.5 . -0.25) + \override Stem #'length = #0 + g4_( s2. s1 g,4) s s1 s2 + \revert Stem #'transparent + \revert NoteHead #'transparent + } + >> + \bar "|." + } + } + >> +} + + +\score { + << + \staffPiano + >> + + \midi { + } + + \layout { + indent = 0.0 + ragged-right = ##f + \context { \Staff \remove "Time_signature_engraver" } + } +} + + +\paper { +} diff --git a/Documentation/general/examples/bach-tab-example.ly b/Documentation/general/examples/bach-tab-example.ly new file mode 100644 index 0000000000..e2ea18a93f --- /dev/null +++ b/Documentation/general/examples/bach-tab-example.ly @@ -0,0 +1,50 @@ +\version "2.11.62" +\include "example-header.ily" + +% Example of Tab Polyphony from Bach Lute Suite in E Minor + + + +%#(define (fret-letter-tablature-format string tuning pitch) +%(make-string 1 (integer->char +%(+ (char->integer #\a) +%(- (pitch-semitones pitch) +%(list-ref tuning (- string 1))))))) + +global = { + \time 12/8 + \key e \minor + \set Staff.midiInstrument = "acoustic guitar (nylon)" +% \set TabStaff.tablatureFormat = #fret-letter-tablature-format +} + +upper = \relative c' { + \global + \voiceOne + r4. r8 e, fis g16 b g e e' b c b a g fis e +} + +lower = \relative c { + \global + \voiceTwo + r16 e d c b a g4 fis8 e fis g a b c | +} + +\score { + << + \new StaffGroup = "tab with traditional" << + \new Staff = "guitar" << + \clef "treble_8" + \context Voice = "upper" \upper + \context Voice = "lower" \lower + >> + \new TabStaff = "guitar" << + \context TabVoice = "upper" \upper + \context TabVoice = "lower" \lower + >> + >> + >> + \layout {} + %\midi {} +} + diff --git a/Documentation/general/examples/cary-layout.ily b/Documentation/general/examples/cary-layout.ily new file mode 100644 index 0000000000..740a025086 --- /dev/null +++ b/Documentation/general/examples/cary-layout.ily @@ -0,0 +1,104 @@ + +\version "2.12.0" + +\layout { + indent = #0 + ragged-right = ##t + \context { + \Score + + proportionalNotationDuration = #(ly:make-moment 1 64) + \override Beam #'breakable = ##t + autoBeaming = ##f + tupletFullLength = ##t + \override BarNumber #'transparent = ##t + \override BarLine #'transparent = ##t + \override SpanBar #'transparent = ##t + \override Beam #'break-overshoot = #'(-0.5 . 1.0) + \override TextScript #'staff-padding = #6 + \override Glissando #'thickness = #3 + \override SpacingSpanner #'strict-grace-spacing = ##t + \override TupletBracket #'bracket-visibility = ##t + \override NoteColumn #'ignore-collision = ##t + } +} + +\paper { + oddHeaderMarkup = \markup \fill-line { " " } + evenHeaderMarkup = \markup \fill-line { " " } + oddFooterMarkup = \markup { + \fill-line { + \bold \fontsize #3 \on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string } } + evenFooterMarkup = \markup { + \fill-line { + \bold \fontsize #3 \on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string } } + printfirst-page-number = ##t + print-page-number = ##t + ragged-last-bottom = ##t +} + +#(set-global-staff-size 14) + + +%% definitions. + + +ppX = #(make-dynamic-script (markup #:combine #:transparent #:dynamic "f" #:line(#:hspace 0 #:dynamic "pp" #:hspace 0))) +pX = #(make-dynamic-script (markup #:combine #:transparent #:dynamic "f" #:line(#:hspace 0 #:dynamic "p" #:hspace 0))) +mpX = #(make-dynamic-script (markup #:combine #:transparent #:dynamic "f" #:line(#:hspace 0 #:dynamic "mp" #:hspace 0))) +fX = #(make-dynamic-script (markup #:combine #:transparent #:dynamic "f" #:line(#:hspace 0 #:dynamic "f" #:hspace 0))) +ffX = #(make-dynamic-script (markup #:combine #:transparent #:dynamic "f" #:line(#:hspace 0 #:dynamic "ff" #:hspace 0))) +sfp = #(make-dynamic-script "sfp") +sfpp = #(make-dynamic-script "sfpp") +sffp = #(make-dynamic-script "sffp") +sffpp = #(make-dynamic-script "sffpp") + +beam = #(define-music-function (parser location left right) (number? number?) + (cond ((and (= left 0) (> right 0)) + #{ + \set stemRightBeamCount = #$right + #}) + + ((and (> left 0) (= right 0)) + #{ + \set stemLeftBeamCount = #$left + #}) + + (else + #{ + \set stemLeftBeamCount = #$left + \set stemRightBeamCount = #$right + #}) + ) +) + +fraction = #(define-music-function (parser location music) (ly:music?) + #{ \tweak #'text #tuplet-number::calc-fraction-text $music #}) + +triangle = #(define-music-function (parser location music) (ly:music?) + #{ \once \set shapeNoteStyles = #'#(do do do do do do do) $music #}) + +semicircle = #(define-music-function (parser location music) (ly:music?) + #{ \once \set shapeNoteStyles = #'#(re re re re re re re) $music #}) + +blackdiamond = #(define-music-function (parser location music) (ly:music?) + #{ \once \set shapeNoteStyles = #'#(mi mi mi mi mi mi mi) $music #}) + +tiltedtriangle = #(define-music-function (parser location music) (ly:music?) + #{ \once \set shapeNoteStyles = #'#(fa fa fa fa fa fa fa) $music #}) + +square = #(define-music-function (parser location music) (ly:music?) + #{ \once \set shapeNoteStyles = #'#(la la la la la la la) $music #}) + +wedge = #(define-music-function (parser location music) (ly:music?) + #{ \once \set shapeNoteStyles = #'#(ti ti ti ti ti ti ti) $music #}) + +harmonic = #(define-music-function (parser location music) (ly:music?) + #{ \once \set shapeNoteStyles = #'#(harmonic harmonic harmonic harmonic harmonic harmonic harmonic) $music #}) + +cross = #(define-music-function (parser location music) (ly:music?) + #{ \once \set shapeNoteStyles = #'#(cross cross cross cross cross cross cross) $music #}) + +white = #(define-music-function (parser location music) (ly:music?) + #{ \once \override NoteHead #'duration-log = #1 $music #}) + diff --git a/Documentation/general/examples/cary.ly b/Documentation/general/examples/cary.ly new file mode 100644 index 0000000000..f99547bad0 --- /dev/null +++ b/Documentation/general/examples/cary.ly @@ -0,0 +1,395 @@ +\version "2.12.0" +% the example header file caused the head to be chopped off +%\include "example-header.ily" + + +\header { + dedication = "Carin Levine" + instrument = "bass flute" + title = "ČÁRY" + year = "2004--2006" + + subtitle = \markup { \italic Sorcery (extract) } + % Measures 6 - 10; + + composer = "Trevor Bača" + copyright = "Copyright 2006 Trevor Bača - all rights reserved." + +} + +% Verbatim from composer's score. +% +% Upper staff gives fingerings; +% Lower staff gives special types of breath. +% +% Copyright 2006 for the entire score; +% All rights reserved by the composer. + +\include "english.ly" +\include "cary-layout.ily" + +\new Score << + + \new StaffGroup << + + \new Staff \with { + \override Stem #'direction = #down + \override Beam #'positions = #'(-7 . -7) + \override TupletBracket #'direction = #down + \override TupletBracket #'staff-padding = #5 + \override TupletBracket #'padding = #2.25 + \override VerticalAxisGroup #'minimum-Y-extent = #'(10 . 10) + } << + + \new Voice { + + \override Score.MetronomeMark #'extra-offset = #'(0 . 6) + \override Score.MetronomeMark #'font-size = #3 + \tempo 8=42 + \time 5/16 s4 ~ s16 \noBreak % measure 6 + \time 4/8 s2 \noBreak % measure 7 + \time 4/8 s2 \noBreak % measure 8 + + } + + \new Voice \with { + \remove Forbid_line_break_engraver + } { + + % measure 6 + \fraction \times 5/3 { + \times 4/5 { + a'64 [ % 36 + cs''64 % 37 + f''64 % 38 + cs''64 % 39 + ef'''64 ] % 40 + } + \times 4/5 { + g''64 [ % 41 + c''64 % 42 + e''64 % 43 + g''64 % 44 + ef'''64 ] % 45 + } + bf''16 % 46 + } + + % measure 7 + r8 % 47 + \times 4/5 { + d''32 [ % 48 + af''32 % 49 + e'32 % 50 + b'32 % 51 + b'32 ] % 52 + } + ef'''4 % 53 + + % measure 8 + b''8 [ % 54 + g''8 ] % 55 + d''4 % 56 + + } + >> + + \new Staff \with { + \override Clef #'transparent = ##t + \override StaffSymbol #'line-positions = #'(-4 -2 2 4) + \override Stem #'direction = #down + \override TupletBracket #'staff-padding = #5 + \override TupletBracket #'padding = #2.25 + \override VerticalAxisGroup #'minimum-Y-extent = #'(10 . 10) + } << + + \new Voice \with { + \remove Forbid_line_break_engraver + \override Stem #'direction = #up + \override Stem #'stroke-style = #"grace" + \override Stem #'font-size = #-3 + \override Rest #'transparent = ##t + \override NoteHead #'no-ledgers = ##t + \override Dots #'transparent = ##t + \override TupletBracket #'transparent = ##t + \override TupletNumber #'transparent = ##t + } { + + % measure 6 + \fraction \times 5/3 { + \square f''16 * 1/8 % 40 + \square f''16 * 1/8 % 41 + \square f''16 * 1/8 % 42 + \square f''16 * 1/8 % 43 + \square f''16 * 1/8 % 44 + \square f''16 * 1/8 % 45 + \square f''16 * 1/8 % 46 + \square f''16 * 1/8 % 47 + \times 2/3 { + \square f''16 % 48 + \square f''16 * 1/2 % 49 + } + \times 2/3 { + \square f''16 * 1/4 % 50 + \square f''16 * 1/4 % 51 + \square f''16 * 1/4 % 52 + \square f''16 * 1/4 % 53 + \square f''16 * 1/4 % 54 + \square f''16 * 1/4 % 55 + } + } + + % measure 7 + s8 % 56 + \square g''16 * 2/1 % 57 + \square g''16 % 58 + \square g''16 % 59 + \times 8/9 { + s16 % 60 + f''16 * 1/4 % 61 + f''16 * 1/4 % 62 + f''16 * 1/4 % 63 + f''16 * 1/4 % 64 + f''16 * 1/4 % 65 + } + + % measure 8 + \times 4/5 { + \times 4/7 { + s4 % 66 + \triangle a''16 % 67 + \triangle a''16 % 68 + \triangle a''16 % 69 + } + s8 % 70 + \triangle a''16 * 1/2 % 71 + \triangle a''16 * 1/2 % 72 + \triangle a''16 * 1/2 % 73 + \triangle a''16 * 1/2 % 74 + \triangle a''16 * 1/2 % 75 + \triangle g''16 * 1/2 % 76 + \triangle g''16 * 1/2 % 77 + \triangle g''16 * 1/2 % 78 + } + + } + + \new Voice \with { + \remove Forbid_line_break_engraver + \override Stem #'transparent = ##t + \override Rest #'transparent = ##t + \override Rest #'staff-position = #-0.5 + \override Dots #'transparent = ##t + \override Beam #'transparent = ##t + \override TupletBracket #'transparent = ##t + \override TupletNumber #'transparent = ##t + } { + + % measure 6 + \fraction \times 5/3 { + \blackdiamond f'128 [ % 40 + \blackdiamond f'128 % 41 + \blackdiamond f'128 % 42 + \blackdiamond f'128 % 43 + \blackdiamond f'128 % 44 + \blackdiamond f'128 % 45 + \blackdiamond f'128 % 46 + \blackdiamond f'128 ] % 47 + \times 2/3 { + \blackdiamond f'16 % 48 + \blackdiamond f'32 % 49 + } + \times 2/3 { + \blackdiamond f'64 % 50 + \blackdiamond f'64 % 51 + \blackdiamond f'64 % 52 + \blackdiamond f'64 % 53 + \blackdiamond f'64 % 54 + \blackdiamond f'64 % 55 + } + } + + % measure 7 + s8 % 56 + \harmonic a'8 \glissando % 57 + \harmonic a'16 \glissando % 58 + \blackdiamond a'16 % 59 + \times 8/9 { + s16 % 60 + \harmonic g'64 \glissando % 61 + \harmonic g'64 \glissando % 62 + \harmonic g'64 \glissando % 63 + \harmonic g'64 \glissando % 64 + \blackdiamond g'64 % 65 + } + + % measure 8 + \times 4/5 { + \times 4/7 { + s4 % 66 + \blackdiamond f'16 % 67 + \blackdiamond f'16 % 68 + \blackdiamond f'16 % 69 + } + s8 % 70 + \blackdiamond f'32 % 71 + \blackdiamond f'32 % 72 + \blackdiamond f'32 % 73 + \blackdiamond f'32 % 74 + \blackdiamond f'32 % 75 + \harmonic e'32 \glissando % 76 + \harmonic e'32 \glissando % 77 + \blackdiamond e'32 % 78 + } + + } + + \new Voice \with { + \remove Forbid_line_break_engraver + \override Stem #'direction = #down + \override Stem #'font-size = #-3 + \override Stem #'stroke-style = #"grace" + \override Rest #'transparent = ##t + \override NoteHead #'no-ledgers = ##t + \override Dots #'transparent = ##t + \override TupletBracket #'transparent = ##t + \override TupletNumber #'transparent = ##t + } { + + % measure 6 + \fraction \times 5/3 { + s128 % 40 + s128 % 41 + s128 % 42 + s128 % 43 + s128 % 44 + s128 % 45 + s128 % 46 + s128 % 47 + \times 2/3 { + \semicircle a16 % 48 + \semicircle a16 * 1/2 % 49 + } + \times 2/3 { + \semicircle a16 * 1/4 % 50 + \semicircle a16 * 1/4 % 51 + \semicircle a16 * 1/4 % 52 + \semicircle a16 * 1/4 % 53 + \semicircle a16 * 1/4 % 54 + \semicircle a16 * 1/4 % 55 + } + } + + % measure 7 + s8 % 56 + s8 % 57 + s16 % 58 + \triangle a16 % 59 + \times 8/9 { + s16 % 60 + s64 % 61 + s64 % 62 + s64 % 63 + s64 % 64 + \triangle a16 * 1/4 % 65 + } + + % measure 8 + \times 4/5 { + \times 4/7 { + s4 % 66 + \semicircle a16 % 67 + \semicircle a16 % 68 + \semicircle a16 % 69 + } + s8 % 70 + \semicircle a16 * 1/2 % 71 + \semicircle a16 * 1/2 % 72 + \semicircle a16 * 1/2 % 73 + \semicircle a16 * 1/2 % 74 + \semicircle a16 * 1/2 % 75 + s32 % 76 + s32 % 77 + \semicircle a16 * 1/2 % 78 + } + + } + + \new Voice \with { + \remove Forbid_line_break_engraver + \override Stem #'direction = #down + \override NoteHead #'transparent = ##t + \override NoteHead #'no-ledgers = ##t + \override Rest #'staff-position = #-18 + \override Stem #'length = #10 + \override Beam #'positions = #'(-13 . -13) + \override DynamicLineSpanner #'staff-padding = #18 + \override TextSpanner #'(bound-details left text) = #(markup (#:italic "covered")) + \override TextSpanner #'dash-period = #1 + \override TextSpanner #'dash-fraction = #0.2 + \override TextSpanner #'(bound-details left padding) = #0.5 + \override TextSpanner #'(bound-details right padding) = #0.5 + \override TextSpanner #'staff-padding = #4 + } { + + % measure 6 + \fraction \times 5/3 { + \beam #0 #5 g,128 \sffp \< [ % 40 + \beam #5 #5 g,128 % 41 + \beam #5 #5 g,128 % 42 + \beam #5 #5 g,128 % 43 + \beam #5 #5 g,128 % 44 + \beam #5 #5 g,128 % 45 + \beam #5 #5 g,128 % 46 + \beam #5 #1 g,128 % 47 + \times 2/3 { + \beam #1 #2 g,16 % 48 + \beam #3 #1 g,32 \fX % 49 + } + \times 2/3 { + \beam #1 #4 g,64 \sffp \< % 50 + \beam #4 #4 g,64 % 51 + \beam #4 #4 g,64 % 52 + \beam #4 #4 g,64 % 53 + \beam #4 #4 g,64 % 54 + \beam #4 #0 g,64 \fX ] % 55 + } + } + + % measure 7 + r8 % 56 + g,8 \sf \< [ % 57 + g,16 % 58 + \beam #2 #0 g,16 \ffX ] % 59 + \times 8/9 { + r16 % 60 + \beam #4 #4 g,64 \sfp \< [ % 61 + \beam #4 #4 g,64 % 62 + \beam #4 #4 g,64 % 63 + \beam #4 #4 g,64 % 64 + \beam #4 #0 g,64 \fX ] % 65 + } + + % measure 8 + \times 4/5 { + \times 4/7 { + r4 % 66 + \beam #2 #2 g,16 \fX [ % 67 + \beam #2 #2 g,16 \f % 68 + \beam #2 #0 g,16 \fX ] % 69 + } + r8 % 70 + \beam #3 #3 g,32 \fX [ % 71 + \beam #3 #3 g,32 \fX % 72 + \beam #3 #3 g,32 \fX % 73 + \beam #3 #3 g,32 \fX % 74 + \beam #3 #3 g,32 \fX % 75 + \beam #3 #3 g,32 \sf \< % 76 + \beam #3 #3 g,32 % 77 + \beam #3 #0 g,32 \ffX ] % 78 + } + + } + >> + >> +>> diff --git a/Documentation/general/examples/chart.ly b/Documentation/general/examples/chart.ly new file mode 100644 index 0000000000..97df6e1d0e --- /dev/null +++ b/Documentation/general/examples/chart.ly @@ -0,0 +1,50 @@ +\version "2.12.0" +\include "example-header.ily" + + +\include "predefined-guitar-fretboards.ly" + +%lowerChords = { \override ChordName #'extra-offset = #'( 0.0 . -1.3 ) } + +global = { + \time 4/4 + \key bes \major + \numericTimeSignature + #(set-global-staff-size 20) +} + +melody = \relative c'' { + \key d \minor + \partial 4. + b4-. cis8 d4 r4 r8 cis d e %1 + \times 2/3 {f4 e d} e8 d4. %2 + g4. bes, ~ bes4 %3 +} + +harmonies = \chordmode { + %\lowerChords + s4. d1:m | d:7 | g1:m | % 1-3 +} + +text = \lyricmode { + We need words! We need some ly -- rics to go + with this tune! +} +%\header { +% title = "Lágrimas negras" +% composer = "Miguel Matamoros" +% poet = "arr. Jonathan Kulp" +% arranger = "1894-1971" +%} +% +\score { + << + \new ChordNames { \harmonies } + \new FretBoards { \harmonies } + \new Staff { + \context Voice = "vocal" { \melody } + } + \new Lyrics \lyricsto "vocal" \text + >> +} + diff --git a/Documentation/general/examples/example-header.ily b/Documentation/general/examples/example-header.ily new file mode 100644 index 0000000000..0817b74683 --- /dev/null +++ b/Documentation/general/examples/example-header.ily @@ -0,0 +1,20 @@ +\version "2.11.33" +\paper{ + indent=0\mm + ragged-last=##f + ragged-right=##f + line-width=158\mm % produces 624 pixels + oddFooterMarkup=##f + oddHeaderMarkup=##f + bookTitleMarkup = ##f + scoreTitleMarkup = ##f +} + +\layout { + \context { \Score + \override PaperColumn #'keep-inside-line = ##t + \override NonMusicalPaperColumn #'keep-inside-line = ##t + } +} + + diff --git a/Documentation/general/examples/granados.ly b/Documentation/general/examples/granados.ly new file mode 100644 index 0000000000..56d64dc400 --- /dev/null +++ b/Documentation/general/examples/granados.ly @@ -0,0 +1,144 @@ +\version "2.12.0" +\include "example-header.ily" + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% This is a brief passage from Enrique Granados % +% Goyescas, "Coloquio en la Reja." % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +#(set-global-staff-size 18) + +\paper { + ragged-right = ##f + #(set-paper-size "letter" 'landscape) + system-count = 1 +} + +csh = \change Staff = "high" +csm = \change Staff = "middle" +csl = \change Staff = "low" + +crmolto = \markup { \italic \large "cresc. molto" } +appassmolto = \markup { \italic \large "appassionato molto" } + +#(ly:set-option 'point-and-click #f) + +global = { + \time 3/4 + \set fontSize = #1 + \override Beam #'thickness = #0.5 + \override NoteColumn #'ignore-collision = ##t +} + +upperVoiceOne = \relative c'' { + \voiceOne + \override TupletBracket #'transparent = ##t + 8\([ \times 4/5{g'32( aes g f g]) } + 8[ \times 4/5{32( c' bes aes bes]) } + 8 \) | % end m. 1 + %--------------------------------------------------% + 4\( \voiceTwo \) + \slurUp 16( 8) % end m. 2 + %--------------------------------------------------% + \voiceOne + 8\([ \times 4/5{32( aes' g f g]) } + \set subdivideBeams = ##t + \set beatLength = #(ly:make-moment 1 8) + 16 \times 4/5{ bes'32( c bes aes bes]) } + \set subdivideBeams = ##f + \ottava #1 16 \appoggiatura f8 16\) +} + +upperVoiceTwo = \relative c'' { + \voiceTwo + s8 c8\< [ c' \!] + s32 s32_\appassmolto s8. \voiceOne r8 -> s4 + \override Stem #'cross-staff = ##t + \override Stem #'length = #28 + \override Stem #'flag-style = #'no-flag + s8 \voiceTwo g,8 aes4 s4 +} + +middleVoiceOne = \relative c' { + \override Stem #'cross-staff = ##t + \override Stem #'length = #32 + \override Stem #'flag-style = #'no-flag + d!8\noBeam s8 s8 s8_\crmolto s4 % 1 + s4 8[ ] \voiceOne e,8( dis16 e) | % 2 + \revert Stem #'length + \revert Stem #'cross-staff + \showStaffSwitch + \csh \stemUp f4 s2 + %s2. % beginning m. 3 +} + +middleVoiceTwo = \relative c' { + s2. | % 1 + \override Stem #'cross-staff = ##t + \override Stem #'length = #24 + \override Stem #'flag-style = #'no-flag + s2 \voiceTwo e!4 | % 2 + s4 \voiceTwo 8 16 d' 8 | % 3 +} + +lowerVoiceOne = \relative c, { + \override Staff.NoteCollision #'merge-differently-headed = ##t + \override Staff.NoteCollision #'merge-differently-dotted = ##t + bes8 \csm \stemDown 8 s2 + \csl \stemUp + \set subdivideBeams = ##t + \set beatLength = #(ly:make-moment 1 16) + s8 \hideNotes \slurUp \stemDown + es,,64( bes'' s64 \unHideNotes \stemUp g64[ bes c d c]) s2 + \set subdivideBeams = ##f + bes,,8 \csm \stemDown 8 s2 +} + +lowerVoiceTwo = \relative c, { + \voiceTwo + bes2. + \csh + \once \override Beam #'damping = #+inf.0 + 8 \csl \slurUp + %\once\override Slur #'extra-offset = #'(0 . 4) + es,,64 bes' es g s32. + c64 + s4 + bes,,2. +} + + +\score { + \new PianoStaff << + \set PianoStaff.connectArpeggios = ##t +% \override PianoStaff.Arpeggio #'stencil = #ly:arpeggio::brew-chord-bracket + \new Staff = "high" << + \global + \context Voice = "upperVoiceOne" { \upperVoiceOne } + \context Voice = "upperVoiceTwo" { \upperVoiceTwo } + >> + \new Staff = "middle" << + \global + \context Voice = "middleVoiceOne" { \middleVoiceOne } + \context Voice = "middleVoiceTwo" { \middleVoiceTwo } + >> + \new Staff = "low" << + \clef bass + \global + \context Voice = "lowerVoiceOne" { \lowerVoiceOne } + \context Voice = "lowerVoiceTwo" { \lowerVoiceTwo } + >> + >> + \layout { + \context { + \Score + \override TimeSignature #'stencil = ##f + \remove "Bar_number_engraver" + } + } + %{\midi { + \context { + \Score + tempoWholesPerMinute = #(ly:make-moment 120 4) + } + }%} +} diff --git a/Documentation/general/examples/sesto.ly b/Documentation/general/examples/sesto.ly new file mode 100644 index 0000000000..22fd907d04 --- /dev/null +++ b/Documentation/general/examples/sesto.ly @@ -0,0 +1,324 @@ +%%% G.F Haendel, Giulio Cesare in Egitto +%%% Act I, scene IV +%%% Sesto: Svegliatevi nel core, furie d'un alma offesa (excerpt) +%%% +%%% Nicolas Sceaux + +\version "2.12.2" +\header { + title = "Giulio Cesare in Egitto" + subtitle = "Sesto: Svegliatevi nel core, furie d'un alma offesa (excerpt)" + composer = "G.F Handel" +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% +%%% Notes and lyrics +%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +sesto = { + R1*6 | + r4 r8 g' c'' ees''16[ d''] c''8 c'' | + c'' g' ees''4 ~ ees''8 d''16 ees'' f''8 aes' | + aes' g' r c'' c'' b'16[ c''] d''8 g' | + %%10 + f'4 r8 d'' ees'' d''16[ c''] b'4 | + c'' r8 c'' c''8. c'16 c'4 | + r r8 c'' aes' c''16[ bes'] aes'8 g' | + f' f' r4 bes'8 bes'16 aes' g'8 f' | + ees' ees' r ees'' ees'' d''16[ ees''] f''8 bes' | + %%15 + aes'4. bes'8 g' ees'' f'4 | + ees' r8 ees'' ees''8. ees'16 ees'4 | + r r8 c'' c''8. c'16 c'4 | + r r8 c'' c'' d''16[ ees''] f''8 ees'' | + d'' bes' r4 bes'8 c''16 d'' ees''8 d'' | + %%20 + c'' c'' r c'' f' f''16[ ees''] d''8 c'' | + b'16[ a'] g'8 r4 ees''8 ees''16 d'' c''8 bes' | + aes' g' r g' aes' f' d'' b' | + f''2 ~ f''8 d'' b' g' | + ees'4 r8 d'' ees'' d''16[ c''] b'4 | + %%25 + c'' r8 g' c'' g' ees' g' | + c'4 r8 g' aes' f' d'' b' | + f''2 ~ f''8 d'' b' g' | + ees'4 r8 g'' ees'' d''16[ c''] b'4 | + c''2 r | + %%30 + R1*5 | +} + +sestoLyrics = \lyricmode { + Sve -- glia -- te -- vi nel co -- re, + fu -- rie "d'un" al -- "ma of" -- fe -- sa, + a far "d'un" tra -- di -- tor a -- spra ven -- det -- ta! + sve -- glia -- te -- vi, + sve -- glia te -- vi nel co -- re, + fu -- rie d'un al -- "ma of" -- fe -- sa, + a far "d'un" tra -- di -- tor as -- pra ven -- det -- ta, + sve -- glia -- te -- vi, + sve -- glia -- te -- vi, + sve -- glia -- te -- vi nel co -- re, + fu -- rie d'un al -- "ma of" -- fe -- sa, + sve -- glia -- te -- vi nel co -- re, + fu -- rie d'un al -- "ma of" -- fe -- sa, + a far d'un tra -- di -- tor, __ + d'un tra -- di -- tor as -- spra ven -- det -- ta, + a far d'un tra -- di -- tor, + a far d'un tra -- di -- tor, __ + d'un tra -- di -- tor as -- pra ven -- det -- ta! +} + +violinoI = { + r4 r8 g' c'' ees''16 d'' c''8 c'' | + c'' c' ees''4 ~ ees''8 d''16 ees'' f''8 aes' | + aes' g' r c'' c''8.^\trill b'32 c'' d''8 g' | + f'4. d''8 ees'' d''16 c'' b'4 | + %%5 + c''16 g'' f'' g'' ees'' g'' f'' g'' ees'' g'' f'' g'' ees'' g'' f'' g'' | + c'' g'' f'' g'' ees'' g'' f'' g'' aes''8 g''16 f'' f''4^\trill | + ees'' r8 g'_\p c'' ees''16 d'' c''8 c'' | + c'' g' ees''4 ~ ees''8 d''16 ees'' f''8 aes' | + aes' g' r c'' c'' b'16 c'' d''8 g' | + %%10 + f'4 r8 d'' ees'' d''16 c'' b'4 | + c''16 g'' f'' g'' ees'' g'' f'' g'' ees'' g'' f'' g'' ees'' g'' f'' g'' | + ees'' g'' f'' g'' ees'' g'' f'' g'' aes''8 aes' r4 | + d''16 f'' ees'' f'' d'' f'' ees'' f'' g''8 g' r4 | + ees'16 g' f' g' ees'8 ees'' ees'' d''16 ees'' f''8 bes' | + %%15 + aes'4. bes'8 g' ees'' d''4 | + ees''16 bes'' aes'' bes'' g'' bes'' aes'' bes'' g'' bes'' aes'' bes'' g'' bes'' aes'' bes'' | + g'' g'' f'' g'' ees'' g'' f'' g'' ees'' g'' f'' g'' ees'' g'' f'' g'' | + ees'' g'' f'' g'' ees'' g'' f'' g'' aes'' c'' c'' bes' aes' c'' bes' c'' | + d'' f'' ees'' f'' d'' f'' ees'' f'' g'' bes' bes' aes' g' bes' aes' bes' | + %%20 + c'' ees'' ees'' f'' g'' ees'' f'' g'' aes'' f'' g'' ees'' f'' d'' ees'' c'' | + \tag #'violin { g'' g' g'' g'' } \tag #'reduction { g'' d'' g'' g'' } g'' b' g'' g'' g'' f'' ees'' d'' c''8 bes' | + aes' g' r g' aes' f' d'' b' | + f''2 ~ f''8 d'' b' g' | + ees'16 c' g' ees' c'' g' g'' d'' g'4 r | + %%25 + c'''16 ees''' d''' ees''' c''' ees''' d''' ees''' g'' c''' b'' c''' g'' c''' b'' c''' | + ees'' g'' f'' g'' ees'' g'' f'' g'' \tag #'violin { aes'8 f' } \tag #'reduction { c''8 aes' } d'' b' | + f''2 ~ f''8 d'' b' g' | + ees'4^\fermata r r2 | + r4 r8 c'_\f c'' ees''16 d'' c''8 c'' | + %%30 + c'' c' ees''4 ~ ees''8 d''16 ees'' f''8 aes' | + aes' g' r g' aes' f' d'' b' | + f''2 ~ f''8 d'' b' g' | + c''16 g'' f'' g'' ees'' g'' f'' g'' c'' g'' f'' g'' ees'' g'' f'' g'' | + b'8 c''16 d'' ees''8 d'' c''4^\fermata r +} + +violinoII = { + r4 r8 g' c'' ees''16 d'' c''8 c'' | + c'' c' ees''4 ~ ees''8 d''16 ees'' f''8 aes' | + aes' g' r c'' c''8.^\trill b'32 c'' d''8 g' | + f'4. d''8 ees'' d''16 c'' b'4 | + %%5 + c''16 ees'' d'' ees'' c'' ees'' d'' ees'' c'' ees'' d'' ees'' c'' ees'' d'' ees'' | + c'' ees'' d'' ees'' c'' ees'' d'' ees'' d''8[ ees''] ees'' d'' | + ees''4 r8 g' c'' ees''16 d'' c''8 c'' | + c'' g' ees''4 ~ ees''8 d''16 ees'' f''8 aes' | + aes' g' r c'' c'' b'16 c'' d''8 g' | + %%10 + f'4 r8 d'' ees'' d''16 c'' b'4 | + c''16 ees'' d'' ees'' c'' ees'' d'' ees'' c'' ees'' d'' ees'' c'' ees'' d'' ees'' | + c'' ees'' d'' ees'' c'' ees'' d'' ees'' f''8 f' r4 | + bes'16 d'' c'' d'' bes' d'' c'' d'' ees''8 ees' r4 | + c'16 ees' d' ees' c'8 ees'' ees'' d''16 ees'' f''8 bes' | + %%15 + aes'4. bes'8 g' ees'' d''4 | + ees''16 g'' f'' g'' ees'' g'' f'' g'' ees'' g'' f'' g'' ees'' g'' f'' g'' | + ees'' ees'' d'' ees'' c'' ees'' d'' ees'' c'' ees'' d'' ees'' c'' ees'' d'' ees'' | + c'' ees'' d'' ees'' c'' ees'' d'' ees'' f'' aes' aes' g' f' aes' g' aes' | + bes' d'' c'' d'' bes' d'' c'' d'' ees'' g' g' f' ees' g' f' g' | + %%20 + aes' c'' c'' d'' ees'' c'' d'' ees'' f'' d'' ees'' c'' d'' b' c'' a' | + \tag #'violin { b' d' d' b' } \tag #'reduction { b' g' d'' b' } b' g' b' d'' g'' f'' ees'' d'' c''8 bes' | + d' ees' r g' aes' f' d'' b' | + f''2 ~ f''8 d'' b' g' | + ees'16 c' g' ees' c'' g' g'' d'' g'4 r | + %%25 + ees''16 g'' f'' g'' ees'' g'' f'' g'' ees'' ees'' d'' ees'' c'' ees'' d'' ees'' | + g' ees'' d'' ees'' c'' ees'' d'' ees'' \tag #'violin { c''8 aes' } \tag #'reduction { aes'8 f' } f' d' | + f''2 ~ f''8 d'' b' g' | + ees'4^\fermata r r2 | + r4 r8 c' c'' ees''16 d'' c''8 c'' | + %%30 + c'' c' ees''4 ~ ees''8 d''16 ees'' f''8 aes' | + aes' g' r g' aes' f' d'' b' | + f''2 ~ f''8 d'' b' g' | + c''16 ees'' d'' ees'' c'' ees'' d'' ees'' c'' ees'' d'' ees'' c'' ees'' d'' ees'' | + d'8 ees'16 f' g'8 b' c''4^\fermata r +} + +bassi = { + c4 r8 g c' ees'16 d' c'8 c' | + c' c r g aes f bes bes, | + ees ees, r c ees c g ees | + aes f d' b c' f g g, | + %%5 + c4 r c'8 c bes bes, | + aes aes, g g, f ees bes bes, | + ees4 r r r8 c_\p | + c' ees'16 d' c'8 bes aes f bes bes, | + ees ees, r c ees c g ees | + %%10 + aes f d' b c' f g g, | + c4 r r r8 c' | + c'8. c16 c4 r8 f d ees | + bes bes, r bes g aes bes g | + c' c c' bes16 aes g8 ees bes g | + %%15 + c' c d bes, ees g bes bes, | + ees4 r r r8 ees' | + ees'8. ees16 ees4 r r8 c' | + c'8. c16 c8 c' aes f r f | + bes bes, bes, bes g ees r ees | + %%20 + aes aes, g g, f f, r f | + g g, r4 c'8 g aes g | + f ees r4 r r8 g, | + aes, f, d b, aes f d' b | + c'4 r8 b c' f g g, | + %%25 + c' g c g, c,4 r | + c'8 g c c' f4 r8 g, | + aes, f, d b, aes f d' b | + c'4 r8 b c' f g g, | + c4 r8 c_\f c' ees'16 d' c'8 c' | + %%30 + c' c r g aes f bes bes, | + ees g ees c f,4 r8 g, | + aes, f, d b, aes f d' b | + c' c bes bes, aes aes, g g, | + f c g g, c4^\fermata r +} + +global = { + \key c \minor + \set Score . tempoWholesPerMinute = #(ly:make-moment (/ 80 4) 1 0 1) + \time 4/4 s1*34 \bar "|." +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% +%%% Lead sheet +%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\book { + \paper { + #(layout-set-staff-size 14) + } + \score { + \new StaffGroupNoBar << + \new StaffGroupNoBracket << + \new Staff << + \set Staff.instrumentName = "Violino I." + \global \clef treble \keepWithTag #'violin \violinoI + >> + \new Staff << + \set Staff.instrumentName = "Violino II." + \global \clef treble \keepWithTag #'violin \violinoII + >> + >> + \new Staff << + \new Voice = "sesto" \with { autoBeaming = ##f } << + \set Staff.instrumentName = \markup \smallCaps Sesto. + \global \clef treble \sesto + >> + \lyricsto "sesto" \new Lyrics \sestoLyrics + >> + \new Staff << + \set Staff.instrumentName = "Bassi." + \global \clef bass \bassi + >> + >> + \layout { + indent = 20\mm + \context { + \Score + \name Score +%% FIXME: vertical engine changed! +%% \override VerticalAlignment #'max-stretch = #ly:align-interface::calc-max-stretch + \accepts "StaffGroupNoBar" + skipBars = ##t + } + \context { + \StaffGroup + \name StaffGroupNoBar + \description "Like StaffGroup, but without spanbar" + \remove "Span_bar_engraver" + \accepts "StaffGroupNoBracket" + } + \context { + \StaffGroup + \name StaffGroupNoBracket + \description "Like StaffGroup, but without brackets" + \remove "System_start_delimiter_engraver" + } + } + \midi { } + } +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% +%%% Reduction +%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\book { + \header { instrument = "Vocal part and keyboard reduction" } + \paper { + #(layout-set-staff-size 16) + } + \score { + << + \new Staff << + \new Voice = "sesto" \with { autoBeaming = ##f } << + \set Staff.instrumentName = \markup \smallCaps Sesto. + \global \clef treble \sesto + >> + \lyricsto "sesto" \new Lyrics \sestoLyrics + >> + \new PianoStaff << + \new Staff << + \global \clef treble + \partcombine \keepWithTag #'reduction \violinoI \keepWithTag #'reduction \violinoII + >> + \new Staff << + \global \clef bass \bassi + >> + >> + >> + \layout { + indent = 20\mm + \context { \Voice printPartCombineTexts = ##f } + } + } +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% +%%% Violino I +%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\book { + \header { instrument = "Violino I" } + \paper { + #(layout-set-staff-size 18) + } + \score { + \new Staff << + \global \clef treble \keepWithTag #'violin \violinoI + >> + \layout { indent = 5\mm } + } +} diff --git a/Documentation/general/examples/theory.ly b/Documentation/general/examples/theory.ly new file mode 100644 index 0000000000..57ef2f5d4a --- /dev/null +++ b/Documentation/general/examples/theory.ly @@ -0,0 +1,63 @@ +\version "2.12.0" +\include "example-header.ily" + +#(ly:set-option 'point-and-click #f) + +global = { + \time 4/4 + \numericTimeSignature + \key c \major + #(set-global-staff-size 24) +} + +cf = \relative c { + \clef bass + \global + c4 c' b a | + g a f d | + e f g g, | + c1 +} + +upper = \relative c'' { + \global + r4 s4 s2 | + s1*2 | + s2 s4 s + \bar "||" +} + +bassFigures = \figuremode { + s1*2 | s4 <6> <6 4> <7> | s1 +} + +\markup { "Exercise 3: Write 8th notes against the given bass line." } + +\score { + \new PianoStaff << + \new Staff { + \context Voice = "added voice" \with { + \consists "Balloon_engraver" + } + \upper + } + + \new Staff = lower { + << +% \context Voice = "cantus firmus" \with { +% \consists "Balloon_engraver" +% } + \context Staff = lower \cf + \new FiguredBass \bassFigures + >> + } + >> + \layout {} + %{\midi { + \context { + \Score + tempoWholesPerMinute = #(ly:make-moment 120 4) + } + }%} +} +