]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/included/script-chart.ly
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / Documentation / included / script-chart.ly
index 6adf28225784010db8ce73f0a4a20bf5fc9d6a32..e03bb4abc919e376d738a0e7bbf293070077a97c 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.12.0"
+\version "2.19.22"
 
 \header {
   texidoc ="@cindex Feta scripts
@@ -6,57 +6,189 @@ This chart shows all articulations, or scripts, that the feta font contains.
 "
 }
 
-\score {
-  <<
-    \new Voice = "scripts" {
-      c''\accent             c''\marcato         c''\staccatissimo c''\espressivo
-      c''\staccato           c''\tenuto          c''\portato
-      c''\upbow              c''\downbow         c''\flageolet
-      c''\thumb              c''^\lheel          c''\rheel
-      c''^\ltoe              c''\rtoe            c''\open
-      c''\stopped            c''\snappizzicato   c''\turn          c''\reverseturn
-      c''\trill              c''\prall           c''\mordent
-      c''\prallprall         c''\prallmordent    c''\upprall
-      c''\downprall          c''\upmordent       c''\downmordent
-      c''\pralldown          c''\prallup         c''\lineprall
-      c''\signumcongruentiae c''\shortfermata    c''\fermata
-      c''\longfermata        c''\verylongfermata c''\segno
-      c''\coda               c''\varcoda
-    }
-    \new Lyrics \lyricsto "scripts" {
-      accent             marcato         staccatissimo espressivo
-      staccato           tenuto          portato
-      upbow              downbow         flageolet
-      thumb              lheel           rheel
-      ltoe               rtoe            open
-      stopped            snappizzicato   turn          reverseturn
-      trill              prall           mordent
-      prallprall         prallmordent    upprall
-      downprall          upmordent       downmordent
-      pralldown          prallup         lineprall
-      signumcongruentiae shortfermata    fermata
-      longfermata        verylongfermata segno
-      coda               varcoda
-    }
-  >>
-  \layout {
-    line-width = 5.1\in
-    indent = 0.0\mm
-    \context {
-      \Score
-      timing = ##f
-      barAlways = ##t
-      \override NonMusicalPaperColumn #'padding = #2.5
-    }
-    \context {
-      \Staff
-      \remove "Time_signature_engraver"
-      \override BarLine #'transparent = ##t
-    }
-    \context {
-      \Lyrics
-      \override LyricText #'font-family = #'typewriter
-      \override LyricText #'font-shape = #'upright
-    }
+#(begin
+
+  (define script-list (map car default-script-alist))
+
+  (define ignore
+    '("comma"
+      "varcomma"))
+
+  (define ancient
+    '("ictus"
+      "accentus"
+      "circulus"
+      "semicirculus"
+      "signumcongruentiae"))
+
+  (define articulations
+    '("accent"
+      "espressivo"
+      "marcato"
+      "portato"
+      "staccatissimo"
+      "staccato"
+      "tenuto"))
+
+  (define ornaments
+    '("prall"
+      "mordent"
+      "prallmordent"
+      "turn"
+      "upprall"
+      "downprall"
+      "upmordent"
+      "downmordent"
+      "lineprall"
+      "prallprall"
+      "pralldown"
+      "prallup"
+      "reverseturn"
+      "trill"))
+
+  (define instrument-specific
+    '("upbow"
+      "downbow"
+      "flageolet"
+      "snappizzicato"
+      "open"
+      "halfopen"
+      "halfopenvertical"
+      "stopped"
+      "lheel"
+      "rheel"
+      "ltoe"
+      "rtoe"))
+
+  (define fermatas
+    '("shortfermata"
+      "fermata"
+      "longfermata"
+      "verylongfermata"))
+
+  (define repeats
+    '("segno"
+      "coda"
+      "varcoda"))
+
+
+  ;; remove all remaining groups from the script-list
+  (for-each
+    (lambda (x) (set! script-list (delete x script-list)))
+    (append ignore
+            ancient
+            articulations
+            ornaments
+            instrument-specific
+            fermatas
+            repeats))
+
+  ;; require all scripts to appear here
+  (if (pair? script-list) ; script-list should be empty by now
+      (ly:error
+        (_ "Unlisted scripts in Documentation/included/script-chart.ly: ~A")
+        script-list))
+
+
+  ;;;;;;; functions to generate the tables
+
+  ;;; notes
+
+  (define (make-script-note script)
+    (make-event-chord
+       (list (make-music
+               'NoteEvent
+               'duration
+               (ly:make-duration 2 0 1/1)
+               'pitch
+               (ly:make-pitch 0 0 0))
+             (make-music
+               'ArticulationEvent
+               'direction
+               ;; everything goes up except "ictus"
+               (if (string=? script "ictus") -1 1)
+               'articulation-type
+               script))))
+
+  (define (make-script-notes scripts)
+    (make-sequential-music
+      (map make-script-note scripts)))
+
+  (define (make-scripts-voice-context scripts)
+    (let ((music (make-script-notes scripts)))
+      (context-spec-music music 'Voice "voiceA")))
+
+  (define (make-scripts-vaticana-context scripts)
+    (let ((music (make-script-notes scripts)))
+      (context-spec-music music 'VaticanaVoice "voiceA")))
+
+
+  ;;; lyrics
+
+  (define (make-script-lyric script)
+    (make-event-chord
+      (list (make-music
+              'LyricEvent
+              'duration
+              (ly:make-duration 2 0 1/1)
+              'text
+              script))))
+
+  (define (make-script-lyrics scripts)
+    (make-sequential-music
+      (map make-script-lyric scripts)))
+
+  (define (make-scripts-lyrics-context scripts)
+    (let ((music (make-script-lyrics scripts)))
+      (context-spec-music music 'Lyrics "voiceA")))
+
+
+  ;;; combining notes and lyrics
+
+  (define (make-scripts-staff scripts)
+    (make-simultaneous-music
+      (list (make-scripts-voice-context scripts)
+            (make-scripts-lyrics-context scripts))))
+
+  (define (make-scripts-staff-ancient scripts)
+    (make-simultaneous-music
+      (list (make-scripts-vaticana-context scripts)
+            (make-scripts-lyrics-context scripts))))
+
+) % end of (begin ...)
+
+\layout {
+  line-width = 5.1\in
+  indent = 0.0\mm
+  \context {
+    \Score
+    timing = ##f
+    barAlways = ##t
+    \override NonMusicalPaperColumn.padding = #2.5
+    \override PaperColumn.keep-inside-line = ##t
+  }
+  \context {
+    \RhythmicStaff
+    \remove "Time_signature_engraver"
+    \hide BarLine
+    \override Stem.direction = #down
+  }
+  \context {
+    \Lyrics
+    \override LyricText.font-family = #'typewriter
+    \override LyricText.font-shape = #'upright
+  }
+  \context {
+    \VaticanaVoice
+    \override Script.padding = #0
   }
 }
+
+
+scriptStaff =
+#(define-music-function (scripts) (list?)
+   (make-scripts-staff scripts))
+
+scriptStaffAncient =
+#(define-music-function (scripts) (list?)
+   (make-scripts-staff-ancient scripts))