From e666b65d07cdb880a98c6960386d2b0e8cf4f6d5 Mon Sep 17 00:00:00 2001 From: Neil Puttock Date: Mon, 31 Aug 2009 21:39:37 +0100 Subject: [PATCH] LSR: Local update. --- Documentation/snippets/clip-systems.ly | 13 +-- .../dynamics-custom-text-spanner-postfix.ly | 34 +++++++ .../snippets/dynamics-text-spanner-postfix.ly | 35 ++++++++ .../snippets/expressive-marks.snippet-list | 2 + Documentation/snippets/new/clip-systems.ly | 88 +++++++++++++++++++ .../dynamics-custom-text-spanner-postfix.ly | 7 +- .../new/dynamics-text-spanner-postfix.ly | 7 +- .../tweaks-and-overrides.snippet-list | 2 + 8 files changed, 178 insertions(+), 10 deletions(-) create mode 100644 Documentation/snippets/dynamics-custom-text-spanner-postfix.ly create mode 100644 Documentation/snippets/dynamics-text-spanner-postfix.ly create mode 100644 Documentation/snippets/new/clip-systems.ly diff --git a/Documentation/snippets/clip-systems.ly b/Documentation/snippets/clip-systems.ly index cf590a0d33..eb29f204cf 100644 --- a/Documentation/snippets/clip-systems.ly +++ b/Documentation/snippets/clip-systems.ly @@ -1,6 +1,7 @@ -%% Do not edit this file; it is automatically -%% generated from LSR http://lsr.dsi.unimi.it -%% This file is in the public domain. +% Do not edit this file; it is automatically +% generated from Documentation/snippets/new +% This file is in the public domain. +%% Note: this file works from version 2.13.4 \version "2.13.4" \header { @@ -30,8 +31,9 @@ are generated. doctitle = "Clip systems" } % begin verbatim + #(ly:set-option 'clip-systems) -#(set! output-count 1) +#(define output-suffix "1") origScore = \score { \relative c' { @@ -74,8 +76,8 @@ origScore = \score { } } -#(set! output-count 0) #(ly:set-option 'clip-systems #f) +#(define output-suffix #f) \book { \score { \origScore } @@ -89,4 +91,3 @@ origScore = \score { } } } - diff --git a/Documentation/snippets/dynamics-custom-text-spanner-postfix.ly b/Documentation/snippets/dynamics-custom-text-spanner-postfix.ly new file mode 100644 index 0000000000..af2cd3b97a --- /dev/null +++ b/Documentation/snippets/dynamics-custom-text-spanner-postfix.ly @@ -0,0 +1,34 @@ +% Do not edit this file; it is automatically +% generated from Documentation/snippets/new +% This file is in the public domain. +%% Note: this file works from version 2.13.4 +\version "2.13.4" + +\header { + lsrtags = "expressive-marks, tweaks-and-overrides" + texidoc = "Postfix functions for custom crescendo text spanners. The spanners +should start on the first note of the measure. One has to use -\mycresc, +otherwise the spanner start will rather be assigned to the next note. +" + doctitle = "Dynamics custom text spanner postfix" +} % begin verbatim + + +% Two functions for (de)crescendo spanners where you can explicitly give the +% spanner text. +mycresc = #(define-music-function (parser location mymarkup) (string?) + (make-music 'CrescendoEvent 'span-direction START + 'span-type 'text 'span-text mymarkup)) +mydecresc = #(define-music-function (parser location mymarkup) (string?) + (make-music 'DecrescendoEvent 'span-direction START + 'span-type 'text 'span-text mymarkup)) + +\relative c' { + c4-\mycresc "custom cresc" c4 c4 c4 | + c4 c4 c4 c4 | + c4-\mydecresc "custom decresc" c4 c4 c4 | + c4 c4\! c4 c4 +} + + + diff --git a/Documentation/snippets/dynamics-text-spanner-postfix.ly b/Documentation/snippets/dynamics-text-spanner-postfix.ly new file mode 100644 index 0000000000..d563039d4c --- /dev/null +++ b/Documentation/snippets/dynamics-text-spanner-postfix.ly @@ -0,0 +1,35 @@ +% Do not edit this file; it is automatically +% generated from Documentation/snippets/new +% This file is in the public domain. +%% Note: this file works from version 2.13.4 +\version "2.13.4" + +\header { + lsrtags = "expressive-marks, tweaks-and-overrides" + texidoc = "The \cresc, \dim and \decresc spanners can now be redefined as +postfix operators and produce one text spanner. Defining custom spanners is +also easy. Hairpin and text crescendi can be easily mixed. \< and \> produce +hairpins by default, \cresc etc. produce text spanners by default. +" + doctitle = "Dynamics text spanner postfix" +} % begin verbatim + + +% Some sample text dynamic spanners, to be used as postfix operators +crpoco = #(make-music 'CrescendoEvent 'span-direction START + 'span-type 'text 'span-text "cresc. poco a poco") +% Redefine the existing \cresc, \dim and \decresc commands to use postfix syntax +cresc = #(make-music 'CrescendoEvent 'span-direction START + 'span-type 'text 'span-text "cresc.") +dim = #(make-music 'DecrescendoEvent 'span-direction START + 'span-type 'text 'span-text "dim.") +decresc = #(make-music 'DecrescendoEvent 'span-direction START + 'span-type 'text 'span-text "decresc.") + +\relative c' { + c4\cresc d4 e4 f4 | + g4 a4\! b4\crpoco c4 | + c4 d4 e4 f4 | + g4 a4\! b4\< c4 | + g4\dim a4 b4\decresc c4\! +} diff --git a/Documentation/snippets/expressive-marks.snippet-list b/Documentation/snippets/expressive-marks.snippet-list index 8ad1661a62..4623b3ab15 100644 --- a/Documentation/snippets/expressive-marks.snippet-list +++ b/Documentation/snippets/expressive-marks.snippet-list @@ -21,6 +21,8 @@ creating-simultaneous-rehearsal-marks.ly creating-slurs-across-voices.ly creating-text-spanners.ly double-glissando.ly +dynamics-custom-text-spanner-postfix.ly +dynamics-text-spanner-postfix.ly hiding-the-extender-line-for-text-dynamics.ly horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly inserting-a-caesura.ly diff --git a/Documentation/snippets/new/clip-systems.ly b/Documentation/snippets/new/clip-systems.ly new file mode 100644 index 0000000000..064bd69eb7 --- /dev/null +++ b/Documentation/snippets/new/clip-systems.ly @@ -0,0 +1,88 @@ +\version "2.13.4" + +\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" +} + +#(ly:set-option 'clip-systems) +#(define output-suffix "1") + +origScore = \score { + \relative c' { + \set Staff.instrumentName = #"bla" + 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 parser)) } + } + } +} diff --git a/Documentation/snippets/new/dynamics-custom-text-spanner-postfix.ly b/Documentation/snippets/new/dynamics-custom-text-spanner-postfix.ly index f3f26b0cf2..1afa020950 100644 --- a/Documentation/snippets/new/dynamics-custom-text-spanner-postfix.ly +++ b/Documentation/snippets/new/dynamics-custom-text-spanner-postfix.ly @@ -1,9 +1,12 @@ \version "2.13.4" \header { -texidoc = "Postfix functions for custom crescendo text spanners. The spanners + lsrtags = "expressive-marks, tweaks-and-overrides" + texidoc = "Postfix functions for custom crescendo text spanners. The spanners should start on the first note of the measure. One has to use -\mycresc, -otherwise the spanner start will rather be assigned to the next note." +otherwise the spanner start will rather be assigned to the next note. +" + doctitle = "Dynamics custom text spanner postfix" } % Two functions for (de)crescendo spanners where you can explicitly give the diff --git a/Documentation/snippets/new/dynamics-text-spanner-postfix.ly b/Documentation/snippets/new/dynamics-text-spanner-postfix.ly index 2b1044c670..8f6a852833 100644 --- a/Documentation/snippets/new/dynamics-text-spanner-postfix.ly +++ b/Documentation/snippets/new/dynamics-text-spanner-postfix.ly @@ -1,10 +1,13 @@ \version "2.13.4" \header { -texidoc = "The \cresc, \dim and \decresc spanners can now be redefined as + lsrtags = "expressive-marks, tweaks-and-overrides" + texidoc = "The \cresc, \dim and \decresc spanners can now be redefined as postfix operators and produce one text spanner. Defining custom spanners is also easy. Hairpin and text crescendi can be easily mixed. \< and \> produce -hairpins by default, \cresc etc. produce text spanners by default." +hairpins by default, \cresc etc. produce text spanners by default. +" + doctitle = "Dynamics text spanner postfix" } % Some sample text dynamic spanners, to be used as postfix operators diff --git a/Documentation/snippets/tweaks-and-overrides.snippet-list b/Documentation/snippets/tweaks-and-overrides.snippet-list index e16028cf65..b0c1876012 100644 --- a/Documentation/snippets/tweaks-and-overrides.snippet-list +++ b/Documentation/snippets/tweaks-and-overrides.snippet-list @@ -18,6 +18,8 @@ display-bracket-with-only-one-staff-in-a-system.ly dotted-harmonics.ly drawing-boxes-around-grobs.ly drawing-circles-around-various-objects.ly +dynamics-custom-text-spanner-postfix.ly +dynamics-text-spanner-postfix.ly fine-tuning-pedal-brackets.ly forcing-horizontal-shift-of-notes.ly fret-diagrams-explained-and-developed.ly -- 2.39.5