]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/regression/apply-output.ly
Release: bump Welcome versions.
[lilypond.git] / input / regression / apply-output.ly
index 88e9b7045f3e37cd6b4032dcad9935c467350762..fd1268dee871e9c9a1d4725ed87760587914e403 100644 (file)
@@ -1,51 +1,31 @@
+\version "2.19.24"
 
-\version "1.9.1" 
 \header {
-
-texidoc = "The @code{\applyoutput} expression is the most flexible way to
+  texidoc = "The @code{\\applyOutput} expression is the most flexible way to
 tune properties for individual grobs.
 
 Here, the layout of a note head is changed depending on its vertical
 position.
 "
-
 }
 
-#(define  (mc-squared gr org cur)
-  (let*
-      (
-       (ifs (ly:get-grob-property gr 'interfaces))
-       (sp (ly:get-grob-property gr 'staff-position))
-       )
-  (if (and (memq 'note-head-interface ifs)
-          (memq sp '(-2 -3 -5)))
-      (begin
-       (ly:set-grob-property! gr 'molecule-callback brew-new-markup-molecule)
-       (ly:set-grob-property! gr 'font-family 'roman)
-       (ly:set-grob-property!
-        gr 'text
-        (make-raise-markup -0.5
-                           (case sp
-                             ((-5) (make-simple-markup "m"))
-                             ((-3) (make-simple-markup "c "))
-                             ((-2) (make-smaller-markup (make-bold-markup "2")))
-                             (else (make-simple-markup "bla"))
-                             ))))
-      )))
-
-\score {
-
-\notes \context Voice \relative  c' {
-                                     \stemUp
-                                     \property Voice.autoBeaming = ##f
-   { <<d f g b>>8
-     \context Voice \applyoutput #mc-squared
-
-        <<d f g b>>
-   }
-             
-   }
-\paper { raggedright = ##t
-%                   outputscale = 5
-                    } 
+#(define (mc-squared gr org cur)
+   (let ((sp (ly:grob-property gr 'staff-position)))
+     (ly:grob-set-property!
+      gr 'stencil
+      (grob-interpret-markup gr
+                            #{ \markup \raise #-0.5
+                               #(case sp
+                                  ((-5) "m")
+                                  ((-3) "c ")
+                                  ((-2) #{ \markup \teeny \bold 2 #})
+                                  (else "bla")) #}))))
+
+\new Voice \relative {
+  \set autoBeaming = ##f
+
+  <d' f g b>8
+
+  \applyOutput Voice.NoteHead #mc-squared
+  <d f g b>8
 }