[Top][All Lists]

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

Re: Tweaking glissando timing stems

From: Leo Correia de Verdier
Subject: Re: Tweaking glissando timing stems
Date: Mon, 14 Oct 2019 12:22:15 +0200

Thank you very much!

Since I’m not very experienced with either lilypond or programming in general 
this will be a lot for me to break up, understand and work with, but it 
contains most of what I need. Now I’ll go and do my homework for some days (or 
even longer). In some time I’ll be back with results, whether they’ll be usable 
or not remains to be seen. The beams are needed for it to be really useful for 
me, but I’ll give script positions, slur positions and ability to handle broken 
glissandi at least some thought too. 

When you write that "inner beams positions can’t be affected from 
Glissando.after-line-breaking", do you mean it’s impossible, that they would 
need to be recreated rather than repositioned or just that the actual code 
can’t handle them yet?


> 13 okt. 2019 kl. 19:23 skrev Thomas Morley <address@hidden>:
> Am Do., 10. Okt. 2019 um 14:51 Uhr schrieb Leo Correia de Verdier
> <address@hidden>:
>> 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 also.
>> %%%%%%%%%
>> \version "2.19.82"
>> glissNote = #(define-music-function (up y-diff note) (boolean? number? 
>> ly:music?)
>>               #{ \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
>>                 \parenthesize
>>                 #rest #} )
>> glissSkip = #(define-music-function (music) (ly:music?)
>>               #{ \override NoteColumn.glissando-skip = ##t
>>                  #music
>>                  \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!
>> /Leo
> Hi Leo,
> the topic of glissando-stems pops up from time to time.
> See older discussions, p.e. here:
> Some time ago I started to code something in this regard and took your
> request to polish it a bit.
> Though, there are still some TODOs:
> - Scripts are not always positioned nicely.
> - "Inner" beams 'positions can't be affected from 
> Glissando.after-line-breaking.
> etc
> Furthermore I'm not sure the whole approach fits your needs.
> Nevertheless the code is attached, probably you'll find the
> calculation for "gliss-stem-intersections" helpful.
> Cheers,
>  Harm

Description: Text Data

PNG image


reply via email to

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