From: Neil Puttock Date: Wed, 16 Sep 2009 21:16:15 +0000 (+0100) Subject: LSR: Update. X-Git-Tag: release/2.13.4-1~34 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e5048547efdbbc521afb7b81aace6363cbd48510;p=lilypond.git LSR: Update. --- 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 index 0000000000..a69f4f9ce4 --- /dev/null +++ b/Documentation/snippets/bar-chords-notation-for-guitar--with-text-spanner.ly @@ -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" { 16[ c' d c d8] } } diff --git a/Documentation/snippets/chords.snippet-list b/Documentation/snippets/chords.snippet-list index 5e3faa9387..1a4e21fc19 100644 --- a/Documentation/snippets/chords.snippet-list +++ b/Documentation/snippets/chords.snippet-list @@ -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 diff --git a/Documentation/snippets/expressive-marks.snippet-list b/Documentation/snippets/expressive-marks.snippet-list index 4623b3ab15..abed115afd 100644 --- a/Documentation/snippets/expressive-marks.snippet-list +++ b/Documentation/snippets/expressive-marks.snippet-list @@ -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 diff --git a/Documentation/snippets/fretted-strings.snippet-list b/Documentation/snippets/fretted-strings.snippet-list index dd669fd5ba..28202de031 100644 --- a/Documentation/snippets/fretted-strings.snippet-list +++ b/Documentation/snippets/fretted-strings.snippet-list @@ -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 index 0000000000..76ffbcd037 --- /dev/null +++ b/Documentation/snippets/guitar-slides.ly @@ -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 + } + >> +} diff --git a/Documentation/snippets/quoting-another-voice.ly b/Documentation/snippets/quoting-another-voice.ly index fd4c44d069..d24db260d8 100644 --- a/Documentation/snippets/quoting-another-voice.ly +++ b/Documentation/snippets/quoting-another-voice.ly @@ -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 index 0000000000..82e1b686e5 --- /dev/null +++ b/Documentation/snippets/showing-the-same-articulation-above-and-below-a-note-or-chord.ly @@ -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{} + +" + 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! + ^\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:" + + + + +} + diff --git a/Documentation/snippets/tweaks-and-overrides.snippet-list b/Documentation/snippets/tweaks-and-overrides.snippet-list index b0c1876012..8b18ef718b 100644 --- a/Documentation/snippets/tweaks-and-overrides.snippet-list +++ b/Documentation/snippets/tweaks-and-overrides.snippet-list @@ -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