\version "2.19.82" %% After %% http://lilypond.1069038.n5.nabble.com/Glissando-on-single-note-in-chords-tt34672.html#a34676 %% Printing Glissando between Fingerings is initialized by the new introduced %% subproperty: %% Glissando.details.finger-slides (a boolean, default is #f) %% %% Which Glissando between Finerings is printed (as a line) %% could be selected via 'glissandoMap' or the provided 'connectGliss' %% %% Selecting which Glissando should become a bow is done with (not selected %% ones are dropped): %% Glissando.details.bow-glissando-indices (a number-list, default #f) %% %% The bow is further customizable modifing the newly introduced %% Glissando.bound-details.left.y-padding (a numerical value, default is 1) %% Glissando.bound-details.right.y-padding (a numerical value, default is 1) %% %% The other known subproperties may still be modified. #(define (replace-gliss-with-tie which) (lambda (grob) (let* ((gliss-count (ly:grob-property grob 'glissando-index)) (sign (lambda (x) (if (= x 0) 0 (if (< x 0) -1 1))))) (if (member gliss-count which) (let* ((sys (ly:grob-system grob)) (left-bound (ly:spanner-bound grob LEFT)) (left-coord (ly:grob-relative-coordinate left-bound sys X)) (right-bound (ly:spanner-bound grob right)) (right-coord (ly:grob-relative-coordinate right-bound sys X)) (left-bound-info (ly:grob-property grob 'left-bound-info)) (left-padding (assoc-get 'padding left-bound-info)) (Y-left (assoc-get 'Y left-bound-info)) (X-left (assoc-get 'X left-bound-info)) (y-left-padding (assoc-get 'y-padding left-bound-info 1)) (right-bound-info (ly:grob-property grob 'right-bound-info)) (Y-right (assoc-get 'Y right-bound-info)) (right-padding (assoc-get 'padding right-bound-info)) (X-right (assoc-get 'X right-bound-info)) (y-right-padding (assoc-get 'y-padding right-bound-info 1)) (thick (ly:grob-property grob 'thickness 0.12))) (make-tie-stencil (cons (- X-left left-coord left-padding) (+ Y-left (* y-left-padding (sign Y-left)))) (cons (- X-right left-coord (- right-padding)) (+ Y-right (* y-right-padding (sign Y-left)))) thick (if (negative? Y-left) DOWN UP))) #f)))) fingeringSlideEngraver = #(lambda (context) (let ((glissandi '()) (fingerings '())) (make-engraver (acknowledgers ((glissando-interface engraver grob source-engraver) (let* ((details (ly:grob-property grob 'details)) (slides? (assoc-get 'finger-slides details #f)) (which-bow-gliss (assoc-get 'bow-glissando-indices details #f))) (if slides? (set! glissandi (cons grob glissandi))) (if (and which-bow-gliss slides? (pair? fingerings)) (ly:grob-set-property! grob 'stencil (replace-gliss-with-tie which-bow-gliss))))) ((finger-interface engraver grob source-engraver) (set! fingerings (cons grob fingerings)))) ((stop-translation-timestep translator) (for-each (lambda (gliss) (for-each (lambda (finger) (if (eq? (ly:spanner-bound gliss LEFT) (ly:grob-parent finger X)) (ly:spanner-set-bound! gliss LEFT finger)) (if (eq? (ly:spanner-bound gliss RIGHT) (ly:grob-parent finger X)) (begin (ly:spanner-set-bound! gliss RIGHT finger) (set! glissandi (remove (lambda (x) (eq? x gliss)) glissandi))))) fingerings)) glissandi) (set! fingerings '()))))) \layout { \context { \Voice \consists \fingeringSlideEngraver } } %% \set glissandoMap = #'(pair-1 pair-2) ended with \unset glissandoMap is %% more flexible but not really needed for the fingeringSlideEngraver, thus: connectGliss = #(define-music-function (which)(number-list?) #{ \set glissandoMap = #(map (lambda (w) (cons w w)) which) #}) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% EXAMPLES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%{ m = \relative c'' { 4\glissando 4\glissando \bar "||" } { %% default behaviour \m %% activate slides for fingerings \override Glissando.details.finger-slides = ##t \m %% select certain glissandos, drop the other \connectGliss 0 \m \connectGliss 1 \m \unset glissandoMap \break %% bowed slides, select with the provided list, unsuitable list-settings %% will be ignored \override Glissando.details.bow-glissando-indices = #'(0 1) \m \override Glissando.details.bow-glissando-indices = #'(0) \m \override Glissando.details.bow-glissando-indices = #'(1) \m %% line-breaks and skipping NoteColumns \override Glissando.details.bow-glissando-indices = #'(0 1) \override Glissando.breakable = ##t \override Glissando.after-line-breaking = ##f 1\glissando \once \override NoteColumn.glissando-skip = ##t \break 1 } { \voiceOne \acciaccatura { e''16 \override Glissando.details.finger-slides = ##t \override Glissando.details.bow-glissando-indices = #'(0 1) % some custom-tweakings \once \override Glissando.bound-details.left.padding = 0.3 \once \override Glissando.bound-details.left.y-padding = 0.7 \once \override Glissando.bound-details.right.y-padding = 0.8 \glissando } 8 1\glissando }