denemo-devel
[Top][All Lists]
Advanced

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

[Denemo-devel] Setting values in the LilyPond prolog.


From: Richard Shann
Subject: [Denemo-devel] Setting values in the LilyPond prolog.
Date: Wed, 25 Mar 2009 17:00:49 +0000

I've pushed a fix that uses the DenemoDirective score prefix to preface
the entire score with whatever the user requires. The values come after
the standard ones and so will override them. We can now get rid of the
custom prolog (which was monolithic) in favor of setting individual,
tagged, values with commands such as

(d-DirectivePut-score-prefix "GlobalStaffSize" "#(set-global-staff-size 26)")

which sets the global staff size.

What people writing scripts will want to know is "where do I put a chunk
of LilyPond so that it comes out at the right place in the output file?"
That is, which level should it be at: Score, Staff, Voice, clef, note,
chord ...
To help I have created a .denemo file checked in to git under

 test/AllDenemoDirectiveOutputs.denemo
If you load this file and look at the LilyPond output you see the output
of every field currently defined. The scheme script which is doing this
is as follows:

(d-DirectivePut-chord-prefix "test" "%{chord prefix%}")
(d-DirectivePut-chord-postfix "test" "%{chord postfix%}")

(d-DirectivePut-note-prefix "test" "%{note prefix%}")
(d-DirectivePut-note-postfix "test" "%{note postfix%}")

(d-DirectivePut-staff-prefix "test" "%{staff prefix%}")
(d-DirectivePut-staff-postfix "test" "%{staff postfix%}")

(d-DirectivePut-voice-prefix "test" "%{voice prefix%}")
(d-DirectivePut-voice-postfix "test" "%{voice postfix%}")

(d-DirectivePut-score-prefix "test" "%{score prefix%}")
(d-DirectivePut-score-postfix "test" "%{score postfix%}")

(d-DirectivePut-clef-prefix "test" "%{clef prefix%}")
(d-DirectivePut-clef-postfix "test" "%{clef postfix%}")

(d-RefreshDisplay)

With this script the output of each field in the Directive appears as a
comment %{type pre/postfix%} in the LilyPond window. You need a chord to
be present for the script to successfully attach LilyPond to it, of
course.

Richard






reply via email to

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