lilypond-user
[Top][All Lists]
Advanced

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

newbie question on scheme functions


From: Andrea Rossato
Subject: newbie question on scheme functions
Date: Wed, 29 Dec 2004 18:30:30 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040630

Hi there!

I've recently discovered LilyPond and I'm really impressed by it! Great job!

Just a newbie question.
I need to be able to change the output of chords' names to the Italian ones (Do instead of C, and so on). The only viable solution I was able to find is to hack scm/chord-name.scm and add:
(define-public (note-name->italian-markup pitch)
  "Return Italian pitch markup for PITCH."
  (make-line-markup
   (list
    (make-simple-markup
(vector-ref #("Do" "Re" "Mi" "Fa" "Sol" "La" "Si") (ly:pitch-notename pitch)))
     (accidental->markup (ly:pitch-alteration pitch)))))

and, in my .ly files, add, in the ChordName context:
\set chordRootNamer = #note-name->italian-markup

I'm trying to find a cleaner solution: is it possible to define that function inside a .ly file?

I tried, by adding a # before the definition,  but I get an error message.

I'm new to lilypond, and to scheme. Could you give me some directions to get a better understanding of the lilypond internal (unfortunately the manual seems not to be a viable solution at my present knowledge level).
Than you
Andrea





reply via email to

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