lilypond-user
[Top][All Lists]
Advanced

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

Re: scheme code for \set


From: Nicolas Sceaux
Subject: Re: scheme code for \set
Date: Sun, 11 Jul 2004 21:06:16 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Pedro Kroger <address@hidden> writes:

> Hi,
>
> I'm wandering what is the equivalent scheme code for things like:
>
> \set Staff.instrument = "Violin solo"
>
> I want to define instrument's name from a scheme procedure (but I
> don't want use #{ ... #})
>
> I've tried to figure it out from the scheme files at scm but "set" is not
> the best thing to grep for in a lisp file!

A possible definition:

#(define-public (mus:set context property val)
  (make-music 'ContextSpeccedMusic
    'context-type context
    'element (make-music 'PropertySet
               'symbol property
               'value val)))

\score {
    \notes {
        c4
        #(ly:export (mus:set 'Score 'repeatCommands '((volta "93") end-repeat)))
        c4 c4
        #(ly:export (mus:set 'Score 'repeatCommands '((volta #f))))
        c4 c4 
    }
}

nicolas






reply via email to

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