From f37eec88b296a56513dfbede73536852f7264e20 Mon Sep 17 00:00:00 2001 From: Neil Puttock Date: Tue, 31 Mar 2009 17:22:00 +0100 Subject: [PATCH] LSR: Update. --- input/lsr/aligning-bar-numbers.ly | 32 +++++++++++++++++ input/lsr/contexts-and-engravers.snippet-list | 1 + input/lsr/modern-tab-text-clef.ly | 2 +- ...tioning-grace-notes-with-floating-space.ly | 32 +++++++++++++++++ ...inting-bar-numbers-at-regular-intervals.ly | 27 +++++++++++++++ ...ing-bar-numbers-inside-boxes-or-circles.ly | 34 +++++++++++++++++++ .../redefining-grace-note-global-defaults.ly | 34 +++++++++++++++++++ .../lsr/removing-bar-numbers-from-a-score.ly | 26 ++++++++++++++ input/lsr/rhythms.snippet-list | 8 +++++ .../lsr/tweaking-grace-layout-within-music.ly | 28 +++++++++++++++ input/lsr/tweaks-and-overrides.snippet-list | 1 + ...ng-grace-note-slashes-with-normal-heads.ly | 19 +++++++++++ input/new/modern-tab-text-clef.ly | 2 +- .../new/tweaking-grace-layout-within-music.ly | 25 ++++++++++++++ 14 files changed, 269 insertions(+), 2 deletions(-) create mode 100644 input/lsr/aligning-bar-numbers.ly create mode 100644 input/lsr/positioning-grace-notes-with-floating-space.ly create mode 100644 input/lsr/printing-bar-numbers-at-regular-intervals.ly create mode 100644 input/lsr/printing-bar-numbers-inside-boxes-or-circles.ly create mode 100644 input/lsr/redefining-grace-note-global-defaults.ly create mode 100644 input/lsr/removing-bar-numbers-from-a-score.ly create mode 100644 input/lsr/tweaking-grace-layout-within-music.ly create mode 100644 input/lsr/using-grace-note-slashes-with-normal-heads.ly create mode 100644 input/new/tweaking-grace-layout-within-music.ly diff --git a/input/lsr/aligning-bar-numbers.ly b/input/lsr/aligning-bar-numbers.ly new file mode 100644 index 0000000000..f79ecc2c77 --- /dev/null +++ b/input/lsr/aligning-bar-numbers.ly @@ -0,0 +1,32 @@ +%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it +%% This file is in the public domain. +\version "2.13.1" + +\header { + lsrtags = "rhythms" + + texidoc = " +Bar numbers by default are right-aligned to their parent object. This +is usually the left edge of a line or, if numbers are printed within a +line, the left hand side of a bar line. The numbers may also be +positioned directly over the bar line or left-aligned to the bar line. + +" + doctitle = "Aligning bar numbers" +} % begin verbatim + +\relative c' { + \set Score.currentBarNumber = #111 + \override Score.BarNumber #'break-visibility = #'#(#t #t #t) + % Increase the size of the bar number by 2 + \override Score.BarNumber #'font-size = #2 + % Print a bar number every second measure + \set Score.barNumberVisibility = #(every-nth-bar-number-visible 2) + c1 | c1 + % Center-align bar numbers + \override Score.BarNumber #'self-alignment-X = #CENTER + c1 | c1 + % Left-align bar numbers + \override Score.BarNumber #'self-alignment-X = #LEFT + c1 | c1 +} diff --git a/input/lsr/contexts-and-engravers.snippet-list b/input/lsr/contexts-and-engravers.snippet-list index e8c484113e..0fefd9fdd0 100644 --- a/input/lsr/contexts-and-engravers.snippet-list +++ b/input/lsr/contexts-and-engravers.snippet-list @@ -8,5 +8,6 @@ creating-blank-staves.ly engravers-one-by-one.ly mensurstriche-layout-bar-lines-between-the-staves.ly nesting-staves.ly +removing-bar-numbers-from-a-score.ly use-square-bracket-at-the-start-of-a-staff-group.ly vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly diff --git a/input/lsr/modern-tab-text-clef.ly b/input/lsr/modern-tab-text-clef.ly index 8a0ded1c16..1e49132c56 100644 --- a/input/lsr/modern-tab-text-clef.ly +++ b/input/lsr/modern-tab-text-clef.ly @@ -28,6 +28,6 @@ TAB = \markup { \new TabStaff { \override Staff.Clef #'stencil = #(lambda (grob) - ly:clef::print (grob-interpret-markup grob TAB)) + (grob-interpret-markup grob TAB)) a } diff --git a/input/lsr/positioning-grace-notes-with-floating-space.ly b/input/lsr/positioning-grace-notes-with-floating-space.ly new file mode 100644 index 0000000000..5068f62997 --- /dev/null +++ b/input/lsr/positioning-grace-notes-with-floating-space.ly @@ -0,0 +1,32 @@ +%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it +%% This file is in the public domain. +\version "2.13.1" + +\header { + lsrtags = "rhythms" + + texidoc = " +Setting the property @code{'strict-grace-spacing} makes the musical +columns for grace notes 'floating', i.e., decoupled from the non-grace +notes: first the normal notes are spaced, then the (musical columns of +the) graces are put left of the musical columns for the main notes. + +" + doctitle = "Positioning grace notes with floating space" +} % begin verbatim + +\relative c'' { + << + \override Score.SpacingSpanner #'strict-grace-spacing = ##t + \new Staff \new Voice { + \afterGrace c4 { c16[ c8 c16] } + c8[ \grace { b16[ d] } c8] + c4 r + } + \new Staff { + c16 c c c c c c c c4 r + } + >> +} + + diff --git a/input/lsr/printing-bar-numbers-at-regular-intervals.ly b/input/lsr/printing-bar-numbers-at-regular-intervals.ly new file mode 100644 index 0000000000..d0411a7ca9 --- /dev/null +++ b/input/lsr/printing-bar-numbers-at-regular-intervals.ly @@ -0,0 +1,27 @@ +%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it +%% This file is in the public domain. +\version "2.13.1" + +\header { + lsrtags = "rhythms" + + texidoc = " +Bar numbers can be printed at regular intervals by setting the property +@code{barNumberVisibility}. Here the bar numbers are printed every two +measures except at the end of the line. + +" + doctitle = "Printing bar numbers at regular intervals" +} % begin verbatim + +\relative c' { + \override Score.BarNumber #'break-visibility = #'#(#f #t #t) + \set Score.currentBarNumber = #11 + % Permit first bar number to be printed + \bar "" + % Print a bar number every second measure + \set Score.barNumberVisibility = #(every-nth-bar-number-visible 2) + c1 | c | c | c | c + \break + c1 | c | c | c | c +} diff --git a/input/lsr/printing-bar-numbers-inside-boxes-or-circles.ly b/input/lsr/printing-bar-numbers-inside-boxes-or-circles.ly new file mode 100644 index 0000000000..0f30c0928c --- /dev/null +++ b/input/lsr/printing-bar-numbers-inside-boxes-or-circles.ly @@ -0,0 +1,34 @@ +%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it +%% This file is in the public domain. +\version "2.13.1" + +\header { + lsrtags = "rhythms, tweaks-and-overrides" + + texidoc = " +Bar numbers can also be printed inside boxes or circles. + + + +" + doctitle = "Printing bar numbers inside boxes or circles" +} % begin verbatim + +\relative c'{ + % Prevent bar numbers at the end of a line and permit them elsewhere + \override Score.BarNumber #'break-visibility = #end-of-line-invisible + \set Score.barNumberVisibility = #(every-nth-bar-number-visible 4) + + % Increase the size of the bar number by 2 + \override Score.BarNumber #'font-size = #2 + + % Draw a box round the following bar number(s) + \override Score.BarNumber #'stencil + = #(make-stencil-boxer 0.1 0.25 ly:text-interface::print) + \repeat unfold 5 { c1 } + + % Draw a circle round the following bar number(s) + \override Score.BarNumber #'stencil + = #(make-stencil-circler 0.1 0.25 ly:text-interface::print) + \repeat unfold 4 { c1 } \bar "|." +} diff --git a/input/lsr/redefining-grace-note-global-defaults.ly b/input/lsr/redefining-grace-note-global-defaults.ly new file mode 100644 index 0000000000..49950650a4 --- /dev/null +++ b/input/lsr/redefining-grace-note-global-defaults.ly @@ -0,0 +1,34 @@ +%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it +%% This file is in the public domain. +\version "2.13.1" + +\header { + lsrtags = "rhythms" + + texidoc = " +The global defaults for grace notes are stored in the identifiers +@code{startGraceMusic}, @code{stopGraceMusic}, +@code{startAcciaccaturaMusic}, @code{stopAcciaccaturaMusic}, +@code{startAppoggiaturaMusic} and @code{stopAppoggiaturaMusic}, which +are defined in the file @code{ly/grace-init.ly}. By redefining them +other effects may be obtained. + +" + doctitle = "Redefining grace note global defaults" +} % begin verbatim + +startAcciaccaturaMusic = { + s1*0( + \override Stem #'stroke-style = #"grace" + \slurDashed +} + +stopAcciaccaturaMusic = { + \revert Stem #'stroke-style + \slurSolid + s1*0) +} + +\relative c'' { + \acciaccatura d8 c1 +} diff --git a/input/lsr/removing-bar-numbers-from-a-score.ly b/input/lsr/removing-bar-numbers-from-a-score.ly new file mode 100644 index 0000000000..e3c8fdc6a0 --- /dev/null +++ b/input/lsr/removing-bar-numbers-from-a-score.ly @@ -0,0 +1,26 @@ +%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it +%% This file is in the public domain. +\version "2.13.1" + +\header { + lsrtags = "rhythms, contexts-and-engravers" + + texidoc = " +Bar numbers can be removed entirely by removing the +@code{Bar_number_engraver} from the @code{Score} context. + +" + doctitle = "Removing bar numbers from a score" +} % begin verbatim + +\layout { + \context { + \Score + \remove "Bar_number_engraver" + } +} + +\relative c'' { + c4 c c c \break + c4 c c c +} diff --git a/input/lsr/rhythms.snippet-list b/input/lsr/rhythms.snippet-list index bdcc20533d..e2022dc783 100644 --- a/input/lsr/rhythms.snippet-list +++ b/input/lsr/rhythms.snippet-list @@ -1,5 +1,6 @@ adding-beams,-slurs,-ties-etc.-when-using-tuplet-and-non-tuplet-rythms..ly adding-drum-parts.ly +aligning-bar-numbers.ly automatic-beam-subdivisions.ly automatic-beams-two-per-two-in-4-4-or-2-2-time-signature.ly avoiding-collisions-with-chord-fingerings.ly @@ -31,10 +32,15 @@ modifying-tuplet-bracket-length.ly multi--measure-rest-markup.ly non-default-tuplet-numbers.ly permitting-line-breaks-within-beamed-tuplets.ly +positioning-grace-notes-with-floating-space.ly positioning-multi--measure-rests.ly +printing-bar-numbers-at-regular-intervals.ly +printing-bar-numbers-inside-boxes-or-circles.ly printing-metronome-and-rehearsal-marks-below-the-staff.ly printing-music-with-different-time-signatures.ly printing-the-bar-number-for-the-first-measure.ly +redefining-grace-note-global-defaults.ly +removing-bar-numbers-from-a-score.ly rest-styles.ly reverting-default-beam-endings.ly rhythmic-slashes.ly @@ -44,5 +50,7 @@ specifying-context-with-beatgrouping.ly stemlets.ly sub-dividing-beams.ly three-sided-box.ly +tweaking-grace-layout-within-music.ly using-beatlength-and-beatgrouping.ly +using-grace-note-slashes-with-normal-heads.ly using-ties-with-arpeggios.ly diff --git a/input/lsr/tweaking-grace-layout-within-music.ly b/input/lsr/tweaking-grace-layout-within-music.ly new file mode 100644 index 0000000000..0a84b025dd --- /dev/null +++ b/input/lsr/tweaking-grace-layout-within-music.ly @@ -0,0 +1,28 @@ +%% Do not edit this file; it is auto-generated from input/new +%% This file is in the public domain. +\version "2.13.1" + +\header { + lsrtags = "rhythms" + texidoc = " +The layout of grace expressions can be changed throughout the +music using the functions @code{add-grace-property} and +@code{remove-grace-property}. The following example undefines +the @code{Stem} direction for this grace, so that stems do not +always point up, and changes the default note heads to crosses. +" + doctitle = "Tweaking grace layout within music" +} % begin verbatim + + +\relative c'' { + \new Staff { + #(remove-grace-property 'Voice 'Stem 'direction) + #(add-grace-property 'Voice 'NoteHead 'style 'cross) + \new Voice { + \acciaccatura { f16 } g4 + \grace { d16[ e] } f4 + \appoggiatura { f,32[ g a] } e2 + } + } +} diff --git a/input/lsr/tweaks-and-overrides.snippet-list b/input/lsr/tweaks-and-overrides.snippet-list index fdd1591de6..dd9f7b06b5 100644 --- a/input/lsr/tweaks-and-overrides.snippet-list +++ b/input/lsr/tweaks-and-overrides.snippet-list @@ -33,6 +33,7 @@ percent-repeat-count-visibility.ly positioning-multi--measure-rests.ly positioning-text-markups-inside-slurs.ly printing-a-repeat-sign-at-the-beginning-of-a-piece.ly +printing-bar-numbers-inside-boxes-or-circles.ly printing-metronome-and-rehearsal-marks-below-the-staff.ly proportional-strict-notespacing.ly removing-the-first-empty-line.ly diff --git a/input/lsr/using-grace-note-slashes-with-normal-heads.ly b/input/lsr/using-grace-note-slashes-with-normal-heads.ly new file mode 100644 index 0000000000..c0dd8956a3 --- /dev/null +++ b/input/lsr/using-grace-note-slashes-with-normal-heads.ly @@ -0,0 +1,19 @@ +%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it +%% This file is in the public domain. +\version "2.13.1" + +\header { + lsrtags = "rhythms" + + texidoc = " +The slash through the stem found in acciaccaturas can be applied in +other situations. + +" + doctitle = "Using grace note slashes with normal heads" +} % begin verbatim + +\relative c'' { + \override Stem #'stroke-style = #"grace" + c8( d2) e8( f4) +} diff --git a/input/new/modern-tab-text-clef.ly b/input/new/modern-tab-text-clef.ly index fa7dadee7d..ff165ad28b 100644 --- a/input/new/modern-tab-text-clef.ly +++ b/input/new/modern-tab-text-clef.ly @@ -25,6 +25,6 @@ TAB = \markup { \new TabStaff { \override Staff.Clef #'stencil = #(lambda (grob) - ly:clef::print (grob-interpret-markup grob TAB)) + (grob-interpret-markup grob TAB)) a } diff --git a/input/new/tweaking-grace-layout-within-music.ly b/input/new/tweaking-grace-layout-within-music.ly new file mode 100644 index 0000000000..8459c9c133 --- /dev/null +++ b/input/new/tweaking-grace-layout-within-music.ly @@ -0,0 +1,25 @@ +\version "2.12.0" + +\header { + lsrtags = "rhythms" + texidoc = " +The layout of grace expressions can be changed throughout the +music using the functions @code{add-grace-property} and +@code{remove-grace-property}. The following example undefines +the @code{Stem} direction for this grace, so that stems do not +always point up, and changes the default note heads to crosses. +" + doctitle = "Tweaking grace layout within music" +} + +\relative c'' { + \new Staff { + #(remove-grace-property 'Voice 'Stem 'direction) + #(add-grace-property 'Voice 'NoteHead 'style 'cross) + \new Voice { + \acciaccatura { f16 } g4 + \grace { d16[ e] } f4 + \appoggiatura { f,32[ g a] } e2 + } + } +} -- 2.39.5