glissando

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

glissando

Gianmaria Lari
Attached to this email a screenshot of the result of this code

\version "2.21.0"
\fixed c'' { 
  \override Glissando.style = #'zigzag
  c \glissando \hideNotes c, \unHideNotes d e f 
}

I would like that c is the first quarter, d the second quarter, e the third quarter and so on but because of the "glissando", d is shifted one quarter forward. How can I shift d e f a quarter back?

My apologies for my very imprecise english.
g.


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: glissando

Colin Campbell-8
On 2019-04-01 5:28 p.m., Gianmaria Lari wrote:
> Attached to this email a screenshot of the result of this code
>
>     \version "2.21.0"
>     \fixed c'' {
>       \override Glissando.style = #'zigzag
>       c \glissando \hideNotes c, \unHideNotes d e f
>     }
>

I think that \bendAfter #-4 (replacing  \glissando ... \unHideNotes) may
be part of the solution, but I don't know how to change the stencil to a
zig-zag.

HTH,

Colin

--
One of the advantages of being disorderly is that one is constantly
making exciting discoveries.
- A. A. Milne, From the Daryl R. Gibson collection

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: glissando

Toine Schreurs-3
In reply to this post by Gianmaria Lari
Try

\version "2.21.0"
\fixed c'' {
  \override Glissando.style = #'zigzag
  c4*1/2 \glissando \hideNotes c,4*1/2 \unHideNotes d4 e f
}

Toine Schreurs

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: glissando

Aaron Hill
In reply to this post by Colin Campbell-8
On 2019-04-01 5:15 pm, Colin Campbell wrote:

> On 2019-04-01 5:28 p.m., Gianmaria Lari wrote:
>> Attached to this email a screenshot of the result of this code
>>
>>     \version "2.21.0"
>>     \fixed c'' {
>>       \override Glissando.style = #'zigzag
>>       c \glissando \hideNotes c, \unHideNotes d e f
>>     }
>>
>
> I think that \bendAfter #-4 (replacing  \glissando ... \unHideNotes)
> may be part of the solution, but I don't know how to change the
> stencil to a zig-zag.

Here's an attempt to change the stencil along with comparisons to other
techniques:

%%%%
\version "2.19.82"

\fixed c'' {
   %% Glissando to invisible note.
   \override Glissando.style = #'zigzag
   c4*1/2 \glissando \hideNotes c, \unHideNotes d4 e f

   %% Glissando in second voice.
   << { \oneVoice c d e f } \\
      { \override Glissando.style = #'zigzag
        \hideNotes c \glissando c, s s } >>

   %% Customized stencil for bend.
   \override BendAfter.stencil =
     #(grob-transformer 'stencil (lambda (grob orig)
       (let ((xex (ly:stencil-extent orig X))
             (yex (ly:stencil-extent orig Y)))
         (ly:grob-set-property! grob 'style 'zigzag)
         (ly:grob-set-property! grob 'thickness 1)
         (ly:line-interface::line grob
           (car xex) (cdr yex) (cdr xex) (car yex)))))
   c \bendAfter #-6 d e f
}
%%%%


-- Aaron Hill

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: glissando

Gianmaria Lari
On Tue, 2 Apr 2019 at 03:21, Aaron Hill <[hidden email]> wrote:
On 2019-04-01 5:15 pm, Colin Campbell wrote:
> On 2019-04-01 5:28 p.m., Gianmaria Lari wrote:
>> Attached to this email a screenshot of the result of this code
>>
>>     \version "2.21.0"
>>     \fixed c'' {
>>       \override Glissando.style = #'zigzag
>>       c \glissando \hideNotes c, \unHideNotes d e f
>>     }
>>
>
> I think that \bendAfter #-4 (replacing  \glissando ... \unHideNotes)
> may be part of the solution, but I don't know how to change the
> stencil to a zig-zag.

Here's an attempt to change the stencil along with comparisons to other
techniques:

[.....]

Thank you Aaron, Colin and Toine!
BendAfter looks the more neat solution.

Thanks!!!!
g.

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: glissando

Gianmaria Lari
AAron, is there any way to move the bend code outside the score part?

Thank you, g.

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: glissando

Gianmaria Lari
... and it is possible to apply bendafter to a chord instead of a single note? I tried

<c e> \bendAfter #-6 ......

but it doesn't work.....

g.

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: glissando

Aaron Hill
In reply to this post by Gianmaria Lari
On 2019-04-01 11:19 pm, Gianmaria Lari wrote:
> AAron, is there any way to move the bend code outside the score part?

That's almost always possible.  Here it is wrapped up in a custom event
function:

%%%%
\version "2.19.82"

zigzagBendAfter = #(define-event-function (steps) (number?)
   (define (zigzag-stencil grob)
     (let* ((sten (bend::print grob))
            (xex (ly:stencil-extent sten X))
           (yex (ly:stencil-extent sten Y)))
       (ly:grob-set-property! grob 'style 'zigzag)
       (ly:grob-set-property! grob 'thickness 1)
       (ly:line-interface::line grob
         (car xex) (cdr yex) (cdr xex) (car yex))))
   #{ -\tweak stencil #zigzag-stencil -\bendAfter $steps #} )

\fixed c'' { c \zigzagBendAfter #-6 d e f }
%%%%

I switched from grob-transformer to explicitly referencing bend::print.  
This is probably a little safer, since one can then override BendAfter's
stencil to something else as needed without impacting this zigzag
variant.


-- Aaron Hill

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: glissando

Aaron Hill
In reply to this post by Gianmaria Lari
On 2019-04-01 11:32 pm, Gianmaria Lari wrote:
> ... and it is possible to apply bendafter to a chord instead of a
> single
> note? I tried
>
> <c e> \bendAfter #-6 ......
>
>
> but it doesn't work.....

Oh, dear.  Seems to be an unsupported feature to apply falls/doits to
notes within a chord or to the chord as a whole.

The archives have a number of threads on the subject with no responses
on the majority of them.  Yikes!

The best solution proffered was to break up the chords and into two
voices, one that will use \bendAfter and the other will have the
remaining notes.  Collisions seem to be the biggest issue with this
approach.

I'll dig into the code a bit to see if I can figure out where the
disconnect is.


-- Aaron Hill

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: glissando

Gianmaria Lari
Thank you Aaron for you reply!

In the meantime I'm trying the other approch you proposed:  %% Glissando in second voice.

Ciao, g.

On Tue, 2 Apr 2019 at 08:44, Aaron Hill <[hidden email]> wrote:
On 2019-04-01 11:32 pm, Gianmaria Lari wrote:
> ... and it is possible to apply bendafter to a chord instead of a
> single
> note? I tried
>
> <c e> \bendAfter #-6 ......
>
>
> but it doesn't work.....

Oh, dear.  Seems to be an unsupported feature to apply falls/doits to
notes within a chord or to the chord as a whole.

The archives have a number of threads on the subject with no responses
on the majority of them.  Yikes!

The best solution proffered was to break up the chords and into two
voices, one that will use \bendAfter and the other will have the
remaining notes.  Collisions seem to be the biggest issue with this
approach.

I'll dig into the code a bit to see if I can figure out where the
disconnect is.


-- Aaron Hill

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user