]> git.donarmstrong.com Git - lilypond.git/commitdiff
LSR: Update.
authorNeil Puttock <n.puttock@gmail.com>
Wed, 16 Sep 2009 21:16:15 +0000 (22:16 +0100)
committerNeil Puttock <n.puttock@gmail.com>
Wed, 16 Sep 2009 21:16:15 +0000 (22:16 +0100)
Documentation/snippets/bar-chords-notation-for-guitar--with-text-spanner.ly [new file with mode: 0644]
Documentation/snippets/chords.snippet-list
Documentation/snippets/expressive-marks.snippet-list
Documentation/snippets/fretted-strings.snippet-list
Documentation/snippets/guitar-slides.ly [new file with mode: 0644]
Documentation/snippets/quoting-another-voice.ly
Documentation/snippets/showing-the-same-articulation-above-and-below-a-note-or-chord.ly [new file with mode: 0644]
Documentation/snippets/tweaks-and-overrides.snippet-list

diff --git a/Documentation/snippets/bar-chords-notation-for-guitar--with-text-spanner.ly b/Documentation/snippets/bar-chords-notation-for-guitar--with-text-spanner.ly
new file mode 100644 (file)
index 0000000..a69f4f9
--- /dev/null
@@ -0,0 +1,87 @@
+%% Do not edit this file; it is automatically
+%% generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.4"
+
+\header {
+  lsrtags = "chords, fretted-strings"
+
+  texidoc = "
+Here is how to print bar chords, or half-bar chords (just uncomment the
+appropriate line for to select either one).
+
+The syntax is @code{\\bbarre #'fret_number' @{ notes @} }
+
+
+
+
+"
+  doctitle = "Bar chords notation for Guitar ( with Text Spanner)"
+} % begin verbatim
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% %%%%%%%  Cut here ----- Start 'bbarred.ly'
+
+%% PostScript -------------------------------
+pScript= \markup {
+       \with-dimensions #'(0 . 0.8) #'(0 . 2.0)
+       \postscript     #"
+       0.15 setlinewidth
+       /Times-Roman findfont
+       2.0 scalefont
+       setfont
+       (C)show %%change with B if you prefer
+       %(B)show %%change with C if you prefer
+       stroke
+       0.7 -0.5 moveto
+       0.7  1.7 lineto
+       stroke"
+}
+%% Span -----------------------------------
+%% Syntax: \bbarre #"text" { notes } - text = any number of box
+bbarre= #(define-music-function (barre location str music) (string? ly:music?)
+           (let ((spanned-music
+                   (let ((first-element #f)
+                         (last-element #f)
+                         (first-found? #f))
+                     (music-map (lambda (m)
+                                  (if (eqv? (ly:music-property m 'name) 'EventChord)
+                                      (begin
+                                        (if (not first-found?)
+                                            (begin
+                                              (set! first-found? #t)
+                                              (set! first-element m)))
+                                        (set! last-element m)))
+                                  m)
+                                music)
+                     (if first-found?
+                         (begin
+                           (set! (ly:music-property first-element 'elements)
+                                 (cons (make-music 'TextSpanEvent 'span-direction -1)
+                                       (ly:music-property first-element 'elements)))
+                           (set! (ly:music-property last-element 'elements)
+                                 (cons (make-music 'TextSpanEvent 'span-direction 1)
+                                       (ly:music-property last-element 'elements)))))
+                     music)))
+             (make-music 'SequentialMusic
+               'origin location
+               'elements (list #{
+                       \once \override TextSpanner #'font-size = #-2
+                       \once \override TextSpanner #'font-shape = #'upright
+                       \once \override TextSpanner #'staff-padding = #3
+                       \once \override TextSpanner #'style = #'line
+                        \once \override TextSpanner #'to-barline = ##f
+                        \once \override TextSpanner #'bound-details =  #'((left (Y . 0) (padding . 0.25) (attach-dir . -2)) (right (Y . 0) (padding . 0.25) (attach-dir . 2)))
+                        \once  \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'( 0 . -.5) }
+                        \once  \override TextSpanner #'bound-details #'left #'text =  \markup { \pScript $str }
+%% uncomment this line for make full barred
+                       % \once  \override TextSpanner #'bound-details #'left #'text =  \markup { "B" $str }
+                          #}
+    spanned-music))))
+
+%% %%%%%%%  Cut here ----- End 'bbarred.ly'
+%% Copy and change the last line for full barred. Rename in 'fbarred.ly'
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Syntaxe: \bbarre #"text" { notes } - text = any number of box
+\relative c'{ \clef "G_8" \stemUp \bbarre #"III" { <f a'>16[  c' d c d8] } }
index 5e3faa93877a7ebe010fc9afb0665364ab8fffbb..1a4e21fc199dcae251c4e3a7fe53a32d1ba01dd4 100644 (file)
@@ -1,6 +1,7 @@
 adding-a-figured-bass-above-or-below-the-notes.ly
 adding-bar-lines-to-chordnames-context.ly
 avoiding-collisions-with-chord-fingerings.ly
+bar-chords-notation-for-guitar--with-text-spanner.ly
 changing-chord-separator.ly
 changing-the-chord-names-to-german-or-semi-german-notation.ly
 changing-the-positions-of-figured-bass-alterations.ly
index 4623b3ab150a4db5eabd6a188a86faa442a12465..abed115afd7f921bfad8c9dd2e265c7d02699781 100644 (file)
@@ -36,6 +36,7 @@ printing-hairpins-using-al-niente-notation.ly
 printing-metronome-and-rehearsal-marks-below-the-staff.ly
 setting-hairpin-behavior-at-bar-lines.ly
 setting-the-minimum-length-of-hairpins.ly
+showing-the-same-articulation-above-and-below-a-note-or-chord.ly
 snap-pizzicato-bartok-pizzicato.ly
 using-double-slurs-for-legato-chords.ly
 vertical-line-as-a-baroque-articulation-mark.ly
index dd669fd5ba70da0ecf7fc39fcb1e056b2cad6c8a..28202de031549b8fd0add62272508dab2c4218f3 100644 (file)
@@ -1,6 +1,7 @@
 adding-fingerings-to-a-score.ly
 adding-fingerings-to-tablatures.ly
 allowing-fingerings-to-be-printed-inside-the-staff.ly
+bar-chords-notation-for-guitar--with-text-spanner.ly
 chordchanges-for-fretboards.ly
 controlling-the-placement-of-chord-fingerings.ly
 customizing-fretboard-fret-diagrams.ly
@@ -10,6 +11,7 @@ faking-a-hammer-in-tablatures.ly
 fingerings,-string-indications,-and-right-hand-fingerings.ly
 flamenco-notation.ly
 fret-diagrams-explained-and-developed.ly
+guitar-slides.ly
 guitar-strum-rhythms.ly
 how-to-change-fret-diagram-position.ly
 jazz-combo-template.ly
diff --git a/Documentation/snippets/guitar-slides.ly b/Documentation/snippets/guitar-slides.ly
new file mode 100644 (file)
index 0000000..76ffbcd
--- /dev/null
@@ -0,0 +1,48 @@
+%% Do not edit this file; it is automatically
+%% generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.4"
+
+\header {
+  lsrtags = "fretted-strings"
+
+  texidoc = "
+Unlike glissandos, slides may go from an imprecise point of the
+fretboard to a specific fret. A good way to do that is to add a grace
+hidden note before the note which is actually played, as demonstrated
+in the following example.
+
+
+
+
+"
+  doctitle = "Guitar slides"
+} % begin verbatim
+
+%% Hide fret number: useful to draw slide into/from a casual point of
+%% the fretboard.
+hideFretNumber = { \once \override TabNoteHead #'transparent = ##t
+                 \once \override NoteHead #'transparent = ##t
+                 \once \override Stem #'transparent = ##t
+}
+
+music= \relative c' {
+      \grace { \hideFretNumber d8\2 \glissando s2 } g2\2
+      \grace { \hideFretNumber g8\2 \glissando s2 } d2 |
+
+      \grace { \hideFretNumber c,8 \glissando s } f4\5^\markup \tiny "Slide into"
+      \grace { \hideFretNumber f8 \glissando s } a4\4
+      \grace { \hideFretNumber e'8\3 \glissando s } b4\3^\markup \tiny "Slide from"
+      \grace { \hideFretNumber b'8 \glissando s2 } g4 |
+    }
+
+\score {
+  <<
+    \new Staff {
+      \music
+    }
+    \new TabStaff {
+      \music
+    }
+  >>
+}
index fd4c44d06931a575940fd288051744157cec31f0..d24db260d8270fb16e4949058aec59e62f8b5c8d 100644 (file)
@@ -35,12 +35,16 @@ sich @code{rest-event} nicht in @code{quotedEventTypes} befindet.
 
   texidoc = "
 The @code{quotedEventTypes} property determines the music event types
-that are quoted.  The default value is @code{(note-event rest-event)},
-which means that only notes and rests of the quoted voice appear in the
-@code{\\quoteDuring} expression. In the following example, a 16th rest
-is not quoted since @code{rest-event} is not in
+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
diff --git a/Documentation/snippets/showing-the-same-articulation-above-and-below-a-note-or-chord.ly b/Documentation/snippets/showing-the-same-articulation-above-and-below-a-note-or-chord.ly
new file mode 100644 (file)
index 0000000..82e1b68
--- /dev/null
@@ -0,0 +1,49 @@
+%% Do not edit this file; it is automatically
+%% generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.4"
+
+\header {
+  lsrtags = "expressive-marks, tweaks-and-overrides"
+
+  texidoc = "
+By default, LilyPond does not allow the same articulation (e.g. an
+accent, a fermata, a flageolet, etc.) to be displayed above and below a
+note. For example, c4_\\fermata^\\fermata will only show a fermata
+below. The fermata above will simply be ignored. However, one can stick
+scripts (just like fingerings) inside a chord, which means it is
+possible to have as many articulations as desired. This approach has
+the advantage that it ignores the stem and positions the articulation
+relative to the note head. This can be seen in the case of the
+flageolets in the snippet. To mimic the behaviour of scripts outside a
+chord, 'add-stem-support would be required. So, the solution is to
+write the note as a chord and add the articulations inside the <...>.
+The direction will always be above, but one can tweak this via a
+\\tweak: @code{<c-\\tweak #'direction #DOWN-\\fermata^\\fermata>}
+
+"
+  doctitle = "Showing the same articulation above and below a note or chord"
+} % begin verbatim
+
+% The same as \flageolet, just a little smaller
+smallFlageolet =
+#(let ((m (make-music 'ArticulationEvent 'articulation-type "flageolet")))
+   (ly:music-set-property! m 'tweaks
+     (acons 'font-size -2 (ly:music-property m 'tweaks)))
+  m)
+
+\relative c' {
+  s4^"wrong:"
+  c_\fermata^\fermata % The second fermata is ignored!
+  <e d'>^\smallFlageolet_\smallFlageolet
+
+  % it works only if you wrap the note inside a chord. By default,
+  % all articulations will be printed above, so you have to tweak
+  % the direction.
+  s4^"Works if written inside a chord:"
+  <e-\tweak #'direction #DOWN -\smallFlageolet d'^\smallFlageolet>
+  <e-\tweak #'direction #DOWN -\flageolet d'^\flageolet>
+  <e-\tweak #'direction #DOWN -\smallFlageolet^\smallFlageolet>
+  <e-\tweak #'direction #DOWN -\fermata^\fermata>
+}
+
index b0c1876012e63829eb9de9a491513ef35760bb2f..8b18ef718b770ea3190824367b7daa96bfbf9e9c 100644 (file)
@@ -43,6 +43,7 @@ rest-styles.ly
 rhythmic-slashes.ly
 separating-key-cancellations-from-key-signature-changes.ly
 setting-hairpin-behavior-at-bar-lines.ly
+showing-the-same-articulation-above-and-below-a-note-or-chord.ly
 string-number-extender-lines.ly
 suppressing-warnings-for-clashing-note-columns.ly
 time-signature-in-parentheses.ly