[EMAIL PROTECTED] writes:
>+ \translator {
>+ \StaffContext
>+
you'll probably want to insert \name TabStaff over here, so you can
use normal and tab staffs in the same file.
>+ int pos = 2 * tab_string; // No tab-note between the string !!!
>+ SCM c0 = get_property ("centralCPosition");
>+ if (gh_number_p (c0)) pos += gh_scm2int (c0);
>+
>+ note_p->set_grob_property ("semitone-pitch", gh_int2scm
>(pit->semitone_pitch()));
this is not necessary. The pitch fo a note head grob can be discovered
through
unsmob_music (g->get_grob_property("cause"))->get_mus_property("pitch")
>+; Tablature functions, by Jiba ([EMAIL PROTECTED])
>+
>+; The strings' tuning.
>+; This should not be hardcoded.
>+#(define-public guitartuning '(-8 -3 2 7 11 16))
(and should probably be a vector not a list?)
>+; Stem molecule callback for tablature.
>+; This molecule callback delegates to the default one, but for chords, it
>+; draws the shorter possible stem (instead of the longer).
>+; Hackish !!!
>+(define (tablature-stem-molecule-callback grob)
>+ (let ((note-heads (ly-get-grob-property grob 'note-heads)))
>+ ; HACK !!!
>+ ; (Temporarilly) remove all note-heads in "note-heads" but one (the one
>+ ; that will give the shorter stem).
>+ ; This is required to avoid stems passing in chords...
It's much simpler to add a flag to the stem brew_molecule that
indicates whether to start the stem from the outer or the inner note
head.
Finally, I would put together the string tunings, pitches etc. in the
engraver, and simply write a #'text property into the notehead. The
string tunings can come from a property (eg. stringTunings = #'(-8 -2
-7) or somesuch)
_______________________________________________
Lilypond-devel mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-devel