lilypond-user
[Top][All Lists]
Advanced

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

Re: Slurs inside a beam


From: David F.
Subject: Re: Slurs inside a beam
Date: Sun, 12 Aug 2018 20:56:12 -0600

On Aug 12, 2018, at 8:24 AM, Thomas Morley <address@hidden> wrote:

> 2018-08-12 3:31 GMT+02:00 Andrew Bernard <address@hidden>:
>> Hi David,
>> 
>> One way to do it:
>> 
>> \version "2.19"
>> 
>> {
>>  <c'\=1( a'\=2^(>8. <d'\=1) b'\=2)>16
>> }
>> 
>> 
>> From the Changes page:
>> 
>> A new command \=X has been added – where ‘X’ can be any non-negative integer
>> or symbol – so that a specific ‘id’ can be assigned to the start and end of
>> slurs and phrasing slurs.
>> 
>> This is useful when simultaneous slurs are required or if one slur overlaps
>> another or when nesting short slurs within a longer one.
>> 
>> Andrew
>> 
>> 
>> 
>> On Sun, 12 Aug 2018 at 06:31, David F. <address@hidden> wrote:
>>> 
>>> While we’re on the topic of bending slurs to our will, I’d like for
>>> slurred, beamed eighth notes to have the slur printed below or inside the
>>> beam.  This works with a simple ^~ for ties.  How might I accomplish this?
>>> 
> 
> Some background.
> Slurred notes or chords will have their left/right bound set to the
> respective NoteColumn.
> As long as NoteColumns are the bounds, I see no possibility to get
> Slurs "inside" of a Beam (with equal direction for both)
> 
> In-chord Slurs bounds are NoteHeads.
> Thus Andrew's coding above works.
> 
> Another possibility would be to reset bounds for certain Slurs from
> NoteColumn to selected NoteHead:
> 
> #(define (buzz lb rb)
> (lambda (grob)
>  (let* ((left-bound (ly:spanner-bound grob LEFT))
>         (left-nhs-array
>           (ly:grob-object left-bound 'note-heads))
>         (left-nhs
>           (if (ly:grob-array? left-nhs-array)
>               (sort
>                 (ly:grob-array->list left-nhs-array)
>                 (lambda (p q)
>                   (ly:pitch<?
>                     (ly:prob-property (ly:grob-property p 'cause) 'pitch)
>                     (ly:prob-property (ly:grob-property p 'cause) 'pitch))))
>               '()))
>         (right-bound (ly:spanner-bound grob RIGHT))
>         (right-nhs-array
>           (ly:grob-object right-bound 'note-heads))
>         (right-nhs
>           (if (ly:grob-array? right-nhs-array)
>               (sort
>                 (ly:grob-array->list right-nhs-array)
>                 (lambda (p q)
>                   (ly:pitch<?
>                     (ly:prob-property (ly:grob-property p 'cause) 'pitch)
>                     (ly:prob-property (ly:grob-property p 'cause) 'pitch))))
>               '())))
>    (ly:spanner-set-bound! grob LEFT (list-ref left-nhs lb))
>    (ly:spanner-set-bound! grob RIGHT (list-ref right-nhs rb)))))
> 
> {
>  <g' b'>8[-\tweak before-line-breaking #(buzz 1 1) ^\=1(_\=2(
>  <a' c''>]\=1)\=2)
> }
> 
> Making for a different syntax.
> 
> The lower Slur looks nicer, imho
> The upper Slur still needs shaping (with \shape or \shapeII or Aaron's
> coding or whatever)
> 
> Cheers,
>  Harm

Thanks for your explanation, Harm.  But I’m not familiar enough with Lilypond 
internals to completely understand what’s going on here.

In particular, I don’t understand what’s different about beamed notes versus 
non-beamed notes that make this all so tricky.  For example, two slurred 
quarter notes have a perfectly placed slur.  If those two quarter notes were 
beamed just as they are (making them eighth notes, obviously) everything would 
be just fine.

\version "2.19"
{
    e'4 ^( a'4 )  % Two slurred quarter notes.  A beam would fit just fine over 
the slur.
    e'8 [ ^( a'8 ) ]  % Two beamed eighth notes with the slur above the beam
}

Is there a change in the representation between a quarter note and a beamed 
note that prevents slurred beamed notes from being constructed just like 
slurred quarter notes?

Apologies in advance for my ignorance.

David




reply via email to

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