Re: can bendAfter be made to skip over notes?

2020-10-27 Thread Jean Abou Samra


Le 27/10/2020 à 17:21, 98123981293 1293812397123 a écrit :

Hi Aaron,

I tried all three of your solutions and get the same error:

Unsupported SCM value for format: (rmoveto 2.777338 1/2 rcurveto 
1.81180552352106 0 5.43541657056318 -1 5.43541657056318 -3/2)


Converting to `document.pdf'...

warning: `(gs -q -dNODISPLAY -dNOSAFER -dNOPAUSE -dBATCH 
-dAutoRotatePages=/None -dPrinted=false ./tmp--tmp-1982250)' failed (1)


I appreciate the attempt though. Will keep this in the back of my mind 
for future learning; for now will probably just use regular glissando.


-Kyle


Hello,

In recent versions of LilyPond (2.21.5 and higher), you have to remove 
inner quoting when constructing stencils:



\version "2.20.0"

bend-glissando-print =
#(lambda (grob)
  (let* ((lnh (ly:spanner-bound grob LEFT))
 (rnh (ly:spanner-bound grob RIGHT))
 (lsp (ly:grob-staff-position lnh))
 (rsp (ly:grob-staff-position rnh))
 (dy (/ (- rsp lsp) 2))
 (dot (ly:grob-object lnh 'dot))
 (acc (ly:grob-object rnh 'accidental-grob))
 (th (* (ly:grob-property grob 'thickness 1)
    (ly:output-def-lookup (ly:grob-layout grob)
  'line-thickness)))
 (pad (ly:grob-property grob 'padding 0.5))
 (cmx (ly:grob-common-refpoint
    (ly:grob-common-refpoint grob lnh X) rnh X))
 (cmy (ly:grob-common-refpoint grob lnh Y))
 (lx (+ pad (max (interval-end (ly:generic-bound-extent lnh cmx))
 (if dot
 (interval-end
(ly:grob-robust-relative-extent dot cmx X))
 (- INFINITY-INT)
 (rx (- (min (interval-start (ly:generic-bound-extent rnh cmx))
 (if acc
 (interval-start
  (ly:grob-robust-relative-extent acc cmx X))
 INFINITY-INT))
    pad))
 (dx (- rx lx))
 (sx (ly:grob-relative-coordinate grob cmx X)))
    (ly:make-stencil
  (list 'path th
    ` ; (quote
  (rmoveto ,(- lx sx) ,(/ lsp 2)
   rcurveto ,(/ dx 3) 0 ,dx ,(* dy 2/3) ,dx ,dy)) ; )
  (cons (- lx sx) (- rx sx))
  (cons (+ (/ lsp 2) (min 0 dy)) (+ (/ lsp 2) (max 0 dy))

bendGlissando =
  \tweak thickness #2
  \tweak stencil #bend-glissando-print
  \glissando

{ c''2. \bendGlissando
  \once \override NoteColumn.glissando-skip = ##t
  e'4 gis'1 }


Best regards,
Jean



Re: can bendAfter be made to skip over notes?

2020-10-27 Thread 98123981293 1293812397123
Hi Aaron,

I tried all three of your solutions and get the same error:

Unsupported SCM value for format: (rmoveto 2.777338 1/2 rcurveto
1.81180552352106 0 5.43541657056318 -1 5.43541657056318 -3/2)

Converting to `document.pdf'...

warning: `(gs -q -dNODISPLAY -dNOSAFER -dNOPAUSE -dBATCH
-dAutoRotatePages=/None -dPrinted=false ./tmp--tmp-1982250)' failed (1)


I appreciate the attempt though. Will keep this in the back of my mind for
future learning; for now will probably just use regular glissando.

-Kyle

On Tue, Oct 27, 2020 at 4:58 AM  wrote:

> Send lilypond-user mailing list submissions to
> lilypond-user@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> or, via email, send a message with subject or body 'help' to
> lilypond-user-requ...@gnu.org
>
> You can reach the person managing the list at
> lilypond-user-ow...@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of lilypond-user digest..."
> Today's Topics:
>
>1. Re: can bendAfter be made to skip over notes? (Aaron Hill)
>2. Re: can bendAfter be made to skip over notes? (Aaron Hill)
>3. Re: can bendAfter be made to skip over notes? (Aaron Hill)
>4. Problems with Barré (sir.teddy.the.fi...@gmail.com)
>
>
>
> -- Forwarded message --
> From: Aaron Hill 
> To: lilypond-user@gnu.org
> Cc:
> Bcc:
> Date: Mon, 26 Oct 2020 22:54:31 -0700
> Subject: Re: can bendAfter be made to skip over notes?
> On 2020-10-26 7:37 pm, 98123981293 1293812397123 wrote:
> > Hi list,
> >
> > I usually use the following snippet to handle glissandi across hidden
> > noteheads:
> >
> > glissandoSkipOn = {
> >   \override NoteColumn.glissando-skip = ##t
> >   \hide NoteHead
> >   \override Accidental.transparent = ##t
> >   \override NoteHead.no-ledgers = ##t
> > }
> >
> > is it possible to implement something similar for bendAfter? A quick
> > check
> > of the archives did not reveal anything relevant but please link me if
> > this
> > has already been covered. Pic attached with the line as I want it to
> > look
> > in green.
> >
> > Thank you,
> > Kyle
>
> The Glissando_engraver knows to look for glissando-skip, however no such
> logic exists for Bend_engraver.  It would be possible to re-write the
> engraver and introduce a new bend-skip context property, however a
> perhaps simpler option is to change the stencil for a glissando to look
> like a bend:
>
> 
> \version "2.20.0"
>
> bend-glissando-print =
> #(lambda (grob)
>(let* ((lnh (ly:spanner-bound grob LEFT))
>   (rnh (ly:spanner-bound grob RIGHT))
>   (lsp (ly:grob-staff-position lnh))
>   (rsp (ly:grob-staff-position rnh))
>   (dy (/ (- rsp lsp) 2))
>   (dot (ly:grob-object lnh 'dot))
>   (acc (ly:grob-object rnh 'accidental-grob))
>   (th (* (ly:grob-property grob 'thickness 1)
>  (ly:output-def-lookup (ly:grob-layout grob)
>'line-thickness)))
>   (pad (ly:grob-property grob 'padding 0.5))
>   (cmx (ly:grob-common-refpoint
>  (ly:grob-common-refpoint grob lnh X) rnh X))
>   (cmy (ly:grob-common-refpoint grob lnh Y))
>   (lx (+ pad (max (interval-end (ly:generic-bound-extent lnh
> cmx))
>   (if dot
>   (interval-end
>(ly:grob-robust-relative-extent dot cmx
> X))
>   (- INFINITY-INT)
>   (rx (- (min (interval-start (ly:generic-bound-extent rnh cmx))
>   (if acc
>   (interval-start
>(ly:grob-robust-relative-extent acc cmx X))
>   INFINITY-INT))
>  pad))
>   (dx (- rx lx))
>   (sx (ly:grob-relative-coordinate grob cmx X)))
>  (ly:make-stencil
>(list 'path th
>  `(quote
>(rmoveto ,(- lx sx) 0.5
> rcurveto ,(/ dx 3) 0 ,dx ,(* dy 2/3) ,dx ,dy)))
>(cons (- lx sx) (- rx sx))
>    (cons (+ 0.5 (min 0 dy)) (+ 0.5 (max 0 dy))
>
> bendGlissando =
>\tweak thickness #2
>\tweak stencil #bend-glissando-print
>\glissando
>
> { c''2. \bendGlissando
>\once \override NoteColumn.glissando-skip = ##t
>e'4 gis'1 }
> 
>
>
> -- Aaron Hill
>
>
> ---

Re: can bendAfter be made to skip over notes?

2020-10-26 Thread Aaron Hill

On 2020-10-26 10:56 pm, Aaron Hill wrote:

On 2020-10-26 10:54 pm, Aaron Hill wrote:

On 2020-10-26 7:37 pm, 98123981293 1293812397123 wrote:

Hi list,

I usually use the following snippet to handle glissandi across hidden
noteheads:

glissandoSkipOn = {
  \override NoteColumn.glissando-skip = ##t
  \hide NoteHead
  \override Accidental.transparent = ##t
  \override NoteHead.no-ledgers = ##t
}

is it possible to implement something similar for bendAfter? A quick 
check
of the archives did not reveal anything relevant but please link me 
if this
has already been covered. Pic attached with the line as I want it to 
look

in green.

Thank you,
Kyle


The Glissando_engraver knows to look for glissando-skip, however no
such logic exists for Bend_engraver.  It would be possible to re-write
the engraver and introduce a new bend-skip context property, however a
perhaps simpler option is to change the stencil for a glissando to
look like a bend:

[...]


Sorry, I pasted an old version of the code that did not handle the
vertical alignment properly:

[...]


Grr.  I must be getting really tired.  One more attempt and then I give 
up:



\version "2.20.0"

bend-glissando-print =
#(lambda (grob)
  (let* ((lnh (ly:spanner-bound grob LEFT))
 (rnh (ly:spanner-bound grob RIGHT))
 (lsp (ly:grob-staff-position lnh))
 (rsp (ly:grob-staff-position rnh))
 (dy (/ (- rsp lsp) 2))
 (dot (ly:grob-object lnh 'dot))
 (acc (ly:grob-object rnh 'accidental-grob))
 (th (* (ly:grob-property grob 'thickness 1)
(ly:output-def-lookup (ly:grob-layout grob)
  'line-thickness)))
 (pad (ly:grob-property grob 'padding 0.5))
 (cmx (ly:grob-common-refpoint
(ly:grob-common-refpoint grob lnh X) rnh X))
 (cmy (ly:grob-common-refpoint grob lnh Y))
 (lx (+ pad (max (interval-end (ly:generic-bound-extent lnh 
cmx))

 (if dot
 (interval-end
  (ly:grob-robust-relative-extent dot cmx 
X))

 (- INFINITY-INT)
 (rx (- (min (interval-start (ly:generic-bound-extent rnh cmx))
 (if acc
 (interval-start
  (ly:grob-robust-relative-extent acc cmx X))
 INFINITY-INT))
pad))
 (dx (- rx lx))
 (sx (ly:grob-relative-coordinate grob cmx X)))
(ly:make-stencil
  (list 'path th
`(quote
  (rmoveto ,(- lx sx) ,(/ lsp 2)
   rcurveto ,(/ dx 3) 0 ,dx ,(* dy 2/3) ,dx ,dy)))
  (cons (- lx sx) (- rx sx))
  (cons (+ (/ lsp 2) (min 0 dy)) (+ (/ lsp 2) (max 0 dy))

bendGlissando =
  \tweak thickness #2
  \tweak stencil #bend-glissando-print
  \glissando

{ c''2. \bendGlissando
  \once \override NoteColumn.glissando-skip = ##t
  e'4 gis'1 }



-- Aaron Hill



Re: can bendAfter be made to skip over notes?

2020-10-26 Thread Aaron Hill

On 2020-10-26 10:54 pm, Aaron Hill wrote:

On 2020-10-26 7:37 pm, 98123981293 1293812397123 wrote:

Hi list,

I usually use the following snippet to handle glissandi across hidden
noteheads:

glissandoSkipOn = {
  \override NoteColumn.glissando-skip = ##t
  \hide NoteHead
  \override Accidental.transparent = ##t
  \override NoteHead.no-ledgers = ##t
}

is it possible to implement something similar for bendAfter? A quick 
check
of the archives did not reveal anything relevant but please link me if 
this
has already been covered. Pic attached with the line as I want it to 
look

in green.

Thank you,
Kyle


The Glissando_engraver knows to look for glissando-skip, however no
such logic exists for Bend_engraver.  It would be possible to re-write
the engraver and introduce a new bend-skip context property, however a
perhaps simpler option is to change the stencil for a glissando to
look like a bend:

[...]


Sorry, I pasted an old version of the code that did not handle the 
vertical alignment properly:



\version "2.20.0"

bend-glissando-print =
#(lambda (grob)
  (let* ((lnh (ly:spanner-bound grob LEFT))
 (rnh (ly:spanner-bound grob RIGHT))
 (lsp (ly:grob-staff-position lnh))
 (rsp (ly:grob-staff-position rnh))
 (dy (/ (- rsp lsp) 2))
 (dot (ly:grob-object lnh 'dot))
 (acc (ly:grob-object rnh 'accidental-grob))
 (th (* (ly:grob-property grob 'thickness 1)
(ly:output-def-lookup (ly:grob-layout grob)
  'line-thickness)))
 (pad (ly:grob-property grob 'padding 0.5))
 (cmx (ly:grob-common-refpoint
(ly:grob-common-refpoint grob lnh X) rnh X))
 (cmy (ly:grob-common-refpoint grob lnh Y))
 (lx (+ pad (max (interval-end (ly:generic-bound-extent lnh 
cmx))

 (if dot
 (interval-end
  (ly:grob-robust-relative-extent dot cmx 
X))

 (- INFINITY-INT)
 (rx (- (min (interval-start (ly:generic-bound-extent rnh cmx))
 (if acc
 (interval-start
  (ly:grob-robust-relative-extent acc cmx X))
 INFINITY-INT))
pad))
 (dx (- rx lx))
 (sx (ly:grob-relative-coordinate grob cmx X)))
(ly:make-stencil
  (list 'path th
`(quote
  (rmoveto ,(- lx sx) ,(/ lsp 2)
   rcurveto ,(/ dx 3) 0 ,dx ,(* dy 2/3) ,dx ,dy)))
  (cons (- lx sx) (- rx sx))
  (cons (+ (/ lsp 2) (min 0 dy)) (+ 0.5 (max 0 dy))

bendGlissando =
  \tweak thickness #2
  \tweak stencil #bend-glissando-print
  \glissando

{ c''2. \bendGlissando
  \once \override NoteColumn.glissando-skip = ##t
  e'4 gis'1 }


-- Aaron Hill



Re: can bendAfter be made to skip over notes?

2020-10-26 Thread Aaron Hill

On 2020-10-26 7:37 pm, 98123981293 1293812397123 wrote:

Hi list,

I usually use the following snippet to handle glissandi across hidden
noteheads:

glissandoSkipOn = {
  \override NoteColumn.glissando-skip = ##t
  \hide NoteHead
  \override Accidental.transparent = ##t
  \override NoteHead.no-ledgers = ##t
}

is it possible to implement something similar for bendAfter? A quick 
check
of the archives did not reveal anything relevant but please link me if 
this
has already been covered. Pic attached with the line as I want it to 
look

in green.

Thank you,
Kyle


The Glissando_engraver knows to look for glissando-skip, however no such 
logic exists for Bend_engraver.  It would be possible to re-write the 
engraver and introduce a new bend-skip context property, however a 
perhaps simpler option is to change the stencil for a glissando to look 
like a bend:



\version "2.20.0"

bend-glissando-print =
#(lambda (grob)
  (let* ((lnh (ly:spanner-bound grob LEFT))
 (rnh (ly:spanner-bound grob RIGHT))
 (lsp (ly:grob-staff-position lnh))
 (rsp (ly:grob-staff-position rnh))
 (dy (/ (- rsp lsp) 2))
 (dot (ly:grob-object lnh 'dot))
 (acc (ly:grob-object rnh 'accidental-grob))
 (th (* (ly:grob-property grob 'thickness 1)
(ly:output-def-lookup (ly:grob-layout grob)
  'line-thickness)))
 (pad (ly:grob-property grob 'padding 0.5))
 (cmx (ly:grob-common-refpoint
(ly:grob-common-refpoint grob lnh X) rnh X))
 (cmy (ly:grob-common-refpoint grob lnh Y))
 (lx (+ pad (max (interval-end (ly:generic-bound-extent lnh 
cmx))

 (if dot
 (interval-end
  (ly:grob-robust-relative-extent dot cmx 
X))

 (- INFINITY-INT)
 (rx (- (min (interval-start (ly:generic-bound-extent rnh cmx))
 (if acc
 (interval-start
  (ly:grob-robust-relative-extent acc cmx X))
 INFINITY-INT))
pad))
 (dx (- rx lx))
 (sx (ly:grob-relative-coordinate grob cmx X)))
(ly:make-stencil
  (list 'path th
`(quote
  (rmoveto ,(- lx sx) 0.5
   rcurveto ,(/ dx 3) 0 ,dx ,(* dy 2/3) ,dx ,dy)))
  (cons (- lx sx) (- rx sx))
  (cons (+ 0.5 (min 0 dy)) (+ 0.5 (max 0 dy))

bendGlissando =
  \tweak thickness #2
  \tweak stencil #bend-glissando-print
  \glissando

{ c''2. \bendGlissando
  \once \override NoteColumn.glissando-skip = ##t
  e'4 gis'1 }



-- Aaron Hill

can bendAfter be made to skip over notes?

2020-10-26 Thread 98123981293 1293812397123
Hi list,

I usually use the following snippet to handle glissandi across hidden
noteheads:

glissandoSkipOn = {
  \override NoteColumn.glissando-skip = ##t
  \hide NoteHead
  \override Accidental.transparent = ##t
  \override NoteHead.no-ledgers = ##t
}

is it possible to implement something similar for bendAfter? A quick check
of the archives did not reveal anything relevant but please link me if this
has already been covered. Pic attached with the line as I want it to look
in green.

Thank you,
Kyle

On Mon, Oct 26, 2020 at 7:01 PM  wrote:

> Send lilypond-user mailing list submissions to
> lilypond-user@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> or, via email, send a message with subject or body 'help' to
> lilypond-user-requ...@gnu.org
>
> You can reach the person managing the list at
> lilypond-user-ow...@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of lilypond-user digest..."
> Today's Topics:
>
>1. Re: I ought to have a bar line here... (Aaron Hill)
>2. Re: I ought to have a bar line here... (Carl Sorensen)
>3. Re: I ought to have a bar line here... (Thomas Morley)
>4. Re: I ought to have a bar line here... (Carl Sorensen)
>5. Re: I ought to have a bar line here... (Thomas Morley)
>
>
>
> -- Forwarded message --
> From: Aaron Hill 
> To: lilypond-user@gnu.org
> Cc:
> Bcc:
> Date: Mon, 26 Oct 2020 15:17:32 -0700
> Subject: Re: I ought to have a bar line here...
> On 2020-10-26 3:03 pm, Mike Dean wrote:
> > Hi Carl:
> > Is \include "english.ly" different from \language "english"?
> >
> > Part of my residing in the weeds is not being sure where \define
> > command
> > (and its relatives like \defineBarLine) ought to go...while the
> > compilation
> > didn't crash, the bar line construction was ignored in this case
> > Mike Dean
>
> \language "english" is preferred over \include "english.ly".  The latter
> is a vestige of older LilyPond versions where the \language command did
> not exist, and the "english.ly" include files did more stuff.  Now,
> "english.ly" is just a \version and \language statement.
>
> I think you can get away with \defineBarLine being inside music, but it
> would probably be poor practice.  It is better to place all definition
> (or definition-type things) at the top-level.  The only exceptions are
> things that specifically require scope, like \paper variables.
>
> 
>
> As to why the bar line did not appear in your snippet, you redefined the
> bar twice in the same moment.  Only use \bar once.  In this case you
> would place the \bar command at the end of the alternative or at the
> beginning of the "Trio" section.  As to which, that is probably personal
> taste.
>
>
> -- Aaron Hill
>
>
>
>
>
> -- Forwarded message --
> From: Carl Sorensen 
> To: Mike Dean 
> Cc: Lilypond-User Mailing List 
> Bcc:
> Date: Mon, 26 Oct 2020 16:26:53 -0600
> Subject: Re: I ought to have a bar line here...
>
>
> On Mon, Oct 26, 2020 at 4:07 PM Mike Dean  wrote:
>
>> Hi Carl:
>> Is \include "english.ly" different from \language "english"?
>>
>
> It's an old form that predates \language "english".  I'm an old dog, so
> sometimes I forget the new tricks.  At any rate, your snippet didn't
> include \language "english", so I had to fix it.
>
>
>>
>> Part of my residing in the weeds is not being sure where \define command
>> (and its relatives like \defineBarLine) ought to go...while the
>> compilation didn't crash, the bar line construction was ignored in this case
>>
>
> \define always goes at the top level -- outside of any other expressions.
>
> The other change I had to make in order to avoid errors was to replace #f
> with "" as the third element in the \defineBarLine list.  The documentation
> allows the use of #f, but it threw an error and I changed it to "",
> which worked.  That was a successful guess on my part.
>
> Carl
>
>
>
>
> -- Forwarded message --
> From: Thomas Morley 
> To: Carl Sorensen 
> Cc: Mike Dean , "lilypond-user@gnu.org" <
> lilypond-user@gnu.org>
> Bcc:
> Date: Mon, 26 Oct 2020 23:34:44 +0100
> Subject: Re: I ought to have a bar line here...
> Hi Carl,
>
> Am Mo., 26. Okt. 2020 um 23:04 Uhr schrieb Carl Sorensen <
> c_soren...@byu.edu>:
> >
> > Try this:
>
> > \defineBarLine ".|:-|." #'("|." ".|:" "")
>
> Though, \defineBarLine ".|:-|." #'("|." ".|:" #f) _should_ work as well.
>
> It's a bug in 'ly:bar-line::calc-anchor' in bar-line.scm, triggered by
> the RehearsalMark requiring an anchor.
> The anchor-calculating procedure compares the span-glyph using
> string=? which bombs out if span-glyph is not a string.
> One should likely use equal? here.
>
> I'll check that more thoroughly and probably ut up a patch.
>
> Cheers,
>   Harm
>
>
>
>
>
> -- Forwarded message --
> From: Carl Sorensen 
> To: Thomas Morley 
> Cc: Carl S