Automagic LSR update.
authorGraham Percival <graham@percival-music.ca>
Sun, 22 Apr 2007 11:25:32 +0000 (04:25 -0700)
committerGraham Percival <graham@percival-music.ca>
Sun, 22 Apr 2007 11:25:32 +0000 (04:25 -0700)
input/lsr/LSR.ly
input/lsr/scheme/AAA-intro-advanced.ly [new file with mode: 0644]
input/lsr/scheme/GNUmakefile [new file with mode: 0644]
input/lsr/scheme/SConscript [new file with mode: 0644]
input/lsr/scheme/changing-properties-for-individual-grobs.ly [new file with mode: 0644]

index 9cabb98f31481027914b5b4913dbf42891f9a664..cc9e3525792d434d6e9bbbd99ac19703bd155e19 100644 (file)
@@ -28,6 +28,8 @@ These pages show LilyPond examples (snippets) from the
 @strong{@uref{text/collated-files.html,Text}}
 
 @strong{@uref{vocal/collated-files.html,Vocal music}}
+
+@strong{@uref{scheme/collated-files.html,Advanced stuff with scheme}}
 "
 }
 
diff --git a/input/lsr/scheme/AAA-intro-advanced.ly b/input/lsr/scheme/AAA-intro-advanced.ly
new file mode 100644 (file)
index 0000000..b907dd0
--- /dev/null
@@ -0,0 +1,21 @@
+\version "2.10.0"
+%% +.ly: Be the first .ly file for lys-to-tely.py.
+%% Better to make lys-to-tely.py include "introduction.texi" or
+%% other .texi documents too?
+
+\header{
+texidoc = #(string-append "
+@unnumbered Introduction
+
+This document shows examples from the
+@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}.
+
+In the web version of this document, you can click on the file name
+or figure for each example to see the corresponding input file.
+
+This document is for LilyPond version 
+" (lilypond-version) "." )
+}
+
+% make sure .png  is generated.
+\lyrics {  " " }
diff --git a/input/lsr/scheme/GNUmakefile b/input/lsr/scheme/GNUmakefile
new file mode 100644 (file)
index 0000000..43325ab
--- /dev/null
@@ -0,0 +1,16 @@
+
+depth = ../../../
+
+STEPMAKE_TEMPLATES=documentation texinfo tex
+LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc
+
+## Hmm, would this work?  No -- if we really want examples, move
+## to other dir (input/) comes to mind.
+## examples = font20 ancient-font
+## LOCALSTEPMAKE_TEMPLATES += ly mutopia
+
+EXTRA_DIST_FILES= 
+
+include $(depth)/make/stepmake.make
+
+TITLE=Advanced snippets
diff --git a/input/lsr/scheme/SConscript b/input/lsr/scheme/SConscript
new file mode 100644 (file)
index 0000000..f72bfff
--- /dev/null
@@ -0,0 +1,4 @@
+# -*-python-*-
+
+Import ('env', 'collate')
+collate (title = 'Advanced snippets')
diff --git a/input/lsr/scheme/changing-properties-for-individual-grobs.ly b/input/lsr/scheme/changing-properties-for-individual-grobs.ly
new file mode 100644 (file)
index 0000000..032176f
--- /dev/null
@@ -0,0 +1,53 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.10.12"
+
+\header { texidoc = "
+The @code{\applyOutput} command gives you the ability to tune any
+layout object, in any context. It requires a Scheme function with three
+arguments; advanced users can write it quite easily, whereas new users
+may want to use pre-defined functions such as this snippet, or the
+example in the manual.
+" }
+
+% ****************************************************************
+% ly snippet:
+% ****************************************************************
+
+\layout {
+  ragged-right = ##t
+}
+
+#(define (mc-squared gr org cur)
+  (let*
+   (
+     (ifs (ly:grob-interfaces gr))
+     (sp (ly:grob-property gr 'staff-position))
+   )
+   (if (memq 'note-head-interface ifs)
+    (begin
+     (ly:grob-set-property! gr 'stencil ly:text-interface::print)
+     (ly:grob-set-property! gr 'font-family 'roman)
+     (ly:grob-set-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"))
+      ))))
+  )))
+
+\context Voice \relative c' {
+  \stemUp
+  \set autoBeaming = ##f
+
+  { <d f g b>8
+
+    \applyOutput #'Voice #mc-squared
+    <d f g b>
+  }
+}
+
+% ****************************************************************
+% end ly snippet
+% ****************************************************************