lilypond-user
[Top][All Lists]
Advanced

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

Re: Scheme music function attempt


From: Tao Cumplido
Subject: Re: Scheme music function attempt
Date: Mon, 26 Jan 2009 11:08:58 +0100

Yes, that helped a lot. Thanks!
That's how I made the first step work now, in case of interest.

#(define (root-name music)
   (let* ((e (car (ly:music-property music 'elements)))
          (p (ly:music-property e 'pitch)))
     (if (ly:pitch? p)
         (let ((n (ly:pitch-notename p)))
           (if (number? n)
               (number->string n))))))
                 
cs = #(define-music-function (parser location pitch) (ly:music?)
        (let ((rn (root-name pitch)))
          #{ \mark \markup { $rn } #}))

\new Staff { c'1 \cs c'1 c'1 }

Also I didn't know about the scheme-way of using display.
It'll make trying out a lot easier.

Thanks again.

Regards,

Tao
-- 
NUR NOCH BIS 31.01.! GMX FreeDSL - Telefonanschluss + DSL 
für nur 16,37 EURO/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a




reply via email to

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