Fwd: Proposal for resolving Half/Quarter note ambiguity on pure tablature staves (with partial code mod)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: Proposal for resolving Half/Quarter note ambiguity on pure tablature staves (with partial code mod)

Valentin Villenave
Administrator
For archival purposes, I am forwarding to the tablatures list some
previous discussions that may have taken place privately or on the
LilyPond-user mailing list.

- Valentin




Forwarded conversation
Subject: Proposal for resolving Half/Quarter note ambiguity on pure
tablature staves (with partial code mod)
------------------------

From: Ricdude <[hidden email]>
Date: 2009/2/21
To: [hidden email]


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:

 if ( STAFF_IS_NOT_TABLATURE_TBD ) {
   // 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:
http://tabs.guitarworld.com/tabs/gwtabpage/4385/1920/back-in-black




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

----------
From: Valentin Villenave <[hidden email]>
Date: 2009/7/16
To: Ricdude <[hidden email]>
Cc: [hidden email]


2009/2/21 Ricdude <[hidden email]>:
Greetings, and my apologies for having left this mail unanswered for so long,

I have added your suggestion to our tracker as
http://code.google.com/p/lilypond/issues/detail?id=810

However, technically I should not have done so because you didn't
provide us with an example of such a notation. Can you please send an
image of what you're referring to?

You may also want to install the latest LilyPond version (if you're
using Windows, we do have a native version so using cygwin is not
required -- nor recommended). We recently have implemented new
features that allow to define new stem-flags much more easily.
Once again, we'd need to have small individual examples (png images
are much, much preferred compared to a flash website ;-)

Regards,
Valentin




--
Regards,
Valentin