]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/regression/note-head-style.ly
Issue 4956/4: Add regtest for \retrograde
[lilypond.git] / input / regression / note-head-style.ly
index 32f660bd0882b6cb6a9a64cedab23d22449587a4..c0833981e46053e04357afe8e42e34421a7a14ff 100644 (file)
@@ -1,63 +1,84 @@
+\version "2.19.22"
 \header{
-texidoc="
-Note head shapes are settable.  The stem endings should be adjusted
-per note head.  If you want different note head styles on one stem,
-you must create a special context called Thread.
+  texidoc="
+Note head shapes may be set from several choices.
+The stem endings should be adjusted according to the note head.
+If you want different note head styles on one stem,
+you must create a special context.
 
 Harmonic notes have a different shape and different
-dimensions. Nevertheless, noteheads in both styles can be combined, on
-either up or down stems.
-";
+dimensions.
+"
 }
 
+\layout {
+  indent = 0.0
+  ragged-right = ##t
+}
 
+pattern =
+#(define-music-function (name style) (markup? ly:context-mod?)
+#{ <<
+  s1^#name
+  \new Voice \with #style {
+    \override Stem.direction = #UP
+    e'4 e'2. e'1 e'\breve*1/2 e'\longa*1/4
+  }
+  \new Voice \with #style {
+    \override Stem.direction = #DOWN
+    g4 g2. g1 g\breve*1/2 g\longa*1/4
+  }
+>> #})
 
+patternStyle =
+#(define-music-function (style) (symbol?)
+  #{
+     \pattern #(symbol->string style) \with {
+       \override NoteHead.style = #style
+     }
+  #})
 
-\score { \notes \relative c{
+\transpose c c {
+  \clef C
 
-c''4 c2 c8  c16 c16 c1 c\breve
-\property Voice.NoteHead \set #'style = #'diamond
-c4 c2 c8  c16 c16  c1 c\breve
-\property Voice.NoteHead \set #'style = #'transparent
-c4 c2 c8  c16 c16  c1 c\breve
-\property Voice.NoteHead \set #'style = #'cross
-c4 c2 c8  c16 c16  c1 c\breve
-\property Voice.NoteHead \set #'style = #'mensural
-c4 c2 c8  c16 c16  c1 c\breve c\longa
-\property Voice.NoteHead \set #'style = #'harmonic
-c4 c2 c8  c16 c16  c1 c\breve
-\property Voice.NoteHead \set #'style = #'baroque
-c4 c2 c8  c16 c16  c1 c\breve c\longa
+  \patternStyle default
+  \patternStyle altdefault
 
+  \break
 
-   \context Voice <
-    \context Thread = TA
-      {
-        \property Thread.NoteHead \set #'style = #'cross
-        \property Voice.Stem \set #'direction = #1
-        c16
-       }
-    \context Thread = TB
-      { \property Thread.NoteHead \set #'style = #'default a16  }
+  \patternStyle baroque
+  \patternStyle neomensural
 
-    \context Thread = TC
-      { \property Thread.NoteHead \set #'style = #'mensural d16 }
+  \break
 
-  >
+  \patternStyle mensural
+  \patternStyle petrucci
 
+  \break
 
-   \context Voice <\context Thread = TA {
-   \property Thread.NoteHead \set #'style = #'default
-   c4 c4 }
-\context Thread = TB {
-   \property Thread.NoteHead \set #'style = #'mensural
-  c'4 \stemDown c
-} >
+  \patternStyle harmonic
+  \patternStyle harmonic-black
 
-}
+  \break
 
-    \paper {
+  \patternStyle harmonic-mixed
+  \patternStyle diamond
 
+  \break
+
+  \patternStyle cross
+  \patternStyle xcircle
+
+  \break
+
+  \patternStyle triangle
+  \patternStyle slash
+
+  \break
+
+  \pattern "kievan" \with { \kievanOn }
 
 }
-}
+
+
+