Tie/slur bug in 2.9.11?

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

Tie/slur bug in 2.9.11?

John Wiedenhoeft
When I try the following:

\version "2.9.11"

erga = {\once \override NoteHead #'style = #'diamond a}
para = {< \parenthesize a>}

{
a ~ \erga ~ \erga
a( \erga) \erga( a)
a ~ \para ~ \para
a( \para) \para( a)
}

I get:

GNU LilyPond 2.9.11
Processing `greg.ly'
Parsing...
greg.ly:7:10: error: syntax error, unexpected '~'
a ~ \erga
          ~ \erga
greg.ly:8:8: error: syntax error, unexpected ')'
a( \erga
        ) \erga( a)
greg.ly:9:10: error: syntax error, unexpected '~'
a ~ \para
          ~ \para
greg.ly:10:8: error: syntax error, unexpected ')'
a( \para
        ) \para( a)
greg.ly:6:0: error: errors found, ignoring music expression

{
error: failed files: "greg.ly"


I can't see whats wrong. Should I forward this to the bug reports?

Cheers,
John



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

Re: Tie/slur bug in 2.9.11?

Nicolas Sceaux
John Wiedenhoeft <[hidden email]> writes:

> When I try the following:
>
> \version "2.9.11"
>
> erga = {\once \override NoteHead #'style = #'diamond a}
> para = {< \parenthesize a>}
>
> {
> a ~ \erga ~ \erga
> a( \erga) \erga( a)
> a ~ \para ~ \para
> a( \para) \para( a)
> }
>
> I get:
>
> GNU LilyPond 2.9.11
> Processing `greg.ly'
> Parsing...
> greg.ly:7:10: error: syntax error, unexpected '~'
> a ~ \erga
>           ~ \erga
> [other syntax errors]

This is not a bug, what you wrote is simply not valid LilyPond syntax,
as the message tells ("syntax error"). "(", ")" and "~" only applyes to
literal notes, which \erga and \para are not.

I suggest that you wrote instead:

erg = \once \override NoteHead #'style = #'diamond
%% unfortunately, you cannot simply write:
%%   par = \parenthesize
%% see ly/music-functions-init.ly for the definition
%% of parenthesize.
par =
#(define-music-function (parser loc arg) (ly:music?)
   "Tag @var{arg} to be parenthesized."
   (set! (ly:music-property arg 'parenthesize) #t)
   arg)

{
  a ~ \erg a ~ \erg a
  a( \erg a) \erg a( a)
  a ~ \par a ~ \par a
  a( \par a) \par a( a)
}

nicolas


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