[Top][All Lists]

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

Re: Longa notes

From: Juergen Reuter
Subject: Re: Longa notes
Date: Fri, 6 Oct 2006 20:46:17 +0200 (CEST)

Hi all,

the longa notes problem reduces to this piece of code in method "internal_print (Grob *me, string *font_char)" in file lily/

  if (!scm_is_symbol (style))
    style = ly_symbol2scm ("default");

  [... snip ...]

  if (style != ly_symbol2scm ("default"))
       SCM gn = me->get_property ("glyph-name");
       if (scm_is_string (gn))
       suffix = ly_scm2string (gn);

The problem here is that 'me->get_property ("glyph-name")' is called only if 'style != ly_symbol2scm ("default")'. That is, the code in output-lib.scm for "default" style is dead. That is, why longa notes are not working for default style.

If I remove the 'if (style != ly_symbol2scm ("default"))' condition _and_
if I explicitly say: \override NoteHead #'style = #'default
then the longa notes show correctly. However, without explicitly setting #'style to #'default, I get:

/home/reuter/project/lilypond-2.9/share/lilypond/2.9.22/scm/output-lib.scm:144:58: In procedure symbol->string in expression (symbol->string style): /home/reuter/project/lilypond-2.9/share/lilypond/2.9.22/scm/output-lib.scm:144:58: Wrong type argument in position 1 (expecting SYMBOLP): ()

Hence, obviously, the above 'if' condition was introduced to suppress this error, but this fix is bad, since it makes the code for the default style in output-lib.scm dead.

The real problem is the "case style" switch statement in line 114 of output-lib. If style is not set, it erroneously selects the else case (rather than the "default" case) and dies when trying to execute symbol->string on the undefined style.

Does some scm guru know how to test _before_ the "case style" switch, if style is undefined, and if so, set it to "default"? This would be the real fix, I guess.


reply via email to

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