lilypond-devel
[Top][All Lists]
Advanced

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

Re: scheme problems


From: nicolas . sceaux
Subject: Re: scheme problems
Date: Thu, 5 Aug 2004 00:02:31 +0200
User-agent: Internet Messaging Program (IMP) 3.2.4

Please excuse me if you had better answers before, but I cannot use my own
computer nor a decent mail reader at the moment (crappy webmail), so following
threads is not easy.

Selon Werner LEMBERG <address@hidden>:

> I tried
>
>   #(define (rest-fermata)
>     (make-music 'OverrideProperty
>                 'symbol 'TextScript
>                 'grob-property 'padding
>                 'grob-value -2
>                 'once #t)
>     (make-music 'TextScriptEvent
>                 'text (make-musicglyph-markup "scripts-ufermata")))

This function only return the last make-music form, the first is lost for ever.
Besides, it is not a correct override property expression afaick (I don't have a
copy of LilyPond on hand).

In general, when you want to build a music expression in scheme, first display
an expression written using the regular syntax. For instance:

=======
testFermata = { \once \override Voice . TextScript #'padding = #-2
                R1\fermata }
#(display-music testFermata)
=======

when compiling the file, the structure of the testFermata music expression will
be displayed, then you have enough material to rebuild it in scheme.

Alternatively, I use a function that directly display a correct (make-music ...)
expression, given a music variable. You might find it somewhere in
http://www.mail-archive.com/address@hidden/msg03711.html. Copy and
paste the markup->make-markup and mus:pretty-string functions, which should be
defined in the (lily) module, and add a mus:display function:

(define-public (mus:display expr)
  (display (mus:pretty-string expr))
  (newline))

Using it, writing rest-fermata becomes trivial.

(I have no mean to actually do it, sorry)
nicolas




reply via email to

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