lilypond-devel
[Top][All Lists]
Advanced

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

[PATCH] Tablature in LilyPond


From: Lamy Jean-Baptiste
Subject: [PATCH] Tablature in LilyPond
Date: Tue, 28 May 2002 21:06:15 +0200

Hi,

Here is the new version of the tablature patch for Lilypond (1.5.55) !

The input/test/tablature.ly file is an exemple.


> >+    \translator {
> >+      \StaffContext
> >+      
> 
> you'll probably want to insert \name TabStaff over here, so you can
> use  normal and tab staffs in the same file.

I've tried this but it doesn't work :-(
I guess i'm not good enough at using context with Lilypond...
Can someone help me ?

> >+      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")

OK, i now use it (in Scheme) !
BTW i've fixed a bug in pitch-semitons; this Guile function was returning
the note number and not the semitons !

> >+; Stem molecule callback for tablature.
> 
> 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.

Done !
The new stem property is called "avoid-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)

The string-tuning is now the string-tunings properties of the TabNoteHead
grob.
I prefer to keep the tab string number in the TabNoteHead grob, since it
may be usefull for other things (e.g. hacking the grob molecule brewer, so
it write letters instead numbers; if i remember well there are a few
instruments that use letters).

Jiba

Attachment: tab-lily-2.patch
Description: Binary data


reply via email to

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