%% TODO: using define-music-function in a .scm causes crash.
+absolute =
+#(define-music-function (parser location music)
+ (ly:music?)
+ (_i "Make @var{music} absolute. This does not actually change the
+music itself but rather hides it from surrounding @code{\\relative}
+commands.")
+ (make-music 'RelativeOctaveMusic 'element music))
+
acciaccatura =
#(def-grace-function startAcciaccaturaMusic stopAcciaccaturaMusic
(_i "Create an acciaccatura from the following music expression"))
(symbol? number-pair? markup?)
(_i "Attach @var{text} to @var{grob-name} at offset @var{offset}
(use like @code{\\once})")
- (make-music 'AnnotateOutputEvent
- 'symbol grob-name
- 'X-offset (car offset)
- 'Y-offset (cdr offset)
- 'text text))
+ (make-event-chord
+ (list
+ (make-music 'AnnotateOutputEvent
+ 'symbol grob-name
+ 'X-offset (car offset)
+ 'Y-offset (cdr offset)
+ 'text text))))
balloonText =
-#(define-music-function (parser location offset text) (number-pair? markup?)
+#(define-event-function (parser location offset text) (number-pair? markup?)
(_i "Attach @var{text} at @var{offset} (use like @code{\\tweak})")
(make-music 'AnnotateOutputEvent
'X-offset (car offset)
argument))
+finger =
+#(define-event-function (parser location finger) (number-or-markup?)
+ (_i "Apply @var{finger} as a fingering indication.")
+
+ (make-music
+ 'FingeringEvent
+ (if (number? finger) 'digit 'text)
+ finger))
+
footnote =
#(define-music-function (parser location mark offset footnote item)
((markup?) number-pair? markup? symbol-list-or-music?)
#{
\set harmonicDots = ##t
\temporary \override TabNoteHead.stencil = #(tab-note-head::print-custom-fret-label (number->string fret))
- \temporary \override NoteHead.Y-extent = #(ly:make-unpure-pure-container ly:grob::stencil-height
- (lambda (grob start end)
- (ly:grob::stencil-height grob)))
+ \temporary \override NoteHead.Y-extent = #grob::always-Y-extent-from-stencil
\temporary \override NoteHead.stencil = #(lambda (grob) (ly:grob-set-property! grob 'style 'harmonic-mixed)
(ly:note-head::print grob))
#(make-harmonic
relative =
#(define-music-function (parser location pitch music)
- ((ly:pitch? (ly:make-pitch 0 0 0)) ly:music?)
- (_i "Make @var{music} relative to @var{pitch} (default @code{c'}).")
- (ly:make-music-relative! music pitch)
+ ((ly:pitch?) ly:music?)
+ (_i "Make @var{music} relative to @var{pitch}. If @var{pitch} is
+omitted, the first note in @var{music} is given in absolute pitch.")
+ ;; When \relative has no clear decision (can only happen with
+ ;; scales with an even number of steps), it goes down (see
+ ;; pitch.cc). The following formula puts out f for both the normal
+ ;; 7-step scale as well as for a "shortened" scale missing the
+ ;; final b. In either case, a first note of c will end up as c,
+ ;; namely pitch (-1, 0, 0).
+ (ly:make-music-relative! music
+ (or pitch
+ (ly:make-pitch
+ -1
+ (quotient
+ ;; size of current scale:
+ (ly:pitch-steps (ly:make-pitch 1 0))
+ 2))))
(make-music 'RelativeOctaveMusic
'element music))
(revert-time-signature-setting time-signature))
rightHandFinger =
-#(define-event-function (parser location finger) (number-or-string?)
+#(define-event-function (parser location finger) (number-or-markup?)
(_i "Apply @var{finger} as a fingering indication.")
(make-music
'StrokeFingerEvent
- 'origin location
- (if (string? finger) 'text 'digit)
+ (if (number? finger) 'digit 'text)
finger))
scaleDurations =
'quoted-context-id "cue"
'quoted-music-name what
'quoted-voice-direction dir
+ ;; following is inverse of instrumentTransposition for
+ ;; historical reasons
'quoted-transposition pitch))
transposition =
(_i "Set instrument transposition")
(context-spec-music
- (make-property-set 'instrumentTransposition
- (ly:pitch-negate pitch))
+ (make-property-set 'instrumentTransposition pitch)
'Staff))
tuplet =