lilypond-devel
[Top][All Lists]
Advanced

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

Re: French viol/lute tablature


From: Kim Shrier
Subject: Re: French viol/lute tablature
Date: Sat, 29 Nov 2008 13:51:44 -0700

On Nov 29, 2008, at 12:22 PM, Jonathan Kulp wrote:

Kim Shrier wrote:
I have letters working after a fashion. I have added letter- tablature-format and bass-viol-tuning, tenor-viol-tuning, and treble-viol-tuning to my copy of output-lib.scm. This is a very simplistic implementation of using letters that uses the same font, font size, and alignment that the numbers use. The results are not very pleasing and I will need to tweak it to make it look
better.
I am still pondering how I want to organize the code for the other aspects
of French tab.
Kim

Ok I got a file from this site:

http://www.musicolibre.eu/spip.php?article134

that has a scheme hack to make letters but it's not working right.

Here's the scheme:

#(define (letter-tablature-format str tuning pitch)
   (make-whiteout-markup
    (make-vcenter-markup
     (string (integer->char
               (+ (char->integer #\a)
                (- (ly:pitch-semitones pitch)
                 (list-ref tuning (- str 1)))))))))


The problem line is apparently the next-to-last where it says "pitch- semitones pitch". When I try to run the file I get errors saying "Wrong type argument in position 1 (expecting Pitch). Can you see what's wrong with it? Or better yet, would you mind sharing a small example of your own that does work? I'm interested in this. Thanks,

Jon
--
Jonathan Kulp
http://www.jonathankulp.com


Here is my letter-tablature-format that I have put into output-lib.scm

(define-public (letter-tablature-format string
                                             context event)
  (let*
      ((tuning (ly:context-property context 'stringTunings))
       (pitch (ly:event-property event 'pitch)))

    (make-whiteout-markup
     (make-vcenter-markup
      (format
       "~a"
       (integer->char
         (+ (char->integer #\a)
            (- (ly:pitch-semitones pitch)
            (list-ref tuning
;; remove 1 because list index starts at 0 and viol/lute string at 1.
                    (- string 1))))))))
    ))


I don't like the results but it is a start. The letters should be a little
larger and I would like to use the italic version of the font.

Kim





reply via email to

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