[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pitch/ octave notation
From: |
Nicolas Sceaux |
Subject: |
Re: Pitch/ octave notation |
Date: |
Wed, 15 Nov 2006 23:08:33 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) |
"Rick Hansen (aka RickH)" <address@hidden> writes:
>
> Nicolas,
>
> I'm not the original poster, I was just wondering what this pre-processor
> was, I'm ok with the current relative/absolute note entry with apostrophes.
Oops! sorry.
> I am considering macros to provide more-or-less what you would call
> "conditional \include files" or "smart \includes" that will \include
> different files for songs, paper sizes, code, copyright footers, etc. based
> on condition tests, instead of me having to physically comment/uncomment the
> \include statements I want. This and some other possibilities to generate
> lilypond code more easily for re-use, outside of simple \include files. I
> probably should have started a new thread. I'm getting the results I want
> using all native lp as well, but need some automation in file management now
> that I've got several hundred songs going at once across dozens of
> templates.
The conditionnal includes you can do with LilyPond, which you can trigger
for instance with command line options.
Consider:
includePageLayoutFile =
#(define-music-function (parser location) ()
"If page breaks and tweak dump is not asked, and the file
<basename>-page-layout.ly exists, include it."
(if (not (ly:get-option 'dump-tweaks))
(let ((tweak-filename (format #f "~a-page-layout.ly"
(ly:parser-output-name parser))))
(if (access? tweak-filename R_OK)
(begin
(ly:message "Including tweak file ~a" tweak-filename)
(set! page-layout-parser (ly:clone-parser parser))
(ly:parser-parse-string page-layout-parser
(format #f "\\include \"~a\""
tweak-filename))))))
(make-music 'SequentialMusic 'void #t))
which can be found in the file ly/music-function-init.ly of recent
versions of LilyPond.
nicolas
Re: Pitch/ octave notation, Peter O'Doherty, 2006/11/15