[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tweaking glissando timing stems

From: Leo Correia de Verdier
Subject: Tweaking glissando timing stems
Date: Thu, 10 Oct 2019 14:51:15 +0200

Dear list!

I'm soon going to start engraving a piece that contains very many glissandi 
with timing marks (or actually, glissandi with broken bowing and articulations 
during the way). The snippet in
 mentions the stems might need to be repositioned slightly, and I was wondering 
if this would be possible to automate. 

I realize this will be complicated, since it (as I understand it at least) will 
require changing stem lengths and notehead attachments after the horizontal 
spacing is calculated (possibly changing pitches too, but the solution I’m 
imagining would not do that). So I would need to access the calculated 
positions of the stems and of the endpoints of the glissando. Is that possible? 
Where and what do I need to read up to accomplish it? Or has someone already 
done something similar? 

I have seen Piaras Hobans code in this thread: , and 
it’s interesting for me, but it relies on the stems being equally spaced, which 
they shouldn’t be in my case.

In the following example I’m looking for a way to calculate up and y-diff in 
the glissNote function, instead of having to type them in by hand after looking 
at the resulting score. (The gap between the stems and glissando-line is 
intentional, the articulation positioning is just not done yet). I have not 
done it minimal because I wanted to give a glimpse of the point of the notation 


\version "2.19.82"

glissNote = #(define-music-function (up y-diff note) (boolean? number? 
               #{ \tweak transparent ##t
                  \tweak no-ledgers ##t
                  \tweak stem-attachment #(cons (if up -1 1) y-diff)
                  #note #} )

glissRest = #(define-music-function (staff-position rest) (number? ly:music?)
               #{ \tweak Y-offset #staff-position 
                 \tweak layer #-1 
                 \tweak whiteout #10 
                 #rest #} )

glissSkip = #(define-music-function (music) (ly:music?)
               #{ \override NoteColumn.glissando-skip = ##t
                  \revert NoteColumn.glissando-skip #} )

\relative c'' {
  \time 6/8
  \set glissandoMap = #'((1 . 1))
  <a f'>16-> -\tweak layer #-2 \glissando
  \glissSkip {
    <a \glissNote ##f #.5 f'>8-. <a \glissNote ##f #0.3 f'>16-. <a \glissNote 
##f #.1 f'>8->
    << {\glissRest #2.5 r8 s4} \\
       {d,8_-_> <a' \glissNote ##f #-0.4 f'>^.  <a \glissNote ##f #-.6 f'>^.} >>
  \time 2/4 <a a'>2--


Thanks a lot!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]