[Top][All Lists]

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

Proposal for resolving Half/Quarter note ambiguity on pure tablature sta

From: Ricdude
Subject: Proposal for resolving Half/Quarter note ambiguity on pure tablature staves (with partial code mod)
Date: Sat, 21 Feb 2009 01:53:42 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Quick intro: Mediocre guitarist/composer, Lilypond newbie,
Professional programmer.

I've got lilypond 2.10.33 (cygwin version), and, as some others have
noted, there is no way to resolve whether a straight stem on a
tablature staff refers to a half note, or a quarter note.

I've seen this ambiguity handled in some tablatures by adding a short
straight line perpendicular to the end of the stem for half notes.
The result looks kind of like the letter L (sans-serif, and inverted
for upstems), about as wide as an eighth note flag.  Quarter notes
retain their "normal" straight staves in this notation system.

I'd like to see this notation implemented (at least as an option) in
lilypond. It looks like the code to tweak is in the lily/stem.cc file,
Stem::flag method, starting around line 603 in the 2.10.33 source.
Instead of:

  if (log < 3
      || unsmob_grob (me->get_object ("beam")))
    return Stencil ();

perhaps something like:

    // non-tab staves, only eighths and shorter have flags.
    if (log < 3
        || unsmob_grob (me->get_object ("beam")))
      return Stencil ();
  } else {
    // staff is tablature, allow half-notes to have a flag
    if ( (log < 3 && log != 1)
        || unsmob_grob (me->get_object ("beam")))
      return Stencil ();

where, STAFF_IS_NOT_TABLATURE is, of course, the appropriate check for
a non-tablature staff type.

Beyond that, it looks like the flag handling relies on a
"flags.STYLE+DIR+OFFSET+LOG" definition of some sort, so as long as
the definition for log==1 existed, the remaining logic would handle
everything appropriately.

Does this logic make sense?  How would the staff type be checked?  And
where would I find the flags.___ definitions to add the half-note
definition?  Can someone more familiar with the code let me know if
I'm on the right track here?
 And where else to look to implement (or assist in implementing) this?

Long term, I'd like to see all of the "special" guitar notation
techniques (bends, dives, slash heads on tab staffs, etc.) implemented
in some form or another.  Some of these unique notation techniques can
be seen here:

reply via email to

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