[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: calling a music variable using a Scheme function
From: |
Reinhold Kainhofer |
Subject: |
Re: calling a music variable using a Scheme function |
Date: |
Thu, 3 Sep 2009 13:14:11 +0200 |
User-agent: |
KMail/1.11.4 (Linux/2.6.29-02062906-generic; KDE/4.2.4; i686; ; ) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Donnerstag, 3. September 2009 11:29:48 schrieb Reinhold Kainhofer:
> > - how can I add a \header block for each \score produced
>
> In the OrchestralLily package (http://www.repo.or.cz/w/orchestrallily.git),
> I'm using this to assign a piece name to a score:
>
> #(define (oly:set_piece_header score piecename)
> (if (not-null? piecename)
> (let* ((header (make-module)))
> (module-define! header 'piece piecename)
> (ly:score-set-header! score header)))
Of course, if that score might already have a header, you better try
(ly:score-header score) before and only if that doesn't return an existing
header, then create a new one.
Cheers,
Reinhold
- --
- ------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting, http://www.lilypond.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iD8DBQFKn6UETqjEwhXvPN0RAleVAKCpEl0rAQBcWd50+Yq/GMEdJMSJPACeNMgO
Z2yBBVPGUyG35W9iVURAbao=
=/Z+k
-----END PGP SIGNATURE-----