From 76c0ae855bb516651ce8df4759fed60ada60c753 Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Sat, 14 Jul 2007 09:54:53 -0700 Subject: [PATCH] LSR: new snippets. --- input/lsr/ancient/ancient-accidentals.ly | 24 ++++++++++++ ...ing-an-individual-notes-size-in-a-chord.ly | 28 ++++++++++++++ ...ne-autobeamsettings-in-the--layout-bloc.ly | 38 +++++++++++++++++++ ...ng-the--char-function-in-a--markup-text.ly | 31 +++++++++++++++ 4 files changed, 121 insertions(+) create mode 100644 input/lsr/ancient/ancient-accidentals.ly create mode 100644 input/lsr/chords/changing-an-individual-notes-size-in-a-chord.ly create mode 100644 input/lsr/connecting/how-to-define-autobeamsettings-in-the--layout-bloc.ly create mode 100644 input/lsr/text/how-to-avoid-spaces-when-using-the--char-function-in-a--markup-text.ly diff --git a/input/lsr/ancient/ancient-accidentals.ly b/input/lsr/ancient/ancient-accidentals.ly new file mode 100644 index 0000000000..6e6cd7a26d --- /dev/null +++ b/input/lsr/ancient/ancient-accidentals.ly @@ -0,0 +1,24 @@ +%% Do not edit this file; it is auto-generated from LSR! +\version "2.11.23" + +\header { texidoc = " +Accidentals are available in different ancient styles, which all are +collected here. + + +" } + +\relative c'' { + \time 5/4 + \override Staff.Accidental #'glyph-name-alist = #alteration-default-glyph-name-alist + cisis^\markup { \typewriter default } cis c ces ceses + \override Staff.Accidental #'glyph-name-alist = #alteration-hufnagel-glyph-name-alist + cisis^\markup { \typewriter hufnagel } cis c ces ceses + \override Staff.Accidental #'glyph-name-alist = #alteration-medicaea-glyph-name-alist + cisis^\markup { \typewriter medicaea } cis c ces ceses + \override Staff.Accidental #'glyph-name-alist = #alteration-vaticana-glyph-name-alist + cisis^\markup { \typewriter vaticana } cis c ces ceses + \override Staff.Accidental #'glyph-name-alist = #alteration-mensural-glyph-name-alist + cisis^\markup { \typewriter mensural } cis c ces ceses +} + diff --git a/input/lsr/chords/changing-an-individual-notes-size-in-a-chord.ly b/input/lsr/chords/changing-an-individual-notes-size-in-a-chord.ly new file mode 100644 index 0000000000..a7f03331bf --- /dev/null +++ b/input/lsr/chords/changing-an-individual-notes-size-in-a-chord.ly @@ -0,0 +1,28 @@ +%% Do not edit this file; it is auto-generated from LSR! +\version "2.11.23" + +\header { texidoc = " +Individual noteheads in a chord can be modified with the @code{\tweak} +command inside a chord, by altering the @code{'font-size} property. + + +Inside the chord (within the brackets @code{< >}), before the note to +be altered, place the @code{\tweak} command, followed by +@code{#'font-size} and define the proper size like @code{#-2} (a tiny +notehead). + + +The code for the chord example shown: @code{} +" } + +\header{ + title = "Modify an individual notehead's size in a chord" +} + +Notes = \relative { + <\tweak #'font-size #+2 c e g c \tweak #'font-size #-2 e>1^\markup{A tiny e}_\markup{A big c} +} + +\score{ + \Notes +} diff --git a/input/lsr/connecting/how-to-define-autobeamsettings-in-the--layout-bloc.ly b/input/lsr/connecting/how-to-define-autobeamsettings-in-the--layout-bloc.ly new file mode 100644 index 0000000000..0e48aea73f --- /dev/null +++ b/input/lsr/connecting/how-to-define-autobeamsettings-in-the--layout-bloc.ly @@ -0,0 +1,38 @@ +%% Do not edit this file; it is auto-generated from LSR! +\version "2.11.23" + +\header { texidoc = " +If you need to modify the automatic beaming behaviour (see \"Setting +automatic beam behavior\") in the \layout bloc, here is a simple way to +do it. + + +" } + +\layout { + \context { + \DrumStaff + % set the beam division after 1/4 and after 3/4 (after 2/4 is default) + autoBeamSettings = #'((cons (cons '(end * * * *) (ly:make-moment 1 4)) + default-auto-beam-settings) + (cons (cons '(end * * * *) (ly:make-moment 3 4)) + default-auto-beam-settings) + ) + } + } + + up = \drummode {hh8 hh hh hh hh hh hh hh} %%No manual beaming indication, as you can see + + down = \drummode { + \override Beam #'positions = #'(-5 . -5) + bd8. bd16 sn16 bd8 bd16 r8 bd8 sn16 bd8. + } + + \new DrumStaff { + + << + \new DrumVoice { \voiceOne \up } + \new DrumVoice { \voiceTwo \down } +>> + + } diff --git a/input/lsr/text/how-to-avoid-spaces-when-using-the--char-function-in-a--markup-text.ly b/input/lsr/text/how-to-avoid-spaces-when-using-the--char-function-in-a--markup-text.ly new file mode 100644 index 0000000000..ece5d4f37a --- /dev/null +++ b/input/lsr/text/how-to-avoid-spaces-when-using-the--char-function-in-a--markup-text.ly @@ -0,0 +1,31 @@ +%% Do not edit this file; it is auto-generated from LSR! +\version "2.11.23" + +\header { texidoc = " +When you need to enter special characters using the \char command, an +unwanted space can appear before the character. You can avoid it by +adding the \concat command. + +In this snippet, we want to insert below the staff, using +<\char #'249> to get the correct last character in piu, but there's a +space between and . Thanks to the \concat command, the space +disappears. +" } + +\layout { + ragged-right = ##t +} + + +{ + c'1^\markup "Without \concat" | + d'2_\markup {{\italic{"pi"\char #'249 }}{\dynamic {" f"}}} c'2 | +} + +%%%% Please uncomment the following lines as soon as +%%%% we are using LilyPond 2.11.x + +%{ + % c'1^\markup "With \concat" | + % d'2_\markup { \italic { \concat { "pi" \char #'249 } }{\dynamic{" f"}}} c'2 | +%} -- 2.39.5