From 108bc5787b44c5df85a9d73032b5416fa4a92e86 Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Wed, 7 Feb 2007 21:09:41 -0800 Subject: [PATCH] More LSR integration stuff. Put snippets in this directory. --- input/tolsr/README | 6 ++ input/tolsr/clip-systems.ly | 85 +++++++++++++++++++ input/tolsr/contemporary/.DS_Store | Bin 0 -> 6148 bytes input/tolsr/contemporary/line-arrows.ly | 28 ++++++ input/tolsr/preparing/quote-transposition.ly | 45 ++++++++++ input/tolsr/preparing/quote.ly | 41 +++++++++ input/tolsr/text/utf-8.ly | 63 ++++++++++++++ 7 files changed, 268 insertions(+) create mode 100644 input/tolsr/README create mode 100644 input/tolsr/clip-systems.ly create mode 100644 input/tolsr/contemporary/.DS_Store create mode 100644 input/tolsr/contemporary/line-arrows.ly create mode 100644 input/tolsr/preparing/quote-transposition.ly create mode 100644 input/tolsr/preparing/quote.ly create mode 100644 input/tolsr/text/utf-8.ly diff --git a/input/tolsr/README b/input/tolsr/README new file mode 100644 index 0000000000..aa37a90705 --- /dev/null +++ b/input/tolsr/README @@ -0,0 +1,6 @@ +If you have a snippet that should be added to the official approved +LSR snippets, please leave it here. We'll take care of it. + +Note that LSR is currently 2.10. You can add snippets that require 2.11 +to this directory, but they will not be added until LSR is updated. + diff --git a/input/tolsr/clip-systems.ly b/input/tolsr/clip-systems.ly new file mode 100644 index 0000000000..06247e76b5 --- /dev/null +++ b/input/tolsr/clip-systems.ly @@ -0,0 +1,85 @@ +\header { + texidoc = "Clipping snippets from a finished score + +Notes: + +@itemize @bullet +@item If system starts and ends are included, they include extents of the System grob, eg. instrument names. +@item Grace notes at the end point of the region are not included +@item Regions can span multiple systems. In this case, multiple EPS files are generated. +@end itemize + +This file needs to be run separately with @code{-dclip-systems}; the +collated-files.html of the regression test does not adequately show +the results. + +The result will be files named +@file{@var{base}-from-@var{start}-to-@var{end}[-@var{count}].eps}. +" + +} + +\version "2.10.0" + +#(ly:set-option 'clip-systems) + +#(set! output-count 1) + +origScore = \score{ + \relative { + \set Staff.instrumentName = #"bla" + c1 + d + \grace c16 + e1 + \key d\major + + f + \break \clef bass + g, + fis + } +} + +\book { + \score { + \origScore + \layout { + + %% each clip-region is a (START . END) pair + %% where both are rhythmic-locations. + + %% (make-rhythmic-locations BAR-NUMBER NUM DEN) + %% means NUM/DEN whole-notes into bar numbered BAR-NUMBER + + clip-regions + = #(list + (cons + (make-rhythmic-location 2 0 1) + (make-rhythmic-location 4 0 1)) + + (cons + (make-rhythmic-location 0 0 1) + (make-rhythmic-location 4 0 1)) + + (cons + (make-rhythmic-location 0 0 1) + (make-rhythmic-location 6 0 1)) + ) + } + } +} + +#(set! output-count 0) +#(ly:set-option 'clip-systems #f) + +\book { + \score { \origScore } + \markup { \bold \fontsize #6 clips } + \score { + \lyrics { + \markup { from-2.0.1-to-4.0.1-clip.eps } + \markup { \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps" (ly:parser-output-name parser)) } + } + } +} diff --git a/input/tolsr/contemporary/.DS_Store b/input/tolsr/contemporary/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..1bf9c2c78defd6abfd06586ae97598b6c1f51024 GIT binary patch literal 6148 zcmeHKJx{|x41Im zUpDP})wC&snJ&)!Wq0#4}hr@;drx$ik{x%UPwURcTApFHL!E!3Pn7X z=&2G{4DodOOT^W{&e78$wlnL*&Js5ivEAt}77nS7X_J9upwGaePp8`dm((Bb|NW$# zB?HO8pJG5pi>t+)pA@}y@NwE}3-yNjA&j+fn%*IR6K%z(dvQg_jH`j2qovbt>BKw; MC@(3=z;7_H1IgbjSpWb4 literal 0 HcmV?d00001 diff --git a/input/tolsr/contemporary/line-arrows.ly b/input/tolsr/contemporary/line-arrows.ly new file mode 100644 index 0000000000..7512711cb1 --- /dev/null +++ b/input/tolsr/contemporary/line-arrows.ly @@ -0,0 +1,28 @@ +\header { + texidoc = "Arrows can be applied to text-spanners and line-spanners (such as the Glissando)" +} + +\version "2.10.0" + +\paper { + ragged-right = ##t +} + +\relative c'' { + \override TextSpanner #'bound-padding = #1.0 + \override TextSpanner #'dash-fraction = #'() + \override TextSpanner #'bound-details #'right #'arrow = ##t + \override TextSpanner #'bound-details #'left #'text = #"fof" + \override TextSpanner #'bound-details #'right #'text = #"gag" + \override TextSpanner #'bound-details #'right #'padding = #0.6 + + \override TextSpanner #'bound-details #'right #'stencil-align-dir-y = #CENTER + \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #CENTER + + \override Glissando #'bound-details #'right #'arrow = ##t + \override Glissando #'arrow-length = #0.5 + \override Glissando #'arrow-width = #0.25 + + a8\startTextSpan gis8 a4 b4\glissando + b,4 | g' c\stopTextSpan c +} diff --git a/input/tolsr/preparing/quote-transposition.ly b/input/tolsr/preparing/quote-transposition.ly new file mode 100644 index 0000000000..ceecc579d4 --- /dev/null +++ b/input/tolsr/preparing/quote-transposition.ly @@ -0,0 +1,45 @@ + +\header +{ + + texidoc = "Quotations take into account the transposition of both +source and target. In this example, all instruments play sounding +central C, the target is a instrument in F. The target part may be +@code{\\transpose}d. In this case, all the pitches (including the +quoted ones) will transposed as well. " + +} + +\version "2.11.10" + +\layout { ragged-right = ##t } + + +\addQuote clarinet { + \transposition bes + d'16 d'16 d'8 + d'16 d'16 d'8 + d'16 d'16 d'8 + d'16 d'16 d'8 +} + +\addQuote sax { + \transposition es' + a8 a a a a a a a +} + +quoteTest = { + \transposition f % french horn + + g'4 + << \quoteDuring #"clarinet" { \skip 4 } s4^"clar" >> + << \quoteDuring #"sax" { \skip 4 } s4^"sax" >> +} + + +<< \quoteTest + \new Staff + << \transpose c' d' \quoteTest + s4_"up 1 tone" + >> +>> diff --git a/input/tolsr/preparing/quote.ly b/input/tolsr/preparing/quote.ly new file mode 100644 index 0000000000..1f29585f3c --- /dev/null +++ b/input/tolsr/preparing/quote.ly @@ -0,0 +1,41 @@ +\header +{ + + texidoc = "With @code{\\quote}, fragments of previously entered +music may be quoted. @code{quotedEventTypes} will determines what +things are quoted. In this example, a 16th rests is not quoted, since +@code{rest-event} is not in @code{quotedEventTypes}." + +} +\version "2.11.10" +\layout { + ragged-right = ##t +} + + +quoteMe = \relative c' { fis4 r16 a8.-> b4-\ff c } + +\addQuote quoteMe \quoteMe +original = \relative c'' { c8 d s2 es8 gis8 } + +<< + \new Staff { + \set Staff.instrumentName = "quoteMe" + \quoteMe + } + \new Staff { + \set Staff.instrumentName = "orig" + \original + } + \new Staff \relative c'' << + \set Staff.instrumentName = "orig+quote" + \set Staff.quotedEventTypes = #'(note-event articulation-event) + \original + \new Voice { + s4 + \set fontSize = #-4 + \override Stem #'length-fraction = #(magstep -4) + \quoteDuring #"quoteMe" { \skip 2. } + } + >> +>> diff --git a/input/tolsr/text/utf-8.ly b/input/tolsr/text/utf-8.ly new file mode 100644 index 0000000000..abd4227671 --- /dev/null +++ b/input/tolsr/text/utf-8.ly @@ -0,0 +1,63 @@ +\version "2.10.0" + +%% Edit this file using a Unicode aware editor, such as GVIM, GEDIT, Emacs + +%{ + +You may have to install additional fonts. + +Red Hat Fedora + + taipeifonts fonts-xorg-truetype ttfonts-ja fonts-arabic \ + ttfonts-zh_CN fonts-ja fonts-hebrew + +Debian GNU/Linux + + apt-get install emacs-intl-fonts xfonts-intl-.* \ + ttf-kochi-gothic ttf-kochi-mincho \ + xfonts-bolkhov-75dpi xfonts-cronyx-100dpi xfonts-cronyx-75dpi +%} + +\header { + + texidoc = "Various scripts may be used for texts (like titles and +lyrics) introduced by entering them in UTF-8 encoding, and using a +Pango based backend. Depending on the fonts installed, this fragment +will render Bulgarian (Cyrillic), Hebrew, Japanese and Portuguese. + +" + +} + +% Cyrillic font +bulgarian = \lyricmode { + Жълтата дюля беше щастлива, че пухът, който цъфна, замръзна като гьон. +} + +hebrew = \lyricmode { + זה כיף סתם לשמוע איך תנצח קרפד עץ טוב בגן. +} + +japanese = \lyricmode { + いろはにほへど ちりぬるを + わがよたれぞ つねならむ + うゐのおくや まけふこえて + あさきゆめみじ ゑひもせず +} + +% "a legal song to you" +portuguese = \lyricmode { + à vo -- cê uma can -- ção legal +} + +\paper { + ragged-right = ##T +} + +\relative { + c2 d e f g f e +} +\addlyrics { \bulgarian } +\addlyrics { \hebrew } +\addlyrics { \japanese } +\addlyrics { \portuguese } -- 2.39.5