From b9d63193cfbdae47415114c0553951cb138c3bfb Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Tue, 19 Jun 2007 21:25:16 -0700 Subject: [PATCH] LSR: automatic update, and minor makelsr.py changes. --- buildscripts/makelsr.py | 4 - ...sing-the-chord-naming-function-for-jazz.ly | 155 ++++++++++++++++++ input/lsr/non-music/clip-systems.ly | 86 ++++++++++ 3 files changed, 241 insertions(+), 4 deletions(-) create mode 100644 input/lsr/chords/customising-the-chord-naming-function-for-jazz.ly create mode 100644 input/lsr/non-music/clip-systems.ly diff --git a/buildscripts/makelsr.py b/buildscripts/makelsr.py index 7a0ff092f0..65ac4ec5f2 100755 --- a/buildscripts/makelsr.py +++ b/buildscripts/makelsr.py @@ -6,7 +6,6 @@ import shutil dirs = ['ancient','chords','connecting','contemporary','expressive','education','guitar','parts','pitch','repeats','scheme','spacing','staff','text','vocal','other','non-music','engravers','instrument-specific'] notsafe=[] -notconvert=[] try: in_dir = sys.argv[1] @@ -71,9 +70,6 @@ file.close() print print -print "List of files that could not be automatically updated printed", -print "in not-converted.txt: CHECK MANUALLY!" -print print "Unsafe files printed in lsr-unsafe.txt: CHECK MANUALLY!" print " xargs git-diff < lsr-unsafe.txt" print diff --git a/input/lsr/chords/customising-the-chord-naming-function-for-jazz.ly b/input/lsr/chords/customising-the-chord-naming-function-for-jazz.ly new file mode 100644 index 0000000000..0f078997f0 --- /dev/null +++ b/input/lsr/chords/customising-the-chord-naming-function-for-jazz.ly @@ -0,0 +1,155 @@ +%% Do not edit this file; it is auto-generated from LSR! +\version "2.11.23" + +\header { texidoc = " +Chord names are generated from a list pitches. The functions which +construct these names can be customised. Here are shown Jazz chords, +following Ignatzek (pp. 17-18, 1995) and an alternative Jazz chord +notation. + + +Chords following Banter (1987) can also be printed from this snippet, +but are turned off for brevity. + + + +" } + +chs = \transpose c' c' +{ + 1 + % m = minor triad + + \break + + + % triangle = maj + + \break + + + + \break + % 6 = major triad with added sixth + % m6 = minor triad with added sixth + + \break + + + + \break + + + + \break + + + + \break + + + + \break + + + + \break + + + + \break + + % add9 + +} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% alternate Jazz notation + +efullmusicJazzAlt = +{ + 1-\markup { "+" } + -\markup { \normal-size-super + % \override #'(font-family . math) "N" } + \override #'(font-family . math) "M" } + %%c:3.5.7 = \markup { \override #'(font-family . math) "M" } + %%c:3.5.7 = \markup { \normal-size-super "maj7" } + + -\markup { \super "o" } % should be $\circ$ ? + -\markup { \super \combine "o" "/" } + -\markup { \super "o7" } +} + +efullJazzAlt = #(sequential-music-to-chord-exceptions efullmusicJazzAlt #f) + +epartialmusicJazzAlt = { + 1-\markup { \normal-size-super "2" } + -\markup { "m" } + -\markup { \normal-size-super "sus4" } + -\markup { \normal-size-super "5" } + + %% TODO, partial exceptions + -\markup { "m" }-\markup { \normal-size-super "sus4" } + -\markup { "m" }-\markup { \normal-size-super "sus2" } +} + +epartialJazzAlt = #(sequential-music-to-chord-exceptions epartialmusicJazzAlt #f) + +jazzAltProperties = \sequential { + \set majorSevenSymbol = #whiteTriangleMarkup + \set chordNameSeparator = #(make-simple-markup "/") + \set chordNameExceptionsFull = #efullJazzAlt + \set chordNameExceptionsPartial = #epartialJazzAlt + \set chordNameFunction = #jazz-chord-names +} + +banterProperties = \sequential { + \set chordNameFunction = #banter-chord-names +} + +\score{ + << + \new ChordNames { + \set ChordNames.instrumentName = #"Ignatzek (default)" + \set ChordNames.shortInstrumentName = #"Def" + \chs + } + + \new ChordNames { + \jazzAltProperties + \set ChordNames.instrumentName = #"Alternative" + \set ChordNames.shortInstrumentName = #"Alt" + \chs + } + +%{ + + %% This is the Banter (1987) style. It gives exceedingly + %% verbose (wide) names, making the output file take up to 4 pages. + %% (FIXME: how big is is now?) + %% Turned off by default. + + %% FIXME: use smaller font for Banter (or remove some esoteric + %% chords). + + \new ChordNames { + \banterProperties + \set ChordNames.instrumentName = #"Banter" + \set ChordNames.shortInstrumentName = #"Ban" + \chs + } +%} + + \new Staff \transpose c c' { \chs } + >> + \layout { + indent = 3.\cm + \context { + \ChordNames + \consists Instrument_name_engraver + } + } +} + + diff --git a/input/lsr/non-music/clip-systems.ly b/input/lsr/non-music/clip-systems.ly new file mode 100644 index 0000000000..66e8e79428 --- /dev/null +++ b/input/lsr/non-music/clip-systems.ly @@ -0,0 +1,86 @@ +%% Do not edit this file; it is auto-generated from LSR! +\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.11.23" + +#(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)) } + } + } +} -- 2.39.5