From 7fd69e7e315d5b688f455f710de9a045bb9e60fc Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 00:59:23 +0000 Subject: [PATCH] lilypond-1.3.144 --- Documentation/user/tutorial.itely | 50 ++++++ input/bugs/ac-clash.ly | 7 + lily/piano-pedal-engraver.cc | 6 +- ly/spanners.ly | 24 ++- mutopia/F.Schubert/GNUmakefile | 1 + scm/chord-name.scm | 30 ++-- scm/midi.scm | 217 ++++++++++++++++++++++++ scm/translator-description.scm | 4 +- scm/translator-property-description.scm | 2 +- tex/titledefs.tex | 4 + 10 files changed, 321 insertions(+), 24 deletions(-) create mode 100644 input/bugs/ac-clash.ly diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 0a23734104..b0dd10d42d 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -1823,6 +1823,12 @@ bars. @node Latex and texinfo integration @section Latex and texinfo integration + +@menu +* Songs with additional verses:: +@end menu + + So what does this look like? Well, here is an example: @lilypond[veryverbatim, intertext="produces this music:"] \score{ @@ -2051,6 +2057,50 @@ Verbatim environments will also ignore the page margins. That is a feature of La@TeX{}. (But you usually put things inside a verbatim environment when you don't want La@TeX{} to do any linebreaking) +@node Songs with additional verses +@subsection Songs with additional verses + +With lilypond-book, you can typeset songs with additional verses. To +make lilypond-book print titles like ly2dvi, add + +@example +\input titledefs.tex +\def\preLilypondExample@{\def\mustmakelilypondtitle@{@}@} +@end example + +just before the music fragment. + +@c urg: can't show, won't work for .texi docs + +@example +% generate standard lilypond titles +\input titledefs.tex +\def\preLilypondExample@{\def\mustmakelilypondtitle@{@}@} + +\begin@{lilypond@} +\header @{ + title = "Title"; + subtitle = "Subtitle"; + subsubtitle = "Subsubtitle"; + opus = "Opus 1"; + piece = "Piece"; + composer = "Composer"; + enteredby = "JCN"; + instrument = "instrument"; +@} +\paper @{ linewidth = -1.; @} +\score @{ + \notes \relative c'' @{ a b c d @} +@} +\end@{lilypond@} + +\begin@{enumerate@} +\item Verse one. aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa +\item Verse two. bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb +\end@{enumerate@} +@end example + + @node end of tutorial @section The end diff --git a/input/bugs/ac-clash.ly b/input/bugs/ac-clash.ly new file mode 100644 index 0000000000..0f0d4f482f --- /dev/null +++ b/input/bugs/ac-clash.ly @@ -0,0 +1,7 @@ +% accidentals clash +\score { + \context Staff \notes\relative c' < + % koord: c1 e g bes dis + bes'1 dis + > +} \ No newline at end of file diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 09f5d1e093..7f25a21dd3 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -57,7 +57,7 @@ Piano_pedal_engraver::initialize () Pedal_info *p = info_list_; - char * names [] = { "Sostenuto", "Sustain", "UnaChorda", 0 }; + char * names [] = { "Sostenuto", "Sustain", "UnaCorda", 0 }; char **np = names ; do { @@ -155,14 +155,14 @@ Piano_pedal_engraver::create_grobs () } else { - s = gh_car (strings); + s = gh_caddr (strings); } p->start_req_l_ = 0; } else if (p->req_l_drul_[START]) { p->start_req_l_ = p->req_l_drul_[START]; - s = gh_caddr (strings); + s = gh_car (strings); } if (gh_string_p (s)) diff --git a/ly/spanners.ly b/ly/spanners.ly index a0e837b8ef..ae445148c4 100644 --- a/ly/spanners.ly +++ b/ly/spanners.ly @@ -10,10 +10,24 @@ cresc = \notes { \property Voice.crescendoSpanner = "dashed-line" } +% ah, this is handy: maybe drop resetting of properties in +% dynamic-engraver ? endcresc = \notes { -\commandspanrequest \stop "crescendo"; -\property Voice.crescendoText = ##f -\property Voice.crescendoSpanner = ##f + \commandspanrequest \stop "crescendo"; + \property Voice.crescendoText = ##f + \property Voice.crescendoSpanner = ##f +} + +dim = \notes { + \commandspanrequest \start "decrescendo" ; + \property Voice.decrescendoText = "dim." + \property Voice.decrescendoSpanner = "dashed-line" +} + +enddim = \notes { + \commandspanrequest \stop "decrescendo"; + \property Voice.decrescendoText = ##f + \property Voice.decrescendoSpanner = ##f } %{ @@ -27,8 +41,8 @@ endcresc = \spanrequest \stop "crescendo" sustainDown = \spanrequest \start "Sustain" sustainUp = \spanrequest \stop "Sustain" -unaChorda = \spanrequest \start "UnaChorda" -treChorde = \spanrequest \stop "UnaChorda" +unaCorda = \spanrequest \start "UnaCorda" +treCorde = \spanrequest \stop "UnaCorda" sostenutoDown = \spanrequest \start "Sostenuto" sostenutoUp = \spanrequest \stop "Sostenuto" diff --git a/mutopia/F.Schubert/GNUmakefile b/mutopia/F.Schubert/GNUmakefile index d1038f0a04..93cc570801 100644 --- a/mutopia/F.Schubert/GNUmakefile +++ b/mutopia/F.Schubert/GNUmakefile @@ -3,6 +3,7 @@ depth = ../.. examples=standchen +mutopia-examples=standchen LOCALSTEPMAKE_TEMPLATES=mutopia include $(depth)/make/stepmake.make diff --git a/scm/chord-name.scm b/scm/chord-name.scm index 5bbb2017e4..8261fe0b3c 100644 --- a/scm/chord-name.scm +++ b/scm/chord-name.scm @@ -44,14 +44,13 @@ ; Cm iso Cm.no5 (((0 . 0) (2 . -1)) . ("m")) ; C2 iso C2.no3 - (((0 . 0) (1 . 0) (4 . 0)) . (super "2")) + (((0 . 0) (1 . 0) (4 . 0)) . ("" (super "2"))) ; C4 iso C4.no3 - (((0 . 0) (3 . 0) (4 . 0)) . (super "4")) - ; Cdim iso Cm5- + (((0 . 0) (3 . 0) (4 . 0)) . ("" (super "4"))) + ;; Cdim iso Cm5- (((0 . 0) (2 . -1) (4 . -1)) . ("dim")) ; Co iso Cm5-7- - ; urg - (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (super "o")) + (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ("" (super "o"))) ; Cdim9 (((0 . 0) (2 . -1) (4 . -1) (6 . -2) (1 . -1)) . ("dim" (super "9"))) (((0 . 0) (2 . -1) (4 . -1) (6 . -2) (1 . -1) (3 . -1)) . ("dim" (super "11"))) @@ -83,12 +82,12 @@ (((0 . 0) (2 . -1)) . ("m")) (((0 . 0) (3 . 0) (4 . 0)) . ("sus")) (((0 . 0) (2 . -1) (4 . -1)) . ("dim")) -;Alternate: (((0 . 0) (2 . -1) (4 . -1)) . ((super "o"))) +;Alternate: (((0 . 0) (2 . -1) (4 . -1)) . ("" (super "o"))) (((0 . 0) (2 . 0) (4 . 1)) . ("aug")) ;Alternate: (((0 . 0) (2 . 0) (4 . 1)) . ("+")) (((0 . 0) (1 . 0) (4 . 0)) . ("2")) ;; Common seventh chords - (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (rows (super "o") "7")) + (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ("" (super "o") "7")) (((0 . 0) (2 . 0) (4 . 0) (6 . 0)) . ("maj7")) (((0 . 0) (2 . -1) (4 . 0) (6 . -1)) . ("m7")) (((0 . 0) (2 . 0) (4 . 0) (6 . -1)) . ("7")) @@ -96,7 +95,9 @@ ;jazz: the delta, see jazz-chords.ly ;;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (super ((font-family . math) "N")) ;; ugh, kludge slashed o - (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") ((kern . -0.85) ((raise . 0.57) ((font-relative-size . -3) "/"))) "7")) ; slashed o + ;; (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") ((kern . -0.85) ((raise . 0.57) ((font-relative-size . -3) "/"))) "7")) ; slashed o + (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") (((kern . -0.85) (raise . 1.1) (font-relative-size . -2)) "/") "7")) ; slashed o + (((0 . 0) (2 . 0) (4 . 1) (6 . -1)) . ("aug7")) (((0 . 0) (2 . 0) (4 . -1) (6 . 0)) . (rows "maj7" ((font-relative-size . -2) ((raise . 0.2) (music (named "accidentals--1")))) "5")) (((0 . 0) (2 . 0) (4 . -1) (6 . -1)) . (rows "7" ((font-relative-size . -2) ((raise . 0.2) (music (named "accidentals--1")))) "5")) @@ -231,12 +232,14 @@ ;; DONT use non-ascii characters, even if ``it works'' in Windows - ;;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (((raise . 0.8)"o"))); works, but "o" is a little big - (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ((raise . 0.8) (size . -2) ("o"))) + ;;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ((raise . 0.8) (size . -2) ("o"))) + (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ("" (super "o"))) ;; half diminshed chords - ; half diminished seventh chord = slashed o - (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (((raise . 0.8)"/o"))) + ;; half diminished seventh chord = slashed o + ;; (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (((raise . 0.8) "/o"))) + (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") (((kern . -0.85) (raise . 1.1) (font-relative-size . -2)) "/") "7")) ; slashed o + ; half diminished seventh chord with major 9 = slashed o cancelation 9 (((0 . 0) (2 . -1) (4 . -1) (6 . -1) (1 . 0)) . ( ((raise . 0.8)"/o(") @@ -253,6 +256,7 @@ (define (pitch->note-name pitch) (cons (cadr pitch) (caddr pitch))) + (define (accidental->text acc) (if (= acc 0) @@ -266,7 +270,7 @@ (list (append '((raise . 0.6)) (list (string-append "accidentals-" - (number->string acc)))))))))))) + (number->string acc)))))))))))) ) (define (pitch->text pitch) diff --git a/scm/midi.scm b/scm/midi.scm index 0d8f588e56..d44492d961 100644 --- a/scm/midi.scm +++ b/scm/midi.scm @@ -11,6 +11,7 @@ (append '( ("sf" . 1.00) + ("fffff" . 0.95) ("ffff" . 0.91) ("fff" . 0.81) ("ff" . 0.71) @@ -20,6 +21,8 @@ ("p" . 0.30) ("pp" . 0.20) ("ppp" . 0.10) + ("pppp" . 0.08) + ("ppppp" . 0.05) ) absolute-volume-alist)) @@ -47,11 +50,225 @@ ) instrument-equaliser-alist)) +;; (name . program+32768*(channel10 ? 1 : 0) ) +(define instrument-names-alist '()) +(set! instrument-names-alist + (append + `( + ("acoustic grand" . ,(- 1 1)) + ("bright acoustic" . ,(- 2 1)) + ("electric grand" . ,(- 3 1)) + ("honky-tonk" . ,(- 4 1)) + ("electric piano 1" . ,(- 5 1)) + ("electric piano 2" . ,(- 6 1)) + ("harpsichord" . ,(- 7 1)) + ("clav" . ,(- 8 1)) + + ; (9-16 chrom percussion) + ("celesta" . ,(- 9 1)) + ("glockenspiel" . ,(- 10 1)) + ("music box" . ,(- 11 1)) + ("vibraphone" . ,(- 12 1)) + ("marimba" . ,(- 13 1)) + ("xylophone" . ,(- 14 1)) + ("tubular bells" . ,(- 15 1)) + ("dulcimer" . ,(- 16 1)) + + ; (17-24 organ) + ("drawbar organ" . ,(- 17 1)) + ("percussive organ" . ,(- 18 1)) + ("rock organ" . ,(- 19 1)) + ("church organ" . ,(- 20 1)) + ("reed organ" . ,(- 21 1)) + ("accordion" . ,(- 22 1)) + ("harmonica" . ,(- 23 1)) + ("concertina" . ,(- 24 1)) + + ; (25-32 guitar) + ("acoustic guitar (nylon)" . ,(- 25 1)) + ("acoustic guitar (steel)" . ,(- 26 1)) + ("electric guitar (jazz)" . ,(- 27 1)) + ("electric guitar (clean)" . ,(- 28 1)) + ("electric guitar (muted)" . ,(- 29 1)) + ("overdriven guitar" . ,(- 30 1)) + ("distorted guitar" . ,(- 31 1)) + ("guitar harmo(dinics" . ,(- 32 1)) + + ; (33-40 bass) + ("acoustic bass" . ,(- 33 1)) + ("electric bass (finger)" . ,(- 34 1)) + ("electric bass (pick)" . ,(- 35 1)) + ("fretless bass" . ,(- 36 1)) + ("slap bass 1" . ,(- 37 1)) + ("slap bass 2" . ,(- 38 1)) + ("synth bass 1" . ,(- 39 1)) + ("synth bass 2" . ,(- 40 1)) + + ; (41-48 strings) + ("violin" . ,(- 41 1)) + ("viola" . ,(- 42 1)) + ("cello" . ,(- 43 1)) + ("contrabass" . ,(- 44 1)) + ("tremolo strings" . ,(- 45 1)) + ("pizzicato strings" . ,(- 46 1)) + ("orchestral strings" . ,(- 47 1)) + ("timpani" . ,(- 48 1)) + + ; (49-56 ensemble) + ("string ensemble 1" . ,(- 49 1)) + ("string ensemble 2" . ,(- 50 1)) + ("synthstrings 1" . ,(- 51 1)) + ("synthstrings 2" . ,(- 52 1)) + ("choir aahs" . ,(- 53 1)) + ("voice oohs" . ,(- 54 1)) + ("synth voice" . ,(- 55 1)) + ("orchestra hit" . ,(- 56 1)) + + ; (57-64 brass) + ("trumpet" . ,(- 57 1)) + ("trombone" . ,(- 58 1)) + ("tuba" . ,(- 59 1)) + ("muted trumpet" . ,(- 60 1)) + ("french horn" . ,(- 61 1)) + ("brass section" . ,(- 62 1)) + ("synthbrass 1" . ,(- 63 1)) + ("synthbrass 2" . ,(- 64 1)) + + ; (65-72 reed) + ("soprano sax" . ,(- 65 1)) + ("alto sax" . ,(- 66 1)) + ("tenor sax" . ,(- 67 1)) + ("baritone sax" . ,(- 68 1)) + ("oboe" . ,(- 69 1)) + ("english horn" . ,(- 70 1)) + ("bassoon" . ,(- 71 1)) + ("clarinet" . ,(- 72 1)) + + ; (73-80 pipe) + ("piccolo" . ,(- 73 1)) + ("flute" . ,(- 74 1)) + ("recorder" . ,(- 75 1)) + ("pan flute" . ,(- 76 1)) + ("blown bottle" . ,(- 77 1)) + ("skakuhachi" . ,(- 78 1)) + ("whistle" . ,(- 79 1)) + ("ocarina" . ,(- 80 1)) + + ; (81-88 synth lead) + ("lead 1 (square)" . ,(- 81 1)) + ("lead 2 (sawtooth)" . ,(- 82 1)) + ("lead 3 (calliope)" . ,(- 83 1)) + ("lead 4 (chiff)" . ,(- 84 1)) + ("lead 5 (charang)" . ,(- 85 1)) + ("lead 6 (voice)" . ,(- 86 1)) + ("lead 7 (fifths)" . ,(- 87 1)) + ("lead 8 (bass+lead)" . ,(- 88 1)) + + ; (89-96 synth pad) + ("pad 1 (new age)" . ,(- 89 1)) + ("pad 2 (warm)" . ,(- 90 1)) + ("pad 3 (polysynth)" . ,(- 91 1)) + ("pad 4 (choir)" . ,(- 92 1)) + ("pad 5 (bowed)" . ,(- 93 1)) + ("pad 6 (metallic)" . ,(- 94 1)) + ("pad 7 (halo)" . ,(- 95 1)) + ("pad 8 (sweep)" . ,(- 96 1)) + + ; (97-104 synth effects) + ("fx 1 (rain)" . ,(- 97 1)) + ("fx 2 (soundtrack)" . ,(- 98 1)) + ("fx 3 (crystal)" . ,(- 99 1)) + ("fx 4 (atmosphere)" . ,(- 100 1)) + ("fx 5 (brightness)" . ,(- 101 1)) + ("fx 6 (goblins)" . ,(- 102 1)) + ("fx 7 (echoes)" . ,(- 103 1)) + ("fx 8 (sci-fi)" . ,(- 104 1)) + + ; (105-112 ethnic) + ("sitar" . ,(- 105 1)) + ("banjo" . ,(- 106 1)) + ("shamisen" . ,(- 107 1)) + ("koto" . ,(- 108 1)) + ("kalimba" . ,(- 109 1)) + ("bagpipe" . ,(- 110 1)) + ("fiddle" . ,(- 111 1)) + ("shanai" . ,(- 112 1)) + + ; (113-120 percussive) + ("tinkle bell" . ,(- 113 1)) + ("agogo" . ,(- 114 1)) + ("steel drums" . ,(- 115 1)) + ("woodblock" . ,(- 116 1)) + ("taiko drum" . ,(- 117 1)) + ("melodic tom" . ,(- 118 1)) + ("synth drum" . ,(- 119 1)) + ("reverse cymbal" . ,(- 120 1)) + + ; (121-128 sound effects) + ("guitar fret noise" . ,(- 121 1)) + ("breath noise" . ,(- 122 1)) + ("seashore" . ,(- 123 1)) + ("bird tweet" . ,(- 124 1)) + ("telephone ring" . ,(- 125 1)) + ("helicopter" . ,(- 126 1)) + ("applause" . ,(- 127 1)) + ("gunshot" . ,(- 128 1)) + + ; (channel 10 drum-kits - subtract 32768 to get program no.) + ("standard kit" . ,(+ 32768 0)) + ("standard drums" . ,(+ 32768 0)) + ("drums" . ,(+ 32768 0)) + ("room kit" . ,(+ 32768 8)) + ("room drums" . ,(+ 32768 8)) + ("power kit" . ,(+ 32768 16)) + ("power drums" . ,(+ 32768 16)) + ("rock drums" . ,(+ 32768 16)) + ("electronic kit" . ,(+ 32768 24)) + ("electronic drums" . ,(+ 32768 24)) + ("tr-808 kit" . ,(+ 32768 25)) + ("tr-808 drums" . ,(+ 32768 25)) + ("jazz kit" . ,(+ 32768 32)) + ("jazz drums" . ,(+ 32768 32)) + ("brush kit" . ,(+ 32768 40)) + ("brush drums" . ,(+ 32768 40)) + ("orchestra kit" . ,(+ 32768 48)) + ("orchestra drums" . ,(+ 32768 48)) + ("classical drums" . ,(+ 32768 48)) + ("sfx kit" . ,(+ 32768 56)) + ("sfx drums" . ,(+ 32768 56)) + ("mt-32 kit" . ,(+ 32768 127)) + ("mt-32 drums" . ,(+ 32768 127)) + ("cm-64 kit" . ,(+ 32768 127)) + ("cm-64 drums" . ,(+ 32768 127)) + ) + instrument-names-alist + ) +) + + (define (default-instrument-equaliser s) (let ((entry (assoc s instrument-equaliser-alist))) (if entry (cdr entry)))) +;; returns whether the instrument should use midi channel 9 +(define (percussion-p instrument) + (let* ((inst (symbol->string instrument)) + (entry (assoc inst instrument-names-alist)) + ) + (and entry (>= (cdr entry) 32768)) + ) +) + +;; returns the program of the instrument +(define (midi-program instrument) + (let* ((inst (symbol->string instrument)) + (entry (assoc inst instrument-names-alist)) + ) + (if entry (modulo (cdr entry) 32768) #f ) + ) +) + ;; 90 == 90/127 == 0.71 is supposed to be the default value ;; urg: we should set this at start of track (define dynamic-default-volume 0.71) diff --git a/scm/translator-description.scm b/scm/translator-description.scm index bf10ef40e9..ac11ab645f 100644 --- a/scm/translator-description.scm +++ b/scm/translator-description.scm @@ -463,8 +463,8 @@ to any Graphic objects that satisfies the predicate." (engraver-description "Piano_pedal_engraver" "Engrave piano pedal symbols." - '(SostenutoPedal SustainPedal UnaChordaPedal) - '(pedalSostenutoStrings pedalSustainStrings pedalUnaChordaStrings + '(SostenutoPedal SustainPedal UnaCordaPedal) + '(pedalSostenutoStrings pedalSustainStrings pedalUnaCordaStrings ))) (cons diff --git a/scm/translator-property-description.scm b/scm/translator-property-description.scm index cf2bd96fa5..4751d5ef7b 100644 --- a/scm/translator-property-description.scm +++ b/scm/translator-property-description.scm @@ -228,7 +228,7 @@ measures later. (translator-property-description 'pedalSustainStrings list? "List of string to print for sustain-pedal. Format is (UP UPDOWN DOWN), where each of the three is the string to print when this is done with the pedal.") -(translator-property-description 'pedalUnaChordaStrings string? "see pedalSustainStrings.") +(translator-property-description 'pedalUnaCordaStrings string? "see pedalSustainStrings.") (translator-property-description 'pedalSostenutoStrings string? "see pedalSustainStrings.") (translator-property-description 'phrasingPunctuation string? "") diff --git a/tex/titledefs.tex b/tex/titledefs.tex index fa8f5966e2..698d26b7e6 100644 --- a/tex/titledefs.tex +++ b/tex/titledefs.tex @@ -61,5 +61,9 @@ \ifx\lilypondfooter\undefined\else% \parbox{\textwidth}{\mbox{}\lilypondfooter}\fi } +\def\makelilypondtagline +{ + \ifx\lilypondtagline\undefined\else\lilypondtagline\fi +} \endinput -- 2.39.5