Sorry, too fast:
#(define (add-gliss m)
(case (ly:music-property m 'name)
((NoteEvent) (set! (ly:music-property m 'articulations)
(append (ly:music-property m 'articulations)
(list (make-music (quote GlissandoEvent)))))
m)
(else #f)))
addGliss = #(define-music-function (music)(ly:music?) (map-some-music add-gliss music))
equal-staff-stems =
%%% =>
http://lilypond.1069038.n5.nabble.com/Stem-length-at-a-fixed-height-td172661.html#a172686#(define-music-function (val)(number?)
#{
\override Stem.direction =
#(lambda (grob)
(if (negative? val)
DOWN
UP))
\override Stem.after-line-breaking =
#(lambda (grob)
(let* ((stem-begin-position (ly:grob-property grob 'stem-begin-position)))
;; the override for Beam.positions counts from staff-position 0
;; thus we need to go there for the (unbeamed) stem-length as well
;; beam-thickness is taken from
engraver-init.ly:
(ly:grob-set-property! grob
'length
(+ (if (negative? val)
stem-begin-position
(- stem-begin-position))
(* (abs val) 2)
;; beam-thickness:
0.32))))
\override Beam.positions = #(cons val val)
#})
%%% So, here it goes:
\score {
\new Staff \relative {
\addGliss {
e'8[ g b g e d' e,]
}
}
\layout {
\override NoteHead.transparent =##t
\equal-staff-stems #6
\override Stem.avoid-note-head =##t
\override Glissando.minimum-length = #3
\override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods
\override Glissando.thickness = #4
\override Glissando.bound-details =#'(
(right (attach-dir . 1) (padding . 0))
(left (attach-dir . 1) (padding . 0)))
\override NoteHead.no-ledgers = ##t
\stemUp
}
}