lilypond-devel
[Top][All Lists]
Advanced

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

Re: Proposal for resolving Half/Quarter note ambiguity on pure tablature


From: Carl D. Sorensen
Subject: Re: Proposal for resolving Half/Quarter note ambiguity on pure tablature staves (with partial code mod)
Date: Sun, 1 Mar 2009 19:44:00 -0700



On 3/1/09 12:49 PM, "Ricdude" <address@hidden> wrote:

> 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.

If you're going to do development, you'll need to move to the current
version (2.13 for the devel version now).  I'm not sure if it compiles in
cygwin or not (I suspect it may not -- I quit trying to compile in cygwin a
couple of years ago).

> 
> 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?

I'm probably not the right person to answer this question, but nobody else
has, so I'll chime in here.  I think this logic works.

> How would the staff type be checked?

You need to get the context name and see if it's TabStaff.  I think you use
the c procedure ly_context_name_
> And
> where would I find the flags.___ definitions to add the half-note
> definition?

The flags are glyphs in the feta font; you can see them by looking at
Appendix B6 of the Notation Reference for version 2.12.
  
> 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
> 

Some of these features are currently implemented.  See the 2.12
documentation for more information on the current state of tab notation.

HTH,

Carl






reply via email to

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