-%% see comment for page-layout-parser definition below.
-includePageLayoutFile =
-#(define-music-function (parser location) ()
- (_i "Include the file @var{<basename>-page-layout.ly}. Deprecated as
-part of two-pass spacing.")
- (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:parser-clone parser))
- (ly:parser-parse-string page-layout-parser
- (format #f "\\include \"~a\""
- tweak-filename))))))
- (make-music 'SequentialMusic 'void #t))
-
instrumentSwitch =
#(define-music-function
(parser location name) (string?)
)
(if (not handle)
- (ly:input-message "No such instrument: ~a" name))
+ (ly:input-message location "No such instrument: ~a" name))
(context-spec-music
(make-music 'SimultaneousMusic
'elements
(_i "Remove cue notes from @var{music}.")
(music-map
(lambda (mus)
- (if (string? (ly:music-property mus 'quoted-music-name))
+ (if (and (string? (ly:music-property mus 'quoted-music-name))
+ (string=? (ly:music-property mus 'quoted-context-id) "cue"))
(ly:music-property mus 'element)
mus)) music))
-%% Parser used to read page-layout file (see includePageLayoutFile
-%% above), and then retreive score tweaks (see scoreTweak below).
-#(define page-layout-parser #f)
-
%% pageBreak and pageTurn are music functions (iso music indentifiers),
%% because music identifiers are not allowed at top-level.
pageBreak =
(ly:music-compress music
(ly:make-moment (car fraction) (cdr fraction))))
-%% see comment for page-layout-parser definition above.
-scoreTweak =
-#(define-music-function (parser location name) (string?)
- (_i "Include the score tweak, if exists.")
- (if (and page-layout-parser (not (ly:get-option 'dump-tweaks)))
- (let ((tweak-music (ly:parser-lookup page-layout-parser
- (string->symbol name))))
- (if (ly:music? tweak-music)
- tweak-music
- (make-music 'SequentialMusic)))
- (make-music 'SequentialMusic)))
-
setBeatGrouping =
#(define-music-function (parser location grouping) (pair?)
(_i "Set the beat grouping in the current time signature to