Lamy Jean-Baptiste wrote:

> I am writing a GUI guitar tablature editor for GNOME (GTablature,
> http://oomadness.tuxfamily.org/gtablature/en) and i am thinking about using
> Lilypond for output / printing.

GREAT!

> My hack is based on the "tab-staff.ly" file found in Lilypond examples, and
> it now prints the notes' frets at the right location !!!

Yikes, I totally forgot about that file. I don't really understand the 
idea about it - why the pitch squash engraver was added when the staff 
contains nothing.
Well, here is a more up-to-date version of the file. Notice that I've 
added a clef (please comment about the clef layout) and incresed the 
staff space (to 1.25 times the normal)



\version "1.4.0"

%{
Kludge for half-assed tab notation (you need to fill the numbers
yourself.)
%}

bla =  \notes \relative c' { <c4 e g>  <c4. e g> <c8 f a> <c4 f a> <c1 e 
g> }

\score { \notes
<
     \context Voice = BLA \bla
     \context TabStaff \context Thread \bla
 >
        
\paper {
     \translator {
        \StaffContext
        \name TabStaff
        StaffSymbol \override #'line-count = #6
        StaffSymbol \override #'staff-space = #1.25
        clefGlyph = #"clefs-tab"
        clefPosition = #0
        centralCPosition = #0
        NoteHead \override #'transparent = ##t
        Stem \override #'transparent = ##t
        Dots \override #'transparent = ##t
     }
     \translator {
        \ScoreContext
        \accepts TabStaff
     }
}
}



> Here it is.
> The patch "note-head-engraver" must be applied on the
> note-heads-engraver.cc c++ source file, and the "scm" one on the scm
> directory; i am using LilyPond 1.5.54.

I think that something went wrong with your attachment - couldn't really 
find your patch. Oh, and please send unified diffs. diff -u


> Please help me !

Until 1/6 I won't have much time, but well, your idea about using the 
pitch-squash-engraver was quite funny (never thought on that) - but if 
you want to support chords then this is NOT the way to go, I'm afraid.

I have made some kludgy drum notation using scheme - see 
input/test/drums.ly - and probably you could use something likewise to 
move around the noteheads in the guitar staff.
For serious business I think that one should add a new engraver 
(tab-engraver). In june, at least, I will examine this and try to add a 
drum engraver instead of the kludgy scheme.

For now, for setting the fret I would probably use some sort of scheme 
functions to do this more or less automatically (ofcourse, peoble like 
David Arnold should still have the option of setting the fret directly) 
so that one could i.e. set a property minimum-fret - and then the scheme 
function automatically finds out which string to use in order to use the 
fret closest to (but not  less than) minimum-fret.
Making the tuning customisable should probably be done by setting a 
translator property fret-tuning (or something. Please don't use the word 
"guitar" as tabs are also used for other stringed instruments than 
guitars). Currently it is not possible to read translator properties 
from scheme - but this is probably about to change. Try and read the 
thread starting from
http://mail.gnu.org/pipermail/lilypond-devel/2002-April/000645.html
for more info about this.

I'll return after having thought a bit more about this whole issue.

Really great that you are snooping into this.


-Rune


_______________________________________________
Lilypond-devel mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to