+2002-08-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * scm/output-lib.scm: Support of hammers and pulls in tablature
+ -- Hammers and pulls are inserted exactly like slurs, and a "H" or
+ a "P" is added over the slur as needed. The file
+
+ * ./input/test/tablature-hammer.ly: example of hammer, pull and
+ legato in a tablature.
+
+ * ly/engraver-init.ly: Stem.up-to-staff is now disabled by
+ default, since it appears that most of the published tablatures
+ are not like that.
+
+2002-08-13 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * lily/beam.cc (brew_molecule): use
+ Staff_symbol_referencer::staff_space for thickness.
+
2002-08-14 Jan Nieuwenhuizen <janneke@gnu.org>
* Documentation/user/lilypond.tely: Add dir entries for
(set_stem_shorten): Integer divide bug fix.
* input/mutopia/J.S.Bach/baerenreiter-sarabande.ly: Really expect
- 6 systems, change warning into error.
+ six systems, change warning into error.
* scm/grob-description.scm (beamed-stem-shorten): Shorten 8th
beams same as normal stem (one staffspace), high order beams less
variations is choosing spacing. The distances between notes should
reflect the durations between notes, but adhering with mathematical
precision to the duration will lead to a poor result. Shown here is an
-example of a motive, printed four times. It is printed using both
-exact, mathematical spacing, and with some corrections. Can you spot
-which is which?
+example of a motive, printed twice. It is printed using both exact,
+mathematical spacing, and with some corrections. Can you spot which is
+which?
@c I can only see the motive printed two times!!! /Mats
--- /dev/null
+\version "1.5.68"
+\header {
+texidoc = ""
+}
+
+\score{
+ \context TabStaff <
+ \notes\relative c''{
+ c()d
+ d()d
+ d()c
+ }
+ >
+}
Real dy = pos.delta ();
Real dydx = dy && dx ? dy/dx : 0;
- Real thick = gh_scm2double (me->get_grob_property ("thickness"));
+ Real thick = gh_scm2double (me->get_grob_property ("thickness"))
+ * Staff_symbol_referencer::staff_space (me);
Real bdy = get_beam_translation (me);
SCM last_beaming = SCM_EOL;;
\denies "Thread"
\consists "Tab_note_heads_engraver"
+ Slur \override #'font-family = #'roman
+ Slur \override #'molecule-callback = #hammer-molecule-callback
+ Slur \override #'direction = #-1
+
% Draws all stems/beams out of the staff (and not in the middle of the staff !)
- Beam \override #'damping = #100000
- Stem \override #'up-to-staff = ##t
+ % This feature is now disabled because most of the tab does not use it.
+ %Beam \override #'damping = #100000
+ %Stem \override #'up-to-staff = ##t
% No accidental in tablature !
\remove Accidental_engraver
)
)
+(define (hammer-molecule-callback grob)
+ (let* ((note-collums (ly-get-grob-property grob 'note-columns))
+ (note-column1 (cadr note-collums))
+ (note-column2 (car note-collums))
+ (note1 (car (ly-get-grob-property note-column1 'note-heads)))
+ (note2 (car (ly-get-grob-property note-column2 'note-heads)))
+ (fret1 (string->number (ly-get-grob-property note1 'text)))
+ (fret2 (string->number (ly-get-grob-property note2 'text)))
+ (letter (if (< fret1 fret2) "H"
+ (if (> fret1 fret2) "P"
+ "")))
+ )
+ (let ((slur (Slur::brew_molecule grob))
+ (text (fontify-text (ly-get-default-font grob) letter)))
+
+ (let ((x (/ (- (cdr (ly-get-molecule-extent slur 0))
+ (/ (cdr (ly-get-molecule-extent text 0)) 2.0)
+ )
+ -2.0)))
+
+ (ly-set-molecule-extent! text 0 (cons x x))
+ (ly-align-to! text 0 1)
+ )
+
+ (ly-combine-molecule-at-edge slur 1 1 text -0.6)
+ )
+ )
+ )
+
+
+
+
; end of tablature functions