Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.21"
+@c \version "2.19.22"
@c Translators: Pavel Fric
(format #f "~a, section, 1, @{~a@}, ~a" page text label))))
(formatted-toc-items (map format-line (toc-items)))
(whole-string (string-join formatted-toc-items ",\n"))
- (output-name (ly:parser-output-name parser))
+ (output-name (ly:parser-output-name))
(outfilename (format "~a.toc" output-name))
(outfile (open-output-file outfilename)))
(if (output-port? outfile)
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.21"
+@c \version "2.19.22"
@c Translators: Reinhold Kainhofer
@c Translation checkers: Till Paala
(format #f "~a, section, 1, @{~a@}, ~a" page text label))))
(formatted-toc-items (map format-line (toc-items)))
(whole-string (string-join formatted-toc-items ",\n"))
- (output-name (ly:parser-output-name parser))
+ (output-name (ly:parser-output-name))
(outfilename (format "~a.toc" output-name))
(outfile (open-output-file outfilename)))
(if (output-port? outfile)
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.21"
+@c \version "2.19.22"
@c Note: keep this node named so that `info lilypond-book' brings you here.
@node lilypond-book
(format #f "~a, section, 1, @{~a@}, ~a" page text label))))
(formatted-toc-items (map format-line (toc-items)))
(whole-string (string-join formatted-toc-items ",\n"))
- (output-name (ly:parser-output-name parser))
+ (output-name (ly:parser-output-name))
(outfilename (format "~a.toc" output-name))
(outfile (open-output-file outfilename)))
(if (output-port? outfile)
@end ignore
-@c \version "2.19.21"
+@c \version "2.19.22"
@c Translators: Jean-Charles Malahieude
@c Translation checkers:
(format #f "~a, section, 1, @{~a@}, ~a" page text label))))
(formatted-toc-items (map format-line (toc-items)))
(whole-string (string-join formatted-toc-items ",\n"))
- (output-name (ly:parser-output-name parser))
+ (output-name (ly:parser-output-name))
(outfilename (format "~a.toc" output-name))
(outfile (open-output-file outfilename)))
(if (output-port? outfile)
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.21"
+@c \version "2.19.22"
@c Note: keep this node named so that `info lilypond-book' brings you here.
@node lilypond-book
(format #f "~a, section, 1, @{~a@}, ~a" page text label))))
(formatted-toc-items (map format-line (toc-items)))
(whole-string (string-join formatted-toc-items ",\n"))
- (output-name (ly:parser-output-name parser))
+ (output-name (ly:parser-output-name))
(outfilename (format "~a.toc" output-name))
(outfile (open-output-file outfilename)))
(if (output-port? outfile)
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.21"
+@c \version "2.19.22"
@c Note: keep this node named so that `info lilypond-book' brings you here.
@node lilypond-book
(format #f "~a, section, 1, @{~a@}, ~a" page text label))))
(formatted-toc-items (map format-line (toc-items)))
(whole-string (string-join formatted-toc-items ",\n"))
- (output-name (ly:parser-output-name parser))
+ (output-name (ly:parser-output-name))
(outfilename (format "~a.toc" output-name))
(outfile (open-output-file outfilename)))
(if (output-port? outfile)
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.21"
+@c \version "2.19.22"
@c Translators: Yoshiki Sawada
(format #f "~a, section, 1, @{~a@}, ~a" page text label))))
(formatted-toc-items (map format-line (toc-items)))
(whole-string (string-join formatted-toc-items ",\n"))
- (output-name (ly:parser-output-name parser))
+ (output-name (ly:parser-output-name))
(outfilename (format "~a.toc" output-name))
(outfile (open-output-file outfilename)))
(if (output-port? outfile)
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
-\version "2.18.0"
+\version "2.19.22"
\header {
lsrtags = "paper-and-layout"
\markup { from-2.0.1-to-4.0.1-clip.eps }
\markup {
\epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps"
- (ly:parser-output-name parser)) }
+ (ly:parser-output-name)) }
}
}
}
A lilypond score internally is just a Scheme expression, generated by
the lilypond parser. Using scheme, one can also automatically generate
a score without an input file. If you have the music expression in
-scheme, a score can be generated by simply calling (scorify-music music
-parser) on your music. This will generate a score object, for which you
+scheme, a score can be generated by simply calling (scorify-music music) on your music. This will generate a score object, for which you
can then set a custom layout block with (let* ((layout
(ly:output-def-clone $defaultlayout)))
; modify the layout here, then assign it:
Finally, all you have to do it to pass this score to lilypond for
-typesetting. This snippet defines functions @code{(add-score parser
-score)}, @code{(add-text parser text)} and @code{(add-music parser
+typesetting. This snippet defines functions @code{(add-score
+score)}, @code{(add-text text)} and @code{(add-music
music)} to pass a complete score, some markup or some music to lilypond
for typesetting.
} % begin verbatim
%%
-#(define-public (add-score parser score)
- (ly:parser-define! parser 'toplevel-scores
- (cons score (ly:parser-lookup parser 'toplevel-scores))))
+#(define-public (add-score score)
+ (ly:parser-define! 'toplevel-scores
+ (cons score (ly:parser-lookup 'toplevel-scores))))
-#(define-public (add-text parser text)
- (add-score parser (list text)))
+#(define-public (add-text text)
+ (add-score (list text)))
-#(define-public (add-music parser music)
+#(define-public (add-music music)
(collect-music-aux (lambda (score)
- (add-score parser score))
- parser
+ (add-score score))
music))
-#(define-public (toplevel-book-handler parser book)
+#(define-public (toplevel-book-handler book)
(map (lambda (score)
(ly:book-add-score! book score))
- (reverse! (ly:parser-lookup parser 'toplevel-scores)))
- (ly:parser-define! parser 'toplevel-scores (list))
- (print-book-with-defaults parser book))
+ (reverse! (ly:parser-lookup 'toplevel-scores)))
+ (ly:parser-define! 'toplevel-scores (list))
+ (print-book-with-defaults book))
#(define-public (book-score-handler book score)
- (add-score parser score))
+ (add-score score))
#(define-public (book-text-handler book text)
- (add-text parser text))
+ (add-text text))
-#(define-public (book-music-handler parser book music)
- (add-music parser music))
+#(define-public (book-music-handler book music)
+ (add-music music))
%%%
'elements (list (make-music 'NoteEvent
'duration (ly:make-duration 2 0 1/1)
'pitch (ly:make-pitch 0 pitch 0)))))
- (score (scorify-music music parser))
+ (score (scorify-music music))
(layout (ly:output-def-clone $defaultlayout))
(note-name (case pitch
((0) "do")
(else "huh")))
(title (markup #:large #:line ("Score with a" note-name))))
(ly:score-add-output-def! score layout)
- (add-text parser title)
- (add-score parser score))
+ (add-text title)
+ (add-score score))
(set! pitch (modulo (1+ pitch) 7)))))
oneNoteScore =
Guide, node Updating translation committishes..
@end ignore
-@c \version "2.19.21"
+@c \version "2.19.22"
@c Note: keep this node named so that `info lilypond-book' brings you here.
@node lilypond-book
(format #f "~a, section, 1, @{~a@}, ~a" page text label))))
(formatted-toc-items (map format-line (toc-items)))
(whole-string (string-join formatted-toc-items ",\n"))
- (output-name (ly:parser-output-name parser))
+ (output-name (ly:parser-output-name))
(outfilename (format "~a.toc" output-name))
(outfile (open-output-file outfilename)))
(if (output-port? outfile)
-\version "2.16.0"
+\version "2.19.22"
%{
#(ly:set-option 'backend 'svg)
#(set! output-count 1)
\include "typography-demo.ly"
-#(define outname (ly:parser-output-name parser))
+#(define outname (ly:parser-output-name))
#(ly:set-option 'backend 'eps)
}
-\version "2.19.21"
+\version "2.19.22"
#(ly:set-option 'clip-systems)
#(define output-suffix "1")
\score {
\lyrics {
\markup { from-2.0.1-to-4.0.1-clip.eps }
- \markup { \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps" (ly:parser-output-name parser)) }
+ \markup { \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps" (ly:parser-output-name)) }
}
}
}
(char=? (peek-char port) #\]))
(read-char port))
(display c out))))))
- `(let* ((parser-clone (ly:parser-clone parser))
+ `(let* ((parser-clone (ly:parser-clone))
(input-str (string-trim-both ,lily-string))
(music (ly:parse-string-expression parser-clone input-str))
(result-str (string-trim-both (music->lily-string music parser-clone))))
}
-\version "2.17.11"
+\version "2.19.22"
%% todo : use macro, to show the statement tested.
#(ly:progress "~a\n" (ly:expand-environment "${HOME} $HOME $$ "))
%% #(ly:font-config-display-fonts)
#(ly:progress "~A\n" (ly:duration->string (ly:make-duration 2 2 3/7)))
-#(ly:parser-parse-string (ly:parser-clone parser) "foo = #1 #(ly:progress \"hello there\n\")")
+#(ly:parser-parse-string (ly:parser-clone) "foo = #1 #(ly:progress \"hello there\n\")")
#(ly:progress "~a\n" (ly:truncate-list! (iota 5) 10))
#(ly:progress "~a\n" (ly:truncate-list! (iota 10) 5))
-\version "2.19.21"
+\version "2.19.22"
\header {
texidoc = "@code{ly:parser-include-string} should include the current
string like a file @code{\\include}."
}
-#(ly:parser-include-string parser "\\relative { a4 b c d }")
+#(ly:parser-include-string "\\relative { a4 b c d }")
-\version "2.19.21"
+\version "2.19.22"
\header {
texidoc = "Various languages are supported for note names input.
%% and the parser note names:
#(begin
(set! pitchnames (ly:assoc-get 'nederlands language-pitch-names))
- (ly:parser-set-note-names parser pitchnames))
+ (ly:parser-set-note-names pitchnames))
bes4 a g fis
%% The \language command acts in the same way:
test=#(define-void-function (expect . rest)
(list? (string? "def1") (integer? "def2") (fraction? "def3") integer?)
(if (not (equal? expect rest))
- (ly:parser-error (*parser*)
+ (ly:parser-error
(format #f "Expected ~s, got ~s.\n" expect rest)
(*location*))))
test=#(define-scheme-function (str int frac exp)
((string? "def1") (integer? "def2") (number-pair? "def3") list?)
(if (not (equal? (list str int frac) exp))
- (ly:parser-error (*parser*)
+ (ly:parser-error
(format #f "Expected ~a, got ~a.\n" exp
(list str int frac))
(*location*))))
'elements (list (make-music 'NoteEvent
'duration (ly:make-duration 2 0 1/1)
'pitch scmpitch))))
- (score (scorify-music music parser))
+ (score (scorify-music music))
(layout (ly:output-def-clone $defaultlayout))
(desc (markup #:large #:line ((ly:format "Score with a ~a"
- (note-name->lily-string scmpitch parser))))))
+ (note-name->lily-string scmpitch))))))
(ly:score-add-output-def! score layout)
- (add-text parser desc)
- (add-score parser score))
+ (add-text desc)
+ (add-score score))
(set! pitch (modulo (1+ pitch) 7)))))
oneNoteScore =
(lambda ()
(music-map
ac:articulate-chord
- (ac:unfoldMusic (event-chord-wrap! music (*parser*)))))
+ (ac:unfoldMusic (event-chord-wrap! music))))
(lambda ()
(or (= ac:stealForward 0)
(begin
(main grace)
(ly:music? ly:music?)
- (set! main (event-chord-wrap! main (*parser*)))
- (set! grace (event-chord-wrap! grace (*parser*)))
+ (set! main (event-chord-wrap! main))
+ (set! grace (event-chord-wrap! grace))
(let*
((main-length (ly:music-length main))
(grace-orig-length (ly:music-length grace))
appoggiatura =
#(define-music-function (grace main)
(ly:music? ly:music?)
- (set! grace (event-chord-wrap! grace (*parser*)))
- (set! main (event-chord-wrap! main (*parser*)))
+ (set! grace (event-chord-wrap! grace))
+ (set! main (event-chord-wrap! main))
(let* ((maindur (ly:music-length main))
(grace-orig-len (ly:music-length grace))
(main-orig-len (ly:music-length main))
(C . ,(ly:make-pitch 2 0 SHARP))
)
pitchnames = \pitchnamesBagpipe
-#(ly:parser-set-note-names parser pitchnames)
+#(ly:parser-set-note-names pitchnames)
% Bagpipe music is written in something like D major. If we use
% flattened notes, the flat should be shown on all instances.
-%\version "2.19.19"
+%\version "2.19.22"
%%% These are the general utility functions and storage
% used by the built-in templates and the template kits
#(define (get-id str)
"Return the identifier with the value str"
- (ly:parser-lookup parser (string->symbol str)))
+ (ly:parser-lookup (string->symbol str)))
#(define (make-id a b)
"Return the identifier formed from concatenating the
(for-each
(lambda (id)
(define sym (string->symbol id))
- (if (null? (ly:parser-lookup parser sym))
- (ly:parser-define! parser sym #f)))
+ (if (null? (ly:parser-lookup sym))
+ (ly:parser-define! sym #f)))
ids))
% Define the lists used to hold the names and
#(define-void-function () ()
(_i "Include the string and fingering information in a chord repetition.
This function is deprecated; try using @code{\\tabChordRepeats} instead.")
- (ly:parser-define! (*parser*) '$chord-repeat-events
+ (ly:parser-define! '$chord-repeat-events
'(string-number-event fingering-event)))
%%%% You should have received a copy of the GNU General Public License
%%%% along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-\version "2.17.25"
+\version "2.19.22"
%% named durations
breve = #(ly:make-duration -1 0)
%% default note names are dutch
#(set! default-language "nederlands")
-#(note-names-language parser default-language)
+#(note-names-language default-language)
\include "drumpitch-init.ly"
\include "chord-modifiers-init.ly"
-\version "2.16.0"
+\version "2.19.22"
#(use-modules (scm graphviz))
#(define (whitelist-grob sym)
(set! grob-whitelist (cons sym grob-whitelist)))
-#(define graph (make-empty-graph (ly:parser-output-name parser)))
+#(define graph (make-empty-graph (ly:parser-output-name)))
#(define (grob-name g)
(let* ((meta (ly:grob-property g 'meta))
#(if (and #t (defined? 'set-debug-cell-accesses!))
(set-debug-cell-accesses! 5000))
-\version "2.16.0"
+\version "2.19.22"
#(if (guile-v2)
(use-modules (ice-9 curried-definitions)))
;; function has not actually started. A parser clone, in contrast,
;; can run and complete synchronously and shares the module with
;; the current parser.
- (ly:parser-parse-string (ly:parser-clone (*parser*))
+ (ly:parser-parse-string (ly:parser-clone)
"\\include \"declarations-init.ly\"")))
-#(note-names-language (*parser*) default-language)
+#(note-names-language default-language)
#(define toplevel-scores (list))
#(define toplevel-bookparts (list))
#(use-modules (ice-9 pretty-print))
$(if (ly:get-option 'include-settings)
- (ly:parser-include-string (*parser*)
+ (ly:parser-include-string
(format #f "\\include \"~a\"" (ly:get-option 'include-settings))))
\maininput
(set! toplevel-scores (list))
(book-handler (*parser*) book)))))
-#(if (eq? expect-error (ly:parser-has-error? (*parser*)))
- (ly:parser-clear-error (*parser*))
+#(if (eq? expect-error (ly:parser-has-error?))
+ (ly:parser-clear-error)
(if expect-error
- (ly:parser-error (*parser*) (_ "expected error, but none found"))))
+ (ly:parser-error (_ "expected error, but none found"))))
-\version "2.17.6"
+\version "2.19.22"
%{
%% set pitch names.
pitchnames = \makamPitchNames
-#(ly:parser-set-note-names parser makamPitchNames)
+#(ly:parser-set-note-names makamPitchNames)
#(define eksikMirroredSlashedFlat
(if (defined? 'eksikMirroredSlashedFlat)
#(define-void-function (name music) (string? ly:music?)
(_i "Define @var{music} as a quotable music expression named
@var{name}")
- (add-quotable (*parser*) name music))
+ (add-quotable name music))
%% keep these two together
afterGraceFraction = #(cons 6 8)
#(define-music-function (main grace) (ly:music? ly:music?)
(_i "Create @var{grace} note(s) after a @var{main} music expression.")
(let ((main-length (ly:music-length main))
- (fraction (ly:parser-lookup (*parser*) 'afterGraceFraction)))
+ (fraction (ly:parser-lookup 'afterGraceFraction)))
(make-simultaneous-music
(list
main
(begin
(ly:music-warning item (_ "not a spanner"))
item))
- (let* ((p (check-grob-path item (*parser*) (*location*)
+ (let* ((p (check-grob-path item (*location*)
#:default 'Bottom
#:min 2
#:max 2))
autochange =
#(define-music-function (music) (ly:music?)
(_i "Make voices that switch between staves automatically")
- (make-autochange-music (*parser*) music))
+ (make-autochange-music music))
bookOutputName =
#(define-void-function (newfilename) (string?)
(_i "Direct output for the current book block to @var{newfilename}.")
- (set! (paper-variable (*parser*) #f 'output-filename) newfilename))
+ (set! (paper-variable #f 'output-filename) newfilename))
bookOutputSuffix =
#(define-void-function (newsuffix) (string?)
(_i "Set the output filename suffix for the current book block to
@var{newsuffix}.")
- (set! (paper-variable (*parser*) #f 'output-suffix) newsuffix))
+ (set! (paper-variable #f 'output-suffix) newsuffix))
%% \breathe is defined as a music function rather than an event identifier to
%% ensure it gets useful input location information: as an event identifier,
to @var{port}, defaulting to the console.")
(let ((port (or port (current-output-port))))
(newline port)
- (display-lily-music music (*parser*) port))
+ (display-lily-music music port))
music)
displayMusic =
(_i "Compatibility function wrapping @code{EventChord} around
isolated rhythmic events occuring since version 2.15.28, after
expanding repeat chords @samp{q}.")
- (event-chord-wrap! music (*parser*)))
+ (event-chord-wrap! music))
featherDurations=
#(define-music-function (factor argument) (ly:moment? ly:music?)
If both are null, just generate @code{KeyChangeEvent}.")
(cond ((null? tonic) (make-music 'KeyChangeEvent))
((null? pitch-alist)
- (ly:parser-error (*parser*) (_ "second argument must be pitch list")
+ (ly:parser-error (_ "second argument must be pitch list")
(*location*))
(make-music 'SequentialMusic 'void #t))
(else
language =
#(define-void-function (language) (string?)
(_i "Set note names for language @var{language}.")
- (note-names-language (*parser*) language))
+ (note-names-language language))
languageSaveAndChange =
#(define-void-function (language) (string?)
(_i "Store the previous pitchnames alist, and set a new one.")
(set! previous-pitchnames pitchnames)
- (note-names-language (*parser*) language))
+ (note-names-language language))
languageRestore =
#(define-void-function () ()
(if previous-pitchnames
(begin
(set! pitchnames previous-pitchnames)
- (ly:parser-set-note-names (*parser*) pitchnames))
+ (ly:parser-set-note-names pitchnames))
(ly:input-warning (*location*) (_ "No other language was defined previously. Ignoring."))))
(let ((prop-path (check-grob-path
(if (symbol? property)
(list property)
- property)
- (*parser*) (*location*)
+ property) (*location*)
#:start 1 #:default #t #:min 2 #:max 2)))
(if prop-path
; If the head of the grob property path is a symbol--i.e.,
(append item
(if (symbol? property)
(list property)
- property))
- (*parser*) (*location*)
+ property)) (*location*)
#:default 'Bottom #:min 3 #:max 3)))
(if prop-path
#{
@var{value}. @var{grob-property-path} is a symbol list of the form
@code{Context.GrobName.property} or @code{GrobName.property}, possibly
with subproperties given as well.")
- (let ((p (check-grob-path grob-property-path (*parser*) (*location*)
+ (let ((p (check-grob-path grob-property-path (*location*)
#:default 'Bottom
#:min 3)))
(if p
;;
;; bind voice identifiers to the voices
(for-each (lambda (voice-id voice)
- (ly:parser-define! (*parser*) voice-id voice))
+ (ly:parser-define! voice-id voice))
voice-ids voices)
(ly:music-warning music
(_ "ignoring parallel music without barchecks")))))
(set! (ly:music-property arg 'parenthesize) #t))
arg)
-#(define (make-directed-part-combine-music
- parser direction chord-range part1 part2
+#(define (make-directed-part-combine-music direction chord-range part1 part2
one-context-settings
two-context-settings
shared-context-settings)
- (let* ((pc-music (make-part-combine-music
- parser (list part1 part2) direction chord-range))
+ (let* ((pc-music (make-part-combine-music (list part1 part2) direction chord-range))
(L1 (ly:music-length part1))
(L2 (ly:music-length part2))
;; keep the contexts alive for the full duration
and @var{part2} are combined into one voice where appropriate.
Optional @var{chord-range} sets the distance in steps between notes
that may be combined into a chord or unison.")
- (make-directed-part-combine-music (*parser*) #f chord-range part1 part2
+ (make-directed-part-combine-music #f chord-range part1 part2
#{ \with { \voiceOne \override DynamicLineSpanner.direction = #UP } #}
#{ \with { \voiceTwo \override DynamicLineSpanner.direction = #DOWN } #}
#{ #} ))
((number-pair? '(0 . 8)) ly:music? ly:music?)
(_i "Take the music in @var{part1} and @var{part2} and typeset so
that they share a staff with stems directed upward.")
- (make-directed-part-combine-music (*parser*) UP chord-range part1 part2
+ (make-directed-part-combine-music UP chord-range part1 part2
#{ \with { \voiceOne \override DynamicLineSpanner.direction = #UP } #}
#{ \with { \voiceThree \override DynamicLineSpanner.direction = #UP } #}
#{ \with { \voiceOne \override DynamicLineSpanner.direction = #UP } #} ))
((number-pair? '(0 . 8)) ly:music? ly:music?)
(_i "Take the music in @var{part1} and @var{part2} and typeset so
that they share a staff with stems directed downward.")
- (make-directed-part-combine-music (*parser*) DOWN chord-range part1 part2
+ (make-directed-part-combine-music DOWN chord-range part1 part2
#{ \with { \voiceFour \override DynamicLineSpanner.direction = #DOWN } #}
#{ \with { \voiceTwo \override DynamicLineSpanner.direction = #DOWN } #}
#{ \with { \voiceTwo \override DynamicLineSpanner.direction = #DOWN } #} ))
(_i "Define a tag group comprising the symbols in the symbol list
@var{tags}. Tag groups must not overlap.")
(let ((err (define-tag-group tags)))
- (if err (ly:parser-error (*parser*) err (*location*)))))
+ (if err (ly:parser-error err (*location*)))))
temporary =
#(define-music-function (music)
@var{prop} can contain additional elements in which case a nested
property (inside of an alist) is tweaked.")
(if (ly:music? item)
- (let ((p (check-grob-path prop (*parser*) (*location*)
+ (let ((p (check-grob-path prop (*location*)
#:start 1
#:default #t
#:min 2)))
;; out on its own, but this way we should get better error
;; diagnostics.
(let ((p (check-grob-path
- (append item (if (symbol? prop) (list prop) prop))
- (*parser*) (*location*)
+ (append item (if (symbol? prop) (list prop) prop)) (*location*)
#:default 'Bottom #:min 3)))
(if p
#{ \override #p = #value #}
((1) (set-accidental-style (car style)))
((2) (set-accidental-style (cadr style) (car style)))
(else
- (ly:parser-error (*parser*) (_ "not an accidental style")
+ (ly:parser-error (_ "not an accidental style")
(*location*))
(make-music 'Music))))
(_i "This defines a string tuning @var{symbol} via a list of @var{pitches}.
The @var{symbol} also gets registered in @code{defaultStringTunings}
for documentation purposes.")
- (ly:parser-define! (*parser*) symbol pitches)
+ (ly:parser-define! symbol pitches)
(set! defaultStringTunings (acons symbol pitches defaultStringTunings)))
%% guitar tunings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; autochange.scm - fairly related to part combining.
-(define-public (make-autochange-music parser music)
+(define-public (make-autochange-music music)
(define (generate-split-list change-moment event-list acc)
(if (null? event-list)
acc
(let* ((m (make-music 'AutoChangeMusic))
(m1 (make-non-relative-music (context-spec-music music 'Voice "one")))
(context-list (recording-group-emulate music
- (ly:parser-lookup parser 'partCombineListener)))
+ (ly:parser-lookup 'partCombineListener)))
(evs (car context-list))
(rev (reverse! (cdar context-list)))
(split (reverse! (generate-split-list
(if (and (car alist) (test item (cdar alist)))
(set! result (car alist)))))
-(define-public (note-name->lily-string ly-pitch parser)
+(define-public (note-name->lily-string ly-pitch)
;; here we define a custom pitch= function, since we do not want to
;; test whether octaves are also equal. (otherwise, we would be using equal?)
(define (pitch= pitch1 pitch2)
(and (= (ly:pitch-notename pitch1) (ly:pitch-notename pitch2))
(= (ly:pitch-alteration pitch1) (ly:pitch-alteration pitch2))))
- (let* ((pitches (if parser (ly:parser-lookup parser 'pitchnames)
+ (let* ((pitches (if parser (ly:parser-lookup 'pitchnames)
(assoc-get (string->symbol default-language)
language-pitch-names '())))
(result (rassoc ly-pitch pitches pitch=)))
(define-display-method GraceMusic (expr parser)
(format #f "\\grace ~a"
- (music->lily-string (ly:music-property expr 'element) parser)))
+ (music->lily-string (ly:music-property expr 'element))))
;; \acciaccatura \appoggiatura \grace
;; TODO: it would be better to compare ?start and ?stop
((music
'SlurEvent
span-direction STOP))))))
- (format #f "\\appoggiatura ~a" (music->lily-string ?music parser))))))
+ (format #f "\\appoggiatura ~a" (music->lily-string ?music))))))
(define-extra-display-method GraceMusic (expr parser)
((music
'SlurEvent
span-direction STOP))))))
- (format #f "\\acciaccatura ~a" (music->lily-string ?music parser))))))
+ (format #f "\\acciaccatura ~a" (music->lily-string ?music))))))
(define-extra-display-method GraceMusic (expr parser)
"Display method for grace."
;; startGraceMusic stopGraceMusic
(and (null? (ly:music-property ?start 'elements))
(null? (ly:music-property ?stop 'elements))
- (format #f "\\grace ~a" (music->lily-string ?music parser)))))
+ (format #f "\\grace ~a" (music->lily-string ?music)))))
;;;
;;; Music sequences
(if force-line-break (+ 2 (*indent*)) 1)
(parameterize ((*indent* (+ 2 (*indent*))))
(map-in-order (lambda (music)
- (music->lily-string music parser))
+ (music->lily-string music))
elements))
(if force-line-break 1 0)
(if force-line-break (*indent*) 1))))
(parameterize ((*indent* (+ 3 (*indent*))))
(format #f "<< ~{~a ~}>>"
(map-in-order (lambda (music)
- (music->lily-string music parser))
+ (music->lily-string music))
(ly:music-property sim 'elements)))))
(define-extra-display-method SimultaneousMusic (expr parser)
(music 'GraceMusic
element ?grace))))))
(format #f "\\afterGrace ~a ~a"
- (music->lily-string ?before-grace parser)
- (music->lily-string ?grace parser))))
+ (music->lily-string ?before-grace)
+ (music->lily-string ?grace))))
;;;
;;; Chords
(parameterize ((*omit-duration* #t))
(map-in-order
(lambda (music)
- (music->lily-string music parser))
+ (music->lily-string music))
chord-elements))
duration
(map-in-order (lambda (music)
(list
(post-event? music)
- (music->lily-string music parser)))
+ (music->lily-string music)))
other-elements))))
((ly:duration? chord-repeat)
(let ((duration (duration->lily-string chord-repeat)))
(map-in-order (lambda (music)
(list
(post-event? music)
- (music->lily-string music parser)))
+ (music->lily-string music)))
other-elements))))
((and (= 1 (length other-elements))
(not (post-event? (car other-elements))))
- (format #f (music->lily-string (car other-elements) parser)))
+ (format #f (music->lily-string (car other-elements))))
(else
(format #f "< >~:{~:[-~;~]~a~^ ~}"
(map-in-order (lambda (music)
(list
(post-event? music)
- (music->lily-string music parser)))
+ (music->lily-string music)))
other-elements))))))))
(define-display-method MultiMeasureRestMusic (mmrest parser)
(format #f "R~a~{~a~^ ~}"
(duration->lily-string (ly:music-property mmrest 'duration))
(map-in-order (lambda (music)
- (music->lily-string music parser))
+ (music->lily-string music))
(ly:music-property mmrest 'articulations))))
(define-display-method SkipMusic (skip parser)
(define (simple-note->lily-string event parser)
(format #f "~a~a~a~a~a~a~:{~:[-~;~]~a~}" ; pitchname octave !? octave-check duration optional_rest articulations
- (note-name->lily-string (ly:music-property event 'pitch) parser)
+ (note-name->lily-string (ly:music-property event 'pitch))
(octave->lily-string (ly:music-property event 'pitch))
(let ((forced (ly:music-property event 'force-accidental))
(cautionary (ly:music-property event 'cautionary)))
(map-in-order (lambda (event)
(list
(post-event? event)
- (music->lily-string event parser)))
+ (music->lily-string event)))
(ly:music-property event 'articulations))))
(define-display-method NoteEvent (note parser)
(format #f "~a~a~{~a~}" (ly:music-property note 'drum-type)
(duration->lily-string (ly:music-property note 'duration))
(map-in-order (lambda (event)
- (music->lily-string event parser))
+ (music->lily-string event))
(ly:music-property note 'articulations))))
(else
;; pure duration
(duration->lily-string (ly:music-property note 'duration)
#:force-duration #t)
(map-in-order (lambda (event)
- (music->lily-string event parser))
+ (music->lily-string event))
(ly:music-property note 'articulations))))))
(define-display-method ClusterNoteEvent (note parser)
(format #f "r~a~{~a~}"
(duration->lily-string (ly:music-property rest 'duration))
(map-in-order (lambda (event)
- (music->lily-string event parser))
+ (music->lily-string event))
(ly:music-property rest 'articulations)))))
(define-display-method MultiMeasureRestEvent (rest parser)
(format #f "s~a~{~a~}"
(duration->lily-string (ly:music-property rest 'duration))
(map-in-order (lambda (event)
- (music->lily-string event parser))
+ (music->lily-string event))
(ly:music-property rest 'articulations))))
(define-display-method RepeatedChord (chord parser)
- (music->lily-string (ly:music-property chord 'element) parser))
+ (music->lily-string (ly:music-property chord 'element)))
(define-display-method MarkEvent (mark parser)
(let ((label (ly:music-property mark 'label)))
(let ((c-pitch-alist (ly:transpose-key-alist pitch-alist
(ly:pitch-diff (ly:make-pitch 0 0 0) tonic))))
(format #f "\\key ~a \\~a~a"
- (note-name->lily-string (ly:music-property key 'tonic) parser)
+ (note-name->lily-string (ly:music-property key 'tonic))
(any (lambda (mode)
(if (and parser
- (equal? (ly:parser-lookup parser mode) c-pitch-alist))
+ (equal? (ly:parser-lookup mode) c-pitch-alist))
(symbol->string mode)
#f))
'(major minor ionian locrian aeolian mixolydian lydian phrygian dorian))
(define-display-method RelativeOctaveCheck (octave parser)
(let ((pitch (ly:music-property octave 'pitch)))
(format #f "\\octaveCheck ~a~a"
- (note-name->lily-string pitch parser)
+ (note-name->lily-string pitch)
(octave->lily-string pitch))))
(define-display-method VoiceSeparator (sep parser)
(format #f "~s" string)
string))
(markup->lily-string text)))
- (map-in-order (lambda (m) (music->lily-string m parser))
+ (map-in-order (lambda (m) (music->lily-string m))
(ly:music-property lyric 'articulations))))
(define-display-method BreathingEvent (event parser)
(define-display-method AutoChangeMusic (m parser)
(format #f "\\autochange ~a"
- (music->lily-string (ly:music-property m 'element) parser)))
+ (music->lily-string (ly:music-property m 'element))))
(define-display-method ContextChange (m parser)
(format #f "\\change ~a = \"~a\""
den
num
formatted-span
- (music->lily-string (ly:music-property times 'element) parser)))))
+ (music->lily-string (ly:music-property times 'element))))))
result)))
(define-display-method RelativeOctaveMusic (m parser)
- (music->lily-string (ly:music-property m 'element) parser))
+ (music->lily-string (ly:music-property m 'element)))
(define-display-method TransposedMusic (m parser)
- (music->lily-string (ly:music-property m 'element) parser))
+ (music->lily-string (ly:music-property m 'element)))
;;;
;;; Repeats
(define-display-method AlternativeEvent (alternative parser) "")
(define (repeat->lily-string expr repeat-type parser)
- (let* ((main (music->lily-string (ly:music-property expr 'element) parser)))
+ (let* ((main (music->lily-string (ly:music-property expr 'element))))
(format #f "\\repeat ~a ~a ~a ~a"
repeat-type
(ly:music-property expr 'repeat-count)
""
(format #f "\\alternative { ~{~a ~}}"
(map-in-order (lambda (music)
- (music->lily-string music parser))
+ (music->lily-string music))
alternatives)))))))
(define-display-method VoltaRepeatedMusic (expr parser)
operations))
(*indent*)))
(parameterize ((*current-context* ctype))
- (music->lily-string music parser)))))
+ (music->lily-string music)))))
;; special cases: \figures \lyrics \drums
(define-extra-display-method ContextSpeccedMusic (expr parser)
(parameterize ((*explicit-mode* #f))
(case ?context-type
((FiguredBass)
- (format #f "\\figures ~a" (music->lily-string ?sequence parser)))
+ (format #f "\\figures ~a" (music->lily-string ?sequence)))
((Lyrics)
- (format #f "\\lyrics ~a" (music->lily-string ?sequence parser)))
+ (format #f "\\lyrics ~a" (music->lily-string ?sequence)))
((DrumStaff)
- (format #f "\\drums ~a" (music->lily-string ?sequence parser)))
+ (format #f "\\drums ~a" (music->lily-string ?sequence)))
(else
#f)))
#f)))
(and (sequence? element)
(every property-tuning? (ly:music-property element 'elements)))))
(parameterize ((*current-context* (ly:music-property expr 'context-type)))
- (music->lily-string element parser))
+ (music->lily-string element))
#f)))
-(define-public (value->lily-string arg parser)
+(define-public (value->lily-string arg)
(cond ((ly:music? arg)
- (music->lily-string arg parser))
+ (music->lily-string arg))
((string? arg)
(format #f "#~s" arg))
((markup? arg)
(format #f "##{ ~a #}" (duration->lily-string arg #:force-duration #t)))
((ly:pitch? arg)
(format #f "~a~a"
- (note-name->lily-string arg parser)
+ (note-name->lily-string arg)
(octave->lily-string arg)))
(else
(format #f "#~a" (scheme-expr->lily-string arg)))))
""
(format #f "~a . " (*current-context*)))
property
- (value->lily-string value parser)
+ (value->lily-string value)
(new-line->lily-string))))
(define-display-method PropertyUnset (expr parser)
(if (eqv? (*current-context*) 'Bottom)
(cons symbol properties)
(cons* (*current-context*) symbol properties))
- (value->lily-string value parser)
+ (value->lily-string value)
(new-line->lily-string))))
(define-display-method RevertProperty (expr parser)
(define-display-method PartCombineMusic (expr parser)
(format #f "\\partcombine ~{~a ~}"
(map-in-order (lambda (music)
- (music->lily-string music parser))
+ (music->lily-string music))
(ly:music-property expr 'elements))))
(define-extra-display-method PartCombineMusic (expr parser)
(cond ((equal? ?dir UP) "Up")
((equal? ?dir DOWN) "Down")
(else ""))
- (music->lily-string ?sequence1 parser)
+ (music->lily-string ?sequence1)
(new-line->lily-string)
- (music->lily-string ?sequence2 parser))))
+ (music->lily-string ?sequence2))))
(define-extra-display-method ContextSpeccedMusic (expr parser)
"If `expr' is a \\partcombine expression, return \"\\partcombine ...\".
?pc-music))))
(with-music-match
(?pc-music (music 'PartCombineMusic))
- (format #f "~a" (music->lily-string ?pc-music parser)))))
+ (format #f "~a" (music->lily-string ?pc-music)))))
(define-display-method UnrelativableMusic (expr parser)
- (music->lily-string (ly:music-property expr 'element) parser))
+ (music->lily-string (ly:music-property expr 'element)))
;;; Cue notes
(define-display-method QuoteMusic (expr parser)
(format #f "\\cueDuring #~s #~a ~a"
?quoted-music-name
?quoted-voice-direction
- (music->lily-string ?music parser)))
+ (music->lily-string ?music)))
(format #f "\\quoteDuring #~s ~a"
(ly:music-property expr 'quoted-music-name)
- (music->lily-string (ly:music-property expr 'element) parser))))
+ (music->lily-string (ly:music-property expr 'element)))))
;;;
;;; Breaks
(ly:music-property expr 'associated-context)
(parameterize ((*explicit-mode* #f)
(*omit-duration* #t))
- (music->lily-string (ly:music-property expr 'element) parser))))
+ (music->lily-string (ly:music-property expr 'element)))))
;; \addlyrics
(define-extra-display-method SimultaneousMusic (expr parser)
element ?lyric-sequence)))))
(if (string=? ?id ?associated-id)
(format #f "~a~a \\addlyrics ~a"
- (music->lily-string ?note-sequence parser)
+ (music->lily-string ?note-sequence)
(new-line->lily-string)
(parameterize ((*explicit-mode* #f)
(*omit-duration* #t))
- (music->lily-string ?lyric-sequence parser)))
+ (music->lily-string ?lyric-sequence)))
#f)))
;; Silence internal event sent at end of each lyrics block
'((espanol español)
(italiano français)))
-(define-public (note-names-language parser str)
+(define-public (note-names-language str)
(_ "Select note names language.")
(let ((alist (assoc-get (string->symbol str)
language-pitch-names
(begin
(ly:debug (_ "Using `~a' note names...") str)
(set! pitchnames alist)
- (ly:parser-set-note-names parser alist))
+ (ly:parser-set-note-names alist))
(ly:warning (_ "Could not find language `~a'. Ignoring.") str))))
(scheme-expr->lily-string val))))
(ly:music-property expr 'tweaks))))
-(define-public (music->lily-string expr parser)
+(define-public (music->lily-string expr)
"Print @var{expr}, a music expression, in LilyPond syntax."
(if (ly:music? expr)
(let* ((music-type (ly:music-property expr 'name))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; parser <-> output hooks.
-(define-public (collect-bookpart-for-book parser book-part)
+(define-public (collect-bookpart-for-book book-part)
"Toplevel book-part handler."
(define (add-bookpart book-part)
- (ly:parser-define!
- parser 'toplevel-bookparts
- (cons book-part (ly:parser-lookup parser 'toplevel-bookparts))))
+ (ly:parser-define! 'toplevel-bookparts
+ (cons book-part (ly:parser-lookup 'toplevel-bookparts))))
;; If toplevel scores have been found before this \bookpart,
;; add them first to a dedicated bookpart
- (if (pair? (ly:parser-lookup parser 'toplevel-scores))
+ (if (pair? (ly:parser-lookup 'toplevel-scores))
(begin
(add-bookpart (ly:make-book-part
- (ly:parser-lookup parser 'toplevel-scores)))
- (ly:parser-define! parser 'toplevel-scores (list))))
+ (ly:parser-lookup 'toplevel-scores)))
+ (ly:parser-define! 'toplevel-scores (list))))
(add-bookpart book-part))
-(define-public (collect-scores-for-book parser score)
- (ly:parser-define!
- parser 'toplevel-scores
- (cons score (ly:parser-lookup parser 'toplevel-scores))))
+(define-public (collect-scores-for-book score)
+ (ly:parser-define! 'toplevel-scores
+ (cons score (ly:parser-lookup 'toplevel-scores))))
-(define-public (collect-music-aux score-handler parser music)
+(define-public (collect-music-aux score-handler music)
(define (music-property symbol)
(ly:music-property music symbol #f))
(cond ((music-property 'page-marker)
((not (music-property 'void))
;; a regular music expression: make a score with this music
;; void music is discarded
- (score-handler (scorify-music music parser)))))
+ (score-handler (scorify-music music)))))
-(define-public (collect-music-for-book parser music)
+(define-public (collect-music-for-book music)
"Top-level music handler."
(collect-music-aux (lambda (score)
- (collect-scores-for-book parser score))
- parser
+ (collect-scores-for-book score))
music))
-(define-public (collect-book-music-for-book parser book music)
+(define-public (collect-book-music-for-book book music)
"Book music handler."
(collect-music-aux (lambda (score)
(ly:book-add-score! book score))
- parser
music))
-(define-public (scorify-music music parser)
+(define-public (scorify-music music)
"Preprocess @var{music}."
(ly:make-score
(fold (lambda (f m) (f m parser))
(define (get-current-filename parser book)
"return any suffix value for output filename allowing for settings by
calls to bookOutputName function"
- (or (paper-variable parser book 'output-filename)
- (ly:parser-output-name parser)))
+ (or (paper-variable book 'output-filename)
+ (ly:parser-output-name)))
(define (get-current-suffix parser book)
"return any suffix value for output filename allowing for settings by calls to
bookoutput function"
- (let ((book-output-suffix (paper-variable parser book 'output-suffix)))
+ (let ((book-output-suffix (paper-variable book 'output-suffix)))
(if (not (string? book-output-suffix))
- (ly:parser-lookup parser 'output-suffix)
+ (ly:parser-lookup 'output-suffix)
book-output-suffix)))
(define-public current-outfile-name #f) ; for use by regression tests
(let* ((base-name (get-current-filename parser book))
(output-suffix (get-current-suffix parser book))
(alist-key (format #f "~a~a" base-name output-suffix))
- (counter-alist (ly:parser-lookup parser 'counter-alist))
+ (counter-alist (ly:parser-lookup 'counter-alist))
(output-count (assoc-get alist-key counter-alist 0))
(result base-name))
;; Allow all ASCII alphanumerics, including accents
(if (> output-count 0)
(set! result (format #f "~a-~a" result output-count)))
- (ly:parser-define!
- parser 'counter-alist
+ (ly:parser-define! 'counter-alist
(assoc-set! counter-alist alist-key (1+ output-count)))
(set! current-outfile-name result)
result))
(define (print-book-with parser book process-procedure)
- (let* ((paper (ly:parser-lookup parser '$defaultpaper))
- (layout (ly:parser-lookup parser '$defaultlayout))
+ (let* ((paper (ly:parser-lookup '$defaultpaper))
+ (layout (ly:parser-lookup '$defaultlayout))
(outfile-name (get-outfile-name parser book)))
(process-procedure book paper layout outfile-name)))
-(define-public (print-book-with-defaults parser book)
+(define-public (print-book-with-defaults book)
(print-book-with parser book ly:book-process))
-(define-public (print-book-with-defaults-as-systems parser book)
+(define-public (print-book-with-defaults-as-systems book)
(print-book-with parser book ly:book-process-to-systems))
;; Add a score to the current bookpart, book or toplevel
-(define-public (add-score parser score)
+(define-public (add-score score)
(cond
- ((ly:parser-lookup parser '$current-bookpart)
- ((ly:parser-lookup parser 'bookpart-score-handler)
- (ly:parser-lookup parser '$current-bookpart) score))
- ((ly:parser-lookup parser '$current-book)
- ((ly:parser-lookup parser 'book-score-handler)
- (ly:parser-lookup parser '$current-book) score))
+ ((ly:parser-lookup '$current-bookpart)
+ ((ly:parser-lookup 'bookpart-score-handler)
+ (ly:parser-lookup '$current-bookpart) score))
+ ((ly:parser-lookup '$current-book)
+ ((ly:parser-lookup 'book-score-handler)
+ (ly:parser-lookup '$current-book) score))
(else
- ((ly:parser-lookup parser 'toplevel-score-handler) parser score))))
+ ((ly:parser-lookup 'toplevel-score-handler) parser score))))
(define-public paper-variable
(let
(append (if (and book (ly:output-def? (ly:book-paper book)))
(list (ly:book-paper book))
'())
- (ly:parser-lookup parser '$papers)
- (list (ly:parser-lookup parser '$defaultpaper))))))
+ (ly:parser-lookup '$papers)
+ (list (ly:parser-lookup '$defaultpaper))))))
(make-procedure-with-setter
(lambda (parser book symbol)
(any (lambda (p) (ly:output-def-lookup p symbol #f))
(car (get-papers parser book))
symbol value)))))
-(define-public (add-text parser text)
- (add-score parser (list text)))
+(define-public (add-text text)
+ (add-score (list text)))
-(define-public (add-music parser music)
+(define-public (add-music music)
(collect-music-aux (lambda (score)
- (add-score parser score))
- parser
+ (add-score score))
music))
-(define-public (context-mod-from-music parser music)
+(define-public (context-mod-from-music music)
(let ((warn #t) (mods (ly:make-context-mod)))
(let loop ((m music))
(if (music-is-of-type? m 'layout-instruction-event)
(set! warn #f)))))))))
mods))
-(define-public (context-defs-from-music parser output-def music)
+(define-public (context-defs-from-music output-def music)
(let ((warn #t))
(let loop ((m music) (mods #f))
;; The parser turns all sets, overrides etc into something
(define (music-function-call-error loc fun m)
(let* ((sig (ly:music-function-signature fun))
(pred (if (pair? (car sig)) (caar sig) (car sig))))
- (ly:parser-error (*parser*)
+ (ly:parser-error
(format #f (_ "~a function cannot return ~a")
(type-name pred)
- (value->lily-string m (*parser*)))
+ (value->lily-string m))
loc)
(and (pair? (car sig)) (cdar sig))))
(define-ly-syntax (argument-error location n pred arg)
(ly:parser-error
- (*parser*)
(format #f
(_ "wrong type for argument ~a. Expecting ~a, found ~s")
n (type-name pred) (music->make-music arg))
(use-modules (srfi srfi-39)
(scm display-lily))
-(define*-public (display-lily-music expr parser #:optional (port (current-output-port))
+(define*-public (display-lily-music expr #:optional (port (current-output-port))
#:key force-duration)
"Display the music expression using LilyPond syntax"
(memoize-clef-names supported-clefs)
(parameterize ((*indent* 0)
(*omit-duration* #f))
- (display (music->lily-string expr parser) port)
+ (display (music->lily-string expr) port)
(newline port)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; property setting music objs.
-(define-safe-public (check-grob-path path #:optional parser location
+(define-safe-public (check-grob-path path #:optional location
#:key
(start 0)
default
res
(begin
(if parser
- (ly:parser-error parser
+ (ly:parser-error
(format #f (_ "bad grob property path ~a")
path)
location))
the 'length property of the music is
overridden to speed up compiling."
(let*
- ((show-last (ly:parser-lookup parser 'showLastLength))
- (show-first (ly:parser-lookup parser 'showFirstLength))
+ ((show-last (ly:parser-lookup 'showLastLength))
+ (show-first (ly:parser-lookup 'showFirstLength))
(show-last-length (and (ly:music? show-last)
(ly:music-length show-last)))
(show-first-length (and (ly:music? show-first)
(list
(lambda (music parser) (expand-repeat-chords!
(cons 'rhythmic-event
- (ly:parser-lookup parser '$chord-repeat-events))
+ (ly:parser-lookup '$chord-repeat-events))
music))
(lambda (music parser) (expand-repeat-notes! music))
(lambda (music parser) (voicify-music music))
(lambda (x parser) (music-map precompute-music-length x))
(lambda (music parser)
- (music-map (quote-substitute (ly:parser-lookup parser 'musicQuotes)) music))
+ (music-map (quote-substitute (ly:parser-lookup 'musicQuotes)) music))
;; switch-on-debugging
(lambda (x parser) (music-map cue-substitute x))
(any (lambda (t) (music-is-of-type? m t)) type))
(lambda (m) (music-is-of-type? m type)))))
-(define*-public (event-chord-wrap! music #:optional parser)
+(define*-public (event-chord-wrap! music #:optional)
"Wrap isolated rhythmic events and non-postevent events in
@var{music} inside of an @code{EventChord}. If the optional
@var{parser} argument is given, chord repeats @samp{q} are expanded
(if parser
(expand-repeat-chords!
(cons 'rhythmic-event
- (ly:parser-lookup parser '$chord-repeat-events))
+ (ly:parser-lookup '$chord-repeat-events))
music)
music)))
"Set the default staff size, where SZ is thought to be in PT."
(let* ((current-mod (current-module))
(parser (eval 'parser current-mod))
- (pap (ly:parser-lookup parser '$defaultpaper))
+ (pap (ly:parser-lookup '$defaultpaper))
(in-layout? (or (module-defined? current-mod 'is-paper)
(module-defined? current-mod 'is-layout)))
closures)))))))))))
(define (embedded-lilypond parser lily-string filename line
closures location)
- (let* ((clone (ly:parser-clone parser closures location))
+ (let* ((clone (ly:parser-clone closures location))
(result (ly:parse-string-expression clone lily-string
filename line)))
(if (ly:parser-has-error? clone)
- (ly:parser-error parser (_ "error in #{ ... #}")))
+ (ly:parser-error (_ "error in #{ ... #}")))
result))
(list embedded-lilypond
(list *parser*) lily-string filename line
global)
context-list))
-(define-public (make-part-combine-music parser music-list direction chord-range)
+(define-public (make-part-combine-music music-list direction chord-range)
(let* ((m (make-music 'PartCombineMusic))
(m1 (make-non-relative-music (context-spec-music (first music-list) 'Voice "one")))
(m2 (make-non-relative-music (context-spec-music (second music-list) 'Voice "two")))
- (listener (ly:parser-lookup parser 'partCombineListener))
+ (listener (ly:parser-lookup 'partCombineListener))
(evs2 (recording-group-emulate m2 listener))
(evs1 (recording-group-emulate m1 listener)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(define-public (add-quotable parser name mus)
+(define-public (add-quotable name mus)
(let* ((tab (eval 'musicQuotes (current-module)))
(voicename (get-next-unique-voice-name))
;; recording-group-emulate returns an assoc list (reversed!), so
;; hand it a proper unique context name and extract that key:
(ctx-spec (context-spec-music mus 'Voice voicename))
- (listener (ly:parser-lookup parser 'partCombineListener))
+ (listener (ly:parser-lookup 'partCombineListener))
(context-list (reverse (recording-group-emulate ctx-spec listener)))
(raw-voice (assoc voicename context-list))
(quote-contents (if (pair? raw-voice) (cdr raw-voice) '())))