From aa39a980d890660d8f6a64d353a5df4c1548b7d1 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 22:14:43 +0000 Subject: [PATCH] lilypond-1.1.53 --- ANNOUNCE-1.2 | 6 +- Documentation/relative-octaves.yo | 28 +- Documentation/tex/feta.tex | 2 +- Documentation/tex/lilypond-regtest.doc | 12 +- Documentation/tex/refman.yo | 13 +- Documentation/topdocs/AUTHORS.yo | 2 + Documentation/topdocs/INSTALL.yo | 4 +- buildscripts/set-lily.sh | 1 + flower/include/array.hh | 17 + flower/include/array.icc | 4 +- flower/include/cons.hh | 22 ++ input/bugs/Overture.ly | 2 +- input/bugs/semirepeat.ly | 5 + input/bugs/spacing.ly | 4 +- input/bugs/sv.ly | 4 +- input/example-3.ly | 2 +- input/just-friends.ly | 2 +- input/keys.ly | 2 +- input/kortjakje.ly | 2 +- input/part.ly | 2 +- input/pedal.ly | 2 +- input/praeludium-fuga-E.ly | 2 +- input/rhythm.ly | 4 +- input/scales.ly | 2 +- input/scripts.ly | 2 +- input/star-spangled-banner.ly | 2 +- input/test/alphabet.ly | 2 +- input/test/ass-extra-voice.ly | 94 +++++ input/test/auto-staff-switch.ly | 2 +- input/test/bar-scripts.ly | 2 +- input/test/beam-chord.ly | 2 +- input/test/beam-interstaff.ly | 2 +- input/test/beam-isknee.ly | 2 +- input/test/beam-pos.ly | 2 +- input/test/beaming.ly | 20 ++ input/test/beams.ly | 2 +- input/test/breathing-sign.ly | 2 +- input/test/broken.ly | 2 +- input/test/chord-inversion.ly | 2 +- input/test/chord-table.ly | 2 +- input/test/chords.ly | 2 +- input/test/clefs.ly | 2 +- input/test/collisions.ly | 2 +- input/test/defaultbars.ly | 2 +- input/test/denneboom.ly | 2 +- input/test/dotted-slur.ly | 2 +- input/test/extender.ly | 2 +- input/test/extra-staff.ly | 2 +- input/test/find-fifths.ly | 10 + input/test/font-body.ly | 4 +- input/test/font.ly | 2 +- input/test/font16.ly | 2 +- input/test/font20.ly | 2 +- input/test/gourlay.ly | 2 +- input/test/hara-kiri.ly | 2 +- input/test/incipit.ly | 2 +- input/test/keys.ly | 2 +- input/test/knee.ly | 2 +- input/test/mark.ly | 2 +- input/test/memory.ly | 2 +- input/test/multi-rest.ly | 2 +- input/test/noteheadstyle.ly | 2 +- input/test/notemode-chords.ly | 2 +- input/test/number-staff-lines.fly | 2 +- input/test/orchestscore.ly | 2 +- input/test/ossia.ly | 2 +- input/test/perform-tie.fly | 2 + input/test/repeatbar.fly | 3 + input/test/rest-collision.ly | 2 +- input/test/rhythmic.ly | 8 + input/test/scales.fly | 102 ++++++ input/test/score-bar-scripts.ly | 2 +- input/test/sleur.ly | 2 +- input/test/slur-bug.ly | 2 +- input/test/slur-damping.ly | 2 +- input/test/slur-interstaff.ly | 2 +- input/test/slur-swap.ly | 2 +- input/test/slurs.ly | 2 +- input/test/spacing-2.ly | 2 +- input/test/spacing.ly | 2 +- input/test/span-bars.ly | 2 +- input/test/staff-margin.ly | 2 +- input/test/staff-side-slur.ly | 2 +- input/test/staff-size.ly | 2 +- input/test/stem-tremolo.ly | 2 +- input/test/stem.ly | 2 +- input/test/tchaikovsky.ly | 2 +- input/test/test-lyrics.ly | 2 +- input/test/thumb.ly | 2 +- input/test/tie-bug.ly | 2 +- input/test/tie.ly | 2 +- input/test/title.ly | 2 +- input/test/transposition.ly | 2 +- input/test/tup.ly | 2 +- input/test/vertical-align.ly | 2 +- input/test/vertical-text.ly | 2 +- input/test/wtk-huh.ly | 2 +- input/tril.ly | 2 +- input/twinkle-pop.ly | 8 +- input/twinkle.ly | 14 +- lily/audio-element.cc | 4 +- lily/audio-item.cc | 78 ++-- lily/auto-beam-engraver.cc | 133 ++++--- lily/bar-engraver.cc | 32 +- lily/bar.cc | 3 +- lily/beam-engraver.cc | 77 ++-- lily/beam.cc | 68 ++-- lily/command-request.cc | 179 +--------- lily/grace-performer-group.cc | 110 ++++++ lily/graphical-axis-group.cc | 4 +- lily/include/audio-element.hh | 12 +- lily/include/audio-item.hh | 79 ++-- lily/include/auto-beam-engraver.hh | 12 +- lily/include/beam-engraver.hh | 11 +- lily/include/beam.hh | 19 +- lily/include/command-request.hh | 31 +- lily/include/grace-performer-group.hh | 37 ++ lily/include/key-def.hh | 46 +++ lily/include/key-performer.hh | 7 +- lily/include/lily-proto.hh | 9 +- lily/include/ly-symbols.hh | 2 + lily/include/lyric-performer.hh | 4 +- lily/include/midi-item.hh | 111 +++--- lily/include/midi-stream.hh | 2 +- lily/include/multi-measure-rest-engraver.hh | 2 +- lily/include/musical-request.hh | 10 +- lily/include/new-beaming.hh | 39 ++ lily/include/new-repeated-music.hh | 16 +- lily/include/note-performer.hh | 8 +- lily/include/paper-outputter.hh | 3 - lily/include/performer.hh | 6 +- lily/include/repeat-engraver.hh | 41 ++- lily/include/score-engraver.hh | 2 +- lily/include/score-performer.hh | 4 +- lily/include/staff-info.hh | 1 - lily/include/staff-performer.hh | 9 +- lily/include/swallow-perf.hh | 3 +- lily/include/tie-performer.hh | 64 ++++ lily/include/time-description.hh | 6 +- lily/include/time-signature-engraver.hh | 1 - lily/include/time-signature-performer.hh | 11 +- lily/include/timing-engraver.hh | 1 + lily/include/timing-translator.hh | 4 +- lily/include/volta-spanner.hh | 4 +- lily/item.cc | 9 +- lily/key-def.cc | 184 ++++++++++ lily/key-engraver.cc | 26 +- lily/key-performer.cc | 31 +- lily/lyric-performer.cc | 35 +- lily/midi-item.cc | 158 ++++---- lily/midi-stream.cc | 6 +- lily/midi-walker.cc | 27 +- lily/multi-measure-rest-engraver.cc | 39 +- lily/multi-measure-rest.cc | 12 +- lily/music-iterator.cc | 2 +- lily/music-list.cc | 1 - lily/my-lily-lexer.cc | 2 +- lily/new-beaming.cc | 97 +++++ lily/note-column.cc | 2 +- lily/note-performer.cc | 34 +- lily/p-score.cc | 7 +- lily/paper-outputter.cc | 37 -- lily/parser.yy | 56 ++- lily/performance.cc | 29 +- lily/performer-group-performer.cc | 5 +- lily/performer.cc | 4 +- lily/repeat-engraver.cc | 336 +++++++++++------- lily/repeated-music-iterator.cc | 8 +- lily/repeated-music.cc | 22 +- lily/score-engraver.cc | 9 +- lily/score-performer.cc | 27 +- lily/specialty-engraver.cc | 5 +- lily/staff-bar.cc | 6 +- lily/staff-info.cc | 1 - lily/staff-performer.cc | 63 ++-- lily/staff-switching-translator.cc | 18 +- lily/tie-performer.cc | 171 +++++++++ lily/time-description.cc | 1 - lily/time-signature-performer.cc | 32 +- lily/timing-engraver.cc | 3 +- lily/timing-translator.cc | 18 - lily/unfolded-repeat-iterator.cc | 4 +- lily/volta-spanner.cc | 22 +- ly/book-fragment.ly | 2 +- ly/book-init.ly | 2 +- ly/center-fragment.ly | 2 +- ly/center.ly | 2 +- ly/engraver.ly | 1 + ly/fragment.ly | 2 +- ly/paper16.ly | 2 +- ly/paper20.ly | 2 +- ly/params.ly | 1 - ly/performer.ly | 24 +- ly/property.ly | 2 +- ly/script.ly | 2 + mf/feta-banier.mf | 4 +- mi2mu/main.cc | 7 +- mi2mu/midi-track-parser.cc | 6 +- mi2mu/mudela-item.cc | 87 +++-- mi2mu/mudela-voice.cc | 5 + mutopia/Coriolan/bassi-part.ly | 2 +- mutopia/Coriolan/clarinetti-part.ly | 2 +- mutopia/Coriolan/clarinetti.ly | 2 +- mutopia/Coriolan/clarinetto-1.ly | 2 +- mutopia/Coriolan/clarinetto-2.ly | 2 +- mutopia/Coriolan/contrabasso-part.ly | 2 +- mutopia/Coriolan/contrabasso.ly | 2 +- mutopia/Coriolan/coriolan.ly | 2 +- mutopia/Coriolan/corni-part.ly | 2 +- mutopia/Coriolan/corni.ly | 2 +- mutopia/Coriolan/corno-1.ly | 2 +- mutopia/Coriolan/corno-2.ly | 2 +- mutopia/Coriolan/fagotti-part.ly | 2 +- mutopia/Coriolan/fagotti.ly | 2 +- mutopia/Coriolan/fagotto-1.ly | 2 +- mutopia/Coriolan/fagotto-2.ly | 2 +- mutopia/Coriolan/flauti-part.ly | 2 +- mutopia/Coriolan/flauti.ly | 2 +- mutopia/Coriolan/flauto-1.ly | 2 +- mutopia/Coriolan/flauto-2.ly | 2 +- mutopia/Coriolan/global.ly | 2 +- mutopia/Coriolan/oboe-1.ly | 2 +- mutopia/Coriolan/oboe-2.ly | 2 +- mutopia/Coriolan/oboi-part.ly | 2 +- mutopia/Coriolan/oboi.ly | 2 +- mutopia/Coriolan/timpani.ly | 2 +- mutopia/Coriolan/trombe-part.ly | 2 +- mutopia/Coriolan/trombe.ly | 2 +- mutopia/Coriolan/trombo-1.ly | 2 +- mutopia/Coriolan/trombo-2.ly | 2 +- mutopia/Coriolan/viola-1.ly | 2 +- mutopia/Coriolan/viola-2.ly | 2 +- mutopia/Coriolan/viola-part.ly | 2 +- mutopia/Coriolan/violino-1-part.ly | 2 +- mutopia/Coriolan/violino-1.ly | 2 +- mutopia/Coriolan/violino-2-part.ly | 2 +- mutopia/Coriolan/violino-2.ly | 2 +- mutopia/Coriolan/violoncello-part.ly | 2 +- mutopia/Coriolan/violoncello.ly | 2 +- mutopia/D.Scarlatti/progress.ly | 2 +- mutopia/D.Scarlatti/sonata-k1-l366.ly | 2 +- mutopia/D.Scarlatti/sonata-k2-l388.ly | 2 +- mutopia/D.Scarlatti/sonata-k3-l378.ly | 2 +- mutopia/D.Scarlatti/sonata-k4-l390.ly | 2 +- mutopia/D.Zipoli/verso_2.ly | 2 +- mutopia/E.Satie/gnossienne-4.ly | 87 +++-- mutopia/E.Satie/petite-ouverture-a-danser.ly | 2 +- mutopia/F.Schubert/AnSylvia.ly | 10 +- mutopia/F.Schubert/standchen-16.ly | 2 +- mutopia/F.Schubert/standchen-20.ly | 11 +- mutopia/F.Schubert/standchen.ly | 163 +++++---- mutopia/Hymns/diademata.ly | 2 +- mutopia/Hymns/laudatedom.ly | 2 +- mutopia/Hymns/maccabaeus.ly | 2 +- mutopia/Hymns/ode.ly | 2 +- mutopia/Hymns/stille.ly | 2 +- .../Cembalo-Partitas/Partita_II_Allemande.ly | 2 +- .../Cembalo-Partitas/Partita_II_Capriccio.ly | 2 +- .../Cembalo-Partitas/Partita_II_Sinfonia.ly | 2 +- .../J.S.Bach/Petites-Preludes/preludes-1.ly | 2 +- .../J.S.Bach/Petites-Preludes/preludes-2.ly | 2 +- .../J.S.Bach/Petites-Preludes/preludes-4.ly | 2 +- .../J.S.Bach/Petites-Preludes/preludes-5.ly | 2 +- .../J.S.Bach/Petites-Preludes/preludes-6.ly | 2 +- .../Solo-Cello-Suites/allemande-cello.ly | 2 +- .../Solo-Cello-Suites/allemande-urtext.ly | 2 +- .../Solo-Cello-Suites/courante-urtext.ly | 2 +- .../Solo-Cello-Suites/gigue-urtext.ly | 2 +- .../Solo-Cello-Suites/menuetto-cello.ly | 2 +- .../Solo-Cello-Suites/menuetto-urtext.ly | 2 +- .../Solo-Cello-Suites/prelude-cello.ly | 2 +- .../Solo-Cello-Suites/prelude-urtext.ly | 2 +- .../Solo-Cello-Suites/prelude-viola.ly | 2 +- .../Solo-Cello-Suites/sarabande-urtext.ly | 2 +- mutopia/J.S.Bach/viola-i.ly | 2 +- mutopia/J.S.Bach/violino-i.ly | 2 +- mutopia/J.S.Bach/violino-viola.ly | 2 +- mutopia/J.S.Bach/violino-violoncello.ly | 2 +- mutopia/J.S.Bach/violoncello-i.ly | 2 +- mutopia/J.S.Bach/wtk1-fugue1.ly | 49 ++- mutopia/J.S.Bach/wtk1-fugue2.ly | 2 +- mutopia/J.S.Bach/wtk1-prelude1.ly | 2 +- mutopia/L.Mozart/sinfonia.ly | 2 +- mutopia/N.W.Gade/brass.ly | 2 +- mutopia/N.W.Gade/parts.ly | 2 +- mutopia/N.W.Gade/score.ly | 2 +- mutopia/N.W.Gade/strings.ly | 2 +- mutopia/N.W.Gade/wood.ly | 2 +- mutopia/W.A.Mozart/cadenza.ly | 4 +- mutopia/W.A.Mozart/horn-concerto-3.ly | 4 +- mutopia/gallina.ly | 2 +- mutopia/los-toros-oboe.ly | 2 +- scm/script.scm | 4 +- scripts/convert-mudela.py | 12 + stepmake/bin/tar-docxx.sh | 2 +- stepmake/stepmake/yodl-rules.make | 6 +- 296 files changed, 2651 insertions(+), 1421 deletions(-) create mode 100644 input/bugs/semirepeat.ly create mode 100644 input/test/ass-extra-voice.ly create mode 100644 input/test/beaming.ly create mode 100644 input/test/find-fifths.ly create mode 100644 input/test/perform-tie.fly create mode 100644 input/test/repeatbar.fly create mode 100644 input/test/rhythmic.ly create mode 100644 input/test/scales.fly create mode 100644 lily/grace-performer-group.cc create mode 100644 lily/include/grace-performer-group.hh create mode 100644 lily/include/key-def.hh create mode 100644 lily/include/new-beaming.hh create mode 100644 lily/include/tie-performer.hh create mode 100644 lily/key-def.cc create mode 100644 lily/new-beaming.cc create mode 100644 lily/tie-performer.cc diff --git a/ANNOUNCE-1.2 b/ANNOUNCE-1.2 index 2dc95271e8..2ff73be073 100644 --- a/ANNOUNCE-1.2 +++ b/ANNOUNCE-1.2 @@ -1,3 +1,5 @@ +-*- text -*- + [DRAFT] Keywords: midi notation music typesetting gnu font engraving @@ -50,9 +52,9 @@ WHAT'S NEW? * --safe option for the paranoid -* Exact spacing for text (eg. Lyrics) +* More elegant spacing. Text is spaced exactly. -* mutopia archive is now a separate effort +* The Mutopia archive is now a separate effort * lots of bugfixes diff --git a/Documentation/relative-octaves.yo b/Documentation/relative-octaves.yo index a1c21cfadb..41a97dd997 100644 --- a/Documentation/relative-octaves.yo +++ b/Documentation/relative-octaves.yo @@ -37,27 +37,33 @@ verb( ) the last c being an octave higher than the first. If you have to -enter an interval that is greater than a fourth, you must specify +enter an interval that is greater than a fifth, you must specify whether the pitch goes up, using post-quotes: verb( c c' % octave up - c g' % fourth up + c g' % fifth up ) or down, using pre-quotes: verb( c c, % octave down - c f, % fourth down + c f, % fifth down ) nsect(CONVERTING) +COMMENT(Old? don't understand -- jcn To convert a piece of music from the old absolute-octave notation to -relative octaves, lilypond provides the bf(-Q, --find-fourths) feature -to locate all big intervals in your music (sorry, fully automated convert -is too complex). +) +To convert a piece of music from absolute-octave notation to +relative octaves, lilypond provides the bf(-Q, --find-old-relative) +COMMENT( +urg, name was changed to 'old-relative'? It simply helps convert +from absolute to relative, ie handy for mi2mu output? +) +feature to locate all big intervals in your music. First, edit the .ly file, add "\relative c" to all melodic chunks: @@ -66,18 +72,18 @@ verb( ) and remove all "\octave " commands. See the example file -file(input/test/find-fourths.ly). +file(input/test/find-fifths.ly). -Use lily to find the fourths +Use lily to find the fifths: verb( - lilypond -Q find-fourths.ly 2>&1 | tee fourths + lilypond -Q find-fifths.ly 2>&1 | tee fifths ... - find-fourths.ly:3:18: warning: Interval greater than fourth, relative: g': + find-fifths.ly:3:18: warning: Interval greater than fourth, relative: g': c d c f c g c b, c g, c f, c c'' c - find-fourths.ly:3:20: warning: Interval greater than fourth, relative: c,: + find-fifths.ly:3:20: warning: Interval greater than fourth, relative: c,: c d c f c g c b, c g, c f, c c'' c ) diff --git a/Documentation/tex/feta.tex b/Documentation/tex/feta.tex index c713e128af..296fddc143 100644 --- a/Documentation/tex/feta.tex +++ b/Documentation/tex/feta.tex @@ -42,7 +42,7 @@ \vskip5mm -\listfont{\fetatwenty}{0}{123} +\listfont{\fetatwenty}{0}{102} % urg \vskip-\charheight \listfont{\fetanumber}{48}{58} diff --git a/Documentation/tex/lilypond-regtest.doc b/Documentation/tex/lilypond-regtest.doc index 5ff667defe..4ba4489be8 100644 --- a/Documentation/tex/lilypond-regtest.doc +++ b/Documentation/tex/lilypond-regtest.doc @@ -49,11 +49,19 @@ have beams, notes, chords, stems etc. within a \verb|\grace| section. Slurs that start within a grace section, but aren't ended are attached to the next normal note. Grace notes have zero duration + + \mudelafile{grace.ly} \section{Beams, slurs and other spanners} +Beaming is generated automatically. Beams may cross bar lines. In that +case, line breaks are forbidden. Yet clef and key signatures are +hidden just as with breakable bar lines. + +\mudelafile{beaming.ly} + %Beams should not interfere with various items on the staff (amongst %others repeat signs) % @@ -61,7 +69,7 @@ attached to the next normal note. Grace notes have zero duration Beams can be typeset over fixed distance aligned staffs, beam beautification doesn't really work, but knees do. Beams should be -behave well, whereever the switching point is. +behave well, wherever the switching point is. \mudelafile{beam-interstaff.ly} @@ -92,7 +100,7 @@ Unfolded behavior: \mudelafile{repeat-unfold.ly} -Semi (un)folded behavior: +Semi (un)folded behavior. Voltas can start on non-barline moments. \mudelafile{repeat-semifold.ly} diff --git a/Documentation/tex/refman.yo b/Documentation/tex/refman.yo index 8b1259b003..8f0285e287 100644 --- a/Documentation/tex/refman.yo +++ b/Documentation/tex/refman.yo @@ -575,12 +575,13 @@ mudela()( c''-\open c''-\flageolet c''-\reverseturn c''-\trill c''-\prall c''-\mordent c''-\prallprall c''-\prallmordent - c''-\upprall c''-\downprall c''-\thumb } + c''-\upprall c''-\downprall c''-\thumb c''-\segno c''-\wheel} \context Lyrics \lyrics{ accent__ marcato__ staccatissimo__ fermata stopped__ staccato__ tenuto__ upbow downbow__ lheel__ rheel__ ltoe rtoe__ turn__ open__ flageolet reverseturn__ trill__ prall__ - mordent prallprall__ prallmordent__ uprall__ downprall thumb } + mordent prallprall__ prallmordent__ uprall__ downprall thumb + segno wheel} > \paper{ linewidth = 5.875\in; indent = 0.0; } @@ -1590,6 +1591,9 @@ above or below the clef instead of on the bar line. dit(code(barNumberScriptPadding)) Sets extra space between the bar number and the bar it labels. +dit(code(barSize)) Specify the height of the bar lines if it should be +different than the staff height. + dit(code(markHangOnClef)) Set to 1 to cause marks to appear by clefs instead of by bar lines. @@ -1608,6 +1612,9 @@ overridden, possibly many measures later. dit(code(staffLineLeading)) Specifies the distance (in points) between lines of the staff. +dit(code(numberOfStaffLines)) Specifies the number of staff lines. The +default is 5. + dit(code(postBreakPadding)) Extra space in points to be added after the clef, time signature and key signature on the staff. @@ -1936,8 +1943,6 @@ arithmetic_basicspace. The smallest space is the one following the shortest note in the measure. Typically arithmetic_basicspace is set to the width of a quarter note head. -dit(code(barsize)) Specify height of bars. This value may need to be -adjusted if you change the number of lines in the staff. dit(code(beam_dir_algorithm)) Specify algorithm for determining whether beams go up or down. It is real valued. If set to 2.0 then majority selection is used. If set to 3.0, then mean selection is diff --git a/Documentation/topdocs/AUTHORS.yo b/Documentation/topdocs/AUTHORS.yo index f5499af35b..5a1bb4b6cd 100644 --- a/Documentation/topdocs/AUTHORS.yo +++ b/Documentation/topdocs/AUTHORS.yo @@ -40,6 +40,8 @@ it()nemail(Alexandre Oliva)(oliva@dcc.unicamp.br), testing it()nemail(Franc,ois Pinard)(pinard@iro.umontreal.ca), parts of Documentation/Vocab*, started internationalization stuff +it()nemail(Glen Prideaux)(glenprideaux@iname.com), + minor bug fix to script used to generate doc++ documentation it()nemail(Jeffrey B. Reed)(daboys@austin.rr.com), Windows-NT support. it()Shay Rojanski diff --git a/Documentation/topdocs/INSTALL.yo b/Documentation/topdocs/INSTALL.yo index 5dd12b7ffc..0c9e54d424 100644 --- a/Documentation/topdocs/INSTALL.yo +++ b/Documentation/topdocs/INSTALL.yo @@ -243,7 +243,9 @@ nsect(CAVEATS) itemize( it()The -O2 option triggers bugs on various platforms (PowerPC, Alpha). - If you experience problems, you should first try turning off this. + If you experience problems, you should first try turning off + this. +it() On PPC you need at least EGCS-1.1.2f. ) nsect(EXAMPLE) diff --git a/buildscripts/set-lily.sh b/buildscripts/set-lily.sh index 8d79a65668..7371d675a6 100644 --- a/buildscripts/set-lily.sh +++ b/buildscripts/set-lily.sh @@ -53,6 +53,7 @@ showln -sf $LILYPOND_SOURCEDIR/lily/out/lilypond $prefix/bin/lilypond showln -sf $LILYPOND_SOURCEDIR/mi2mu/out/mi2mu $prefix/bin/mi2mu showln -sf $LILYPOND_SOURCEDIR/scripts/out/ly2dvi $prefix/bin/ly2dvi showln -sf $LILYPOND_SOURCEDIR/scripts/out/mudela-book $prefix/bin/mudela-book +showln -sf $LILYPOND_SOURCEDIR/buildscripts/out/genheader $prefix/bin/genheader chmod 755 $LILYPOND_SOURCEDIR/buildscripts/ps-to-gifs.sh showln -sf $LILYPOND_SOURCEDIR/buildscripts/ps-to-gifs.sh $prefix/bin/ps-to-gifs diff --git a/flower/include/array.hh b/flower/include/array.hh index 10f38ec0bf..d6349588aa 100644 --- a/flower/include/array.hh +++ b/flower/include/array.hh @@ -185,6 +185,23 @@ public: } + + T& boundary (int dir, int idx) + { + assert (dir); + if (dir == 1) + return top (idx); + else + return elem_ref (idx); + } + T boundary (int dir, int idx) const + { + assert (dir); + if (dir == 1) + return top (idx); + else + return elem (idx); + } void swap (int i,int j) { T t ((*this)[i]); diff --git a/flower/include/array.icc b/flower/include/array.icc index be8e95d680..8b876ce85d 100644 --- a/flower/include/array.icc +++ b/flower/include/array.icc @@ -25,8 +25,10 @@ arrcpy (T*dest, T*src, int count) #ifdef __powerpc__ { /* - urg: wierd egcs-1.1.2 bug on ppc + urg: wierd egcs-1.1.2-12c (stock LinuxPPC R5) bug on ppc bug report filed + fixed in egcs-1.1.2-12f + ftp://dev.linuxppc.org/users/fsirl/R5/RPMS/ppc/ */ *dest = *src; dest++, src++; diff --git a/flower/include/cons.hh b/flower/include/cons.hh index 8fd58acb7f..266b9ce51c 100644 --- a/flower/include/cons.hh +++ b/flower/include/cons.hh @@ -106,6 +106,10 @@ public: head_ =0; nil_pointer_address_ = &head_; } + void append (T *c) + { + append (new Cons (c,0)); + } void append (Cons *c) { assert (!c->next_); @@ -124,6 +128,24 @@ public: return ::remove_cons (pp); } + + /// junk everything after the first I elements. + void truncate (int i) + { + Cons **p = &head_; + for (; *p && i; p = &((*p)->next_)) + { + i--; + } + + if (*p) + { + delete *p; + *p = 0; + } + nil_pointer_address_ = p; + } + void junk () { delete head_; diff --git a/input/bugs/Overture.ly b/input/bugs/Overture.ly index 99c37f13aa..93ba0bc43e 100644 --- a/input/bugs/Overture.ly +++ b/input/bugs/Overture.ly @@ -4,7 +4,7 @@ composer = "Johann Christoph Faber"; piece = "1. Overture"; } -\version "1.0.21"; +\version "1.1.52"; global=\notes{ \time 2/2; diff --git a/input/bugs/semirepeat.ly b/input/bugs/semirepeat.ly new file mode 100644 index 0000000000..70928d8a91 --- /dev/null +++ b/input/bugs/semirepeat.ly @@ -0,0 +1,5 @@ +\score { \notes\context Staff\relative c'' { + +% less alts than body +\repeat semi 4 { c^"4$\\times$ 2alt" d } \alternative { e f } \repeat "semi" 2 c4 +}} diff --git a/input/bugs/spacing.ly b/input/bugs/spacing.ly index 47fb626f7c..ddd2903abc 100644 --- a/input/bugs/spacing.ly +++ b/input/bugs/spacing.ly @@ -1,9 +1,9 @@ \score { - \notes \transpose c''{ c\longa*1/4 c\breve*1/2 c1 c2 c4 c8 c16 c32 c64 } + \notes \transpose c'' \context Staff { c\longa*1/4 c\breve*1/2 c1 c2 c4 c8 c16 c32 c64 } \paper { \translator { \StaffContext - \remove "Staff_symbol_engraver"; + % \remove "Staff_symbol_engraver"; \remove "Time_signature_engraver"; \remove "Bar_engraver"; \remove "Clef_engraver"; diff --git a/input/bugs/sv.ly b/input/bugs/sv.ly index a25db83a26..a3856eb934 100644 --- a/input/bugs/sv.ly +++ b/input/bugs/sv.ly @@ -1,5 +1,7 @@ - +% +% Jan -> dit is Auto_B_E bug, niet grouping bug. +% \score{ \notes{ \time 13/8; diff --git a/input/example-3.ly b/input/example-3.ly index 950f45ab57..753fd8faca 100644 --- a/input/example-3.ly +++ b/input/example-3.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; one = \notes\relative c{ c'' d e f diff --git a/input/just-friends.ly b/input/just-friends.ly index b08f6f3176..dfd40560bb 100644 --- a/input/just-friends.ly +++ b/input/just-friends.ly @@ -57,4 +57,4 @@ of a certain tune (Jazz, Real Book, for example), like } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/keys.ly b/input/keys.ly index 66e95fd41b..5a12cc0bb0 100644 --- a/input/keys.ly +++ b/input/keys.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; blah = \notes { diff --git a/input/kortjakje.ly b/input/kortjakje.ly index e88af13ef3..9e06348b70 100644 --- a/input/kortjakje.ly +++ b/input/kortjakje.ly @@ -10,7 +10,7 @@ copyright = "public domain"; Tested Features: example file with comments %} -\version "1.0.21"; +\version "1.1.52"; % the % is a comment. diff --git a/input/part.ly b/input/part.ly index a0f60f576b..b07f963591 100644 --- a/input/part.ly +++ b/input/part.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; part = \notes { c-1 c c c r1*3 diff --git a/input/pedal.ly b/input/pedal.ly index 514fee0325..905715b6c9 100644 --- a/input/pedal.ly +++ b/input/pedal.ly @@ -28,7 +28,7 @@ % \lbheel \lbheel \lfheel \lftoe % \rbheel \rbtoe \rfheel \rftoe -\version "1.0.21"; +\version "1.1.52"; \score{ \notes { diff --git a/input/praeludium-fuga-E.ly b/input/praeludium-fuga-E.ly index 1742c1286e..214795e22d 100644 --- a/input/praeludium-fuga-E.ly +++ b/input/praeludium-fuga-E.ly @@ -23,7 +23,7 @@ * organ staff... %} -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/rhythm.ly b/input/rhythm.ly index b0de5a90bd..53198954a3 100644 --- a/input/rhythm.ly +++ b/input/rhythm.ly @@ -7,7 +7,7 @@ TestedFeatures = "multiple meters, beaming, unsynced bars, userdefd engravers"; -\version "1.0.21"; +\version "1.1.52"; ritme = \notes\transpose c'' { \time 4/4; @@ -19,7 +19,7 @@ ritme = \notes\transpose c'' { \time 5/16; % divide measure in 5 equal parts. Usually it 2+3 or 3+2 - \grouping 16*5 ; + [c8 c16 c8 ] | % watch THIS! \times 5/4 { [ c16 c16 c16 c16] } | \time 2/8; diff --git a/input/scales.ly b/input/scales.ly index 18ae6a9844..a4ea103048 100644 --- a/input/scales.ly +++ b/input/scales.ly @@ -16,7 +16,7 @@ copyright = "public domain"; % scales with accents. % -\version "1.0.21"; +\version "1.1.52"; blah = \notes { \time 6/8; \transpose c { diff --git a/input/scripts.ly b/input/scripts.ly index a78e1f8c25..92d4a624af 100644 --- a/input/scripts.ly +++ b/input/scripts.ly @@ -1,5 +1,5 @@ -\version "1.0.21"; +\version "1.1.52"; blah = \notes{ \transpose c'' { diff --git a/input/star-spangled-banner.ly b/input/star-spangled-banner.ly index 49a0e4f3c9..ef7324b2ca 100644 --- a/input/star-spangled-banner.ly +++ b/input/star-spangled-banner.ly @@ -118,4 +118,4 @@ global = \notes { } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/alphabet.ly b/input/test/alphabet.ly index 361ec08752..9d72e6a90a 100644 --- a/input/test/alphabet.ly +++ b/input/test/alphabet.ly @@ -121,4 +121,4 @@ xxx\break } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/ass-extra-voice.ly b/input/test/ass-extra-voice.ly new file mode 100644 index 0000000000..c7c57badd7 --- /dev/null +++ b/input/test/ass-extra-voice.ly @@ -0,0 +1,94 @@ +global = \notes { + \key a \minor; + \time 6/4; +% \skip 1.*34; +% \bar ".|"; +} + +melody = \notes\relative c''{ + r2 r r + r2 r r + r4 a'8-- \< a-- a-- a-- c-- \!b-- a--\> gis f \!e + es8 \grace b c r4 r2 r +} + +basloopje = \notes\relative c{ + d,8( a' d f a d f d a f d )a +} + +accompany = \notes \relative c{ + \notes\relative c \basloopje + \notes\relative c \basloopje + \notes\relative c \basloopje + \notes\relative c \basloopje +} + +\score{ + \notes{ + \context AutoSwitchGrandStaff \relative c < + \global + \context Staff=upper { + \context Voice=foo + \property Voice.verticalDirection = 1 + \property Voice.scriptVerticalDirection = 1 + \melody + } + \context AutoSwitchContext \accompany + > + } + + \paper { + gourlay_maxmeasures = 4.; + indent = 8.\mm; + textheight = 295.\mm; + + % no slur damping + slur_slope_damping = 100.0; + + \translator{ + \StaffContext + % don't auto-generate bars: not a good idea: -> no breakpoints + % barAuto = "0"; + % urg defaultBarType = ""; + defaultBarType = "empty"; + \remove "Time_signature_engraver"; + } + \translator{ + \GraceContext + \remove "Local_key_engraver"; + } + \translator { + \ScoreContext + \accepts AutoSwitchGrandStaff; + } + \translator{ + \type "Engraver_group_engraver"; + \name AutoSwitchGrandStaff; + \consists "Span_bar_engraver"; + \consists "Vertical_align_engraver"; + \consists "Piano_bar_engraver"; + \consistsend "Axis_group_engraver"; + minVerticalAlign = 2.*\staffheight; + maxVerticalAlign = 2.*\staffheight; + switcherName = "Voice"; + acceptorName = "Thread"; + staffContextName = "Staff"; + + \accepts "AutoSwitchContext"; + \accepts "Staff"; + slurVerticalDirection = 1; + verticalDirection = -1; + beamAutoEnd = "1/2"; + } + \translator { + \type "Engraver_group_engraver"; + \name "AutoSwitchContext"; + \consists "Staff_switching_translator"; + } + } +% broken 1.1.51.hwn2 +% \midi { +% \tempo 4 = 54; +% } +} + diff --git a/input/test/auto-staff-switch.ly b/input/test/auto-staff-switch.ly index 627447148d..ddf2b840be 100644 --- a/input/test/auto-staff-switch.ly +++ b/input/test/auto-staff-switch.ly @@ -35,4 +35,4 @@ }} -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/bar-scripts.ly b/input/test/bar-scripts.ly index 0eebd74cab..640fb0df69 100644 --- a/input/test/bar-scripts.ly +++ b/input/test/bar-scripts.ly @@ -1,5 +1,5 @@ -\version "1.0.21"; +\version "1.1.52"; onestaff = \context Staff = foo\notes { \property Staff.instr = instr diff --git a/input/test/beam-chord.ly b/input/test/beam-chord.ly index d9553639b5..6362e8c1f4 100644 --- a/input/test/beam-chord.ly +++ b/input/test/beam-chord.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score{ \notes\transpose c'{ diff --git a/input/test/beam-interstaff.ly b/input/test/beam-interstaff.ly index 41e0adc669..287ff990f3 100644 --- a/input/test/beam-interstaff.ly +++ b/input/test/beam-interstaff.ly @@ -30,4 +30,4 @@ } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/beam-isknee.ly b/input/test/beam-isknee.ly index 342b553526..a3b35770fb 100644 --- a/input/test/beam-isknee.ly +++ b/input/test/beam-isknee.ly @@ -21,4 +21,4 @@ } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/beam-pos.ly b/input/test/beam-pos.ly index 6d2abe6cb4..ad0f619d21 100644 --- a/input/test/beam-pos.ly +++ b/input/test/beam-pos.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score{ \notes\transpose c''{ diff --git a/input/test/beaming.ly b/input/test/beaming.ly new file mode 100644 index 0000000000..cba2132db8 --- /dev/null +++ b/input/test/beaming.ly @@ -0,0 +1,20 @@ + +\score { \context Staff \notes \relative c'' { + [c8. c16] + [c8. c16 c8. c16] + [c16 c8.] | + [c8. c16 c16 c8.] + [c8. c32 c32] + [c8 c8] | + [c16 c16] + [c32 c32] + [c64 c64] + c32 + [c8 c,4 c'8] % should warn here! + [c8 c c] c8 % over barline + [c16 c8 c16] + [c32 c16 c16 c16 c32] + [c32 c16 c8 c32] % hmm ? + + }} + diff --git a/input/test/beams.ly b/input/test/beams.ly index 819c9cdffe..fa773dd69c 100644 --- a/input/test/beams.ly +++ b/input/test/beams.ly @@ -6,7 +6,7 @@ copyright = "PD"; TestedFeatures = "beams and beamflags"; } -\version "1.0.21"; +\version "1.1.52"; \score{ < diff --git a/input/test/breathing-sign.ly b/input/test/breathing-sign.ly index 9cc99442af..541a817623 100644 --- a/input/test/breathing-sign.ly +++ b/input/test/breathing-sign.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score { \notes \relative c' { diff --git a/input/test/broken.ly b/input/test/broken.ly index 7c87350096..d7403184e4 100644 --- a/input/test/broken.ly +++ b/input/test/broken.ly @@ -5,7 +5,7 @@ TestedFeatures = "This file tests Feta embedded slurs" + "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.21"; +\version "1.1.52"; shortlong = \notes{ c4()c( c c | diff --git a/input/test/chord-inversion.ly b/input/test/chord-inversion.ly index e2d63ff9c2..0c9b3f6f98 100644 --- a/input/test/chord-inversion.ly +++ b/input/test/chord-inversion.ly @@ -22,4 +22,4 @@ inversions = \notes\transpose c''\chords{ > } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/chord-table.ly b/input/test/chord-table.ly index e31e92a57e..907782915f 100644 --- a/input/test/chord-table.ly +++ b/input/test/chord-table.ly @@ -41,4 +41,4 @@ tab = \notes\transpose c'''\chords{ } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/chords.ly b/input/test/chords.ly index dda0de434d..44e92b17a7 100644 --- a/input/test/chords.ly +++ b/input/test/chords.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; %{ Would this be acceptable/good enough/convenient for entry? diff --git a/input/test/clefs.ly b/input/test/clefs.ly index de74c39138..cd97e9815f 100644 --- a/input/test/clefs.ly +++ b/input/test/clefs.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score { \notes{ diff --git a/input/test/collisions.ly b/input/test/collisions.ly index 9c8e46f3d8..1e8796cc5f 100644 --- a/input/test/collisions.ly +++ b/input/test/collisions.ly @@ -5,7 +5,7 @@ enteredby = "HWN,JCN"; copyright = "public domain"; Tested = "test the Collision resolution "; } -\version "1.0.21"; +\version "1.1.52"; twovoice = \context Staff \notes < \context Voice=i { \stemdown c4 d e f g2~ g4 a [c8 d e f] c2| } diff --git a/input/test/defaultbars.ly b/input/test/defaultbars.ly index 664d0bc54d..2997c12deb 100644 --- a/input/test/defaultbars.ly +++ b/input/test/defaultbars.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score { diff --git a/input/test/denneboom.ly b/input/test/denneboom.ly index f0105edf90..3579f8d3d6 100644 --- a/input/test/denneboom.ly +++ b/input/test/denneboom.ly @@ -7,7 +7,7 @@ TestedFeatures = "This file tests silly line shapes"; \include "paper20.ly" -\version "1.0.21"; +\version "1.1.52"; oden = \lyrics{ O8 | diff --git a/input/test/dotted-slur.ly b/input/test/dotted-slur.ly index 1504b5bc12..5050baddbc 100644 --- a/input/test/dotted-slur.ly +++ b/input/test/dotted-slur.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score{ \notes{ diff --git a/input/test/extender.ly b/input/test/extender.ly index 643acb4fcd..45c2ae105f 100644 --- a/input/test/extender.ly +++ b/input/test/extender.ly @@ -5,4 +5,4 @@ > } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/extra-staff.ly b/input/test/extra-staff.ly index b12ab289f5..98269b0aea 100644 --- a/input/test/extra-staff.ly +++ b/input/test/extra-staff.ly @@ -42,4 +42,4 @@ extra-staff.ly: } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/find-fifths.ly b/input/test/find-fifths.ly new file mode 100644 index 0000000000..8d88c31f39 --- /dev/null +++ b/input/test/find-fifths.ly @@ -0,0 +1,10 @@ +\version "1.0.21"; + +\score{ + \notes \relative c { + c d c f c g c b, c g, c f, c c'' c +% run with find-quarts should suggest: +% c d c f c g' c, b c g c f, c' c'' c,, + } +} + diff --git a/input/test/font-body.ly b/input/test/font-body.ly index ad8d70d77c..65d91f885b 100644 --- a/input/test/font-body.ly +++ b/input/test/font-body.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; FontBody= \notes\transpose c''{ \bar "|:"; @@ -14,7 +14,7 @@ FontBody= \notes\transpose c''{ a\mf_\fermata a\f-\stopped a\ff-\open a\fff^\trill| a\fp-\reverseturn a4.\sf a4.\sfz | a4\fz % a\rf [c8-\prall c-\mordent] [a'-\prallmordent a'-\prallprall] - [c8-\upprall a'8-\downprall] [a' c] | + [c8-\upprall a'8-\downprall] [a'-\segno c-\wheel] | [c \< d e f] [as' ges' f' e'] [cis' dis' c' des'] [cisis' disis' \! ceses' deses'] | \clef "bass"; diff --git a/input/test/font.ly b/input/test/font.ly index dd65dc0756..95bfcc5840 100644 --- a/input/test/font.ly +++ b/input/test/font.ly @@ -7,7 +7,7 @@ description = "This file tests the Feta music font"; % "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.21"; +\version "1.1.52"; \include "font-body.ly" \score{ diff --git a/input/test/font16.ly b/input/test/font16.ly index 6701a291be..f8b65b215e 100644 --- a/input/test/font16.ly +++ b/input/test/font16.ly @@ -7,7 +7,7 @@ description = "This file tests the Feta music font"; % "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.21"; +\version "1.1.52"; \include "paper16.ly" \include "font-body.ly" diff --git a/input/test/font20.ly b/input/test/font20.ly index d342c427ea..2f5e368d45 100644 --- a/input/test/font20.ly +++ b/input/test/font20.ly @@ -17,5 +17,5 @@ TestedFeatures = gourlay_maxmeasures =5.; } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/gourlay.ly b/input/test/gourlay.ly index f7321e04a4..0975b2d978 100644 --- a/input/test/gourlay.ly +++ b/input/test/gourlay.ly @@ -4,7 +4,7 @@ copyright = "PD"; TestedFeatures = "This file tests some nasty Gourlay spacings"; } -\version "1.0.21"; +\version "1.1.52"; %{ diff --git a/input/test/hara-kiri.ly b/input/test/hara-kiri.ly index 58a1366b38..d337bc7e36 100644 --- a/input/test/hara-kiri.ly +++ b/input/test/hara-kiri.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; toeter_i = \notes\relative c <{ \property Staff.instrument = "Toeters" diff --git a/input/test/incipit.ly b/input/test/incipit.ly index 73bd6aec3b..d2057b2d77 100644 --- a/input/test/incipit.ly +++ b/input/test/incipit.ly @@ -6,7 +6,7 @@ /Mats B %} -\version "1.0.21"; +\version "1.1.52"; incipit = \notes\relative c'{ diff --git a/input/test/keys.ly b/input/test/keys.ly index 0f0c3c7ec1..8dc730e6b3 100644 --- a/input/test/keys.ly +++ b/input/test/keys.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; %{ test key itemv breaking diff --git a/input/test/knee.ly b/input/test/knee.ly index 37de7fa18d..d854ee539d 100644 --- a/input/test/knee.ly +++ b/input/test/knee.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score{ \notes\relative c'{ [c16 \stemdown c'' \stemboth c,, d] diff --git a/input/test/mark.ly b/input/test/mark.ly index dae0e41ddd..ab478a9b21 100644 --- a/input/test/mark.ly +++ b/input/test/mark.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; global = \notes { s1 | \mark "A"; diff --git a/input/test/memory.ly b/input/test/memory.ly index 90f508f2fb..804aca9c57 100644 --- a/input/test/memory.ly +++ b/input/test/memory.ly @@ -11,5 +11,5 @@ bla = \notes { > \paper { Gourlay_maxmeaures = 2.; } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/multi-rest.ly b/input/test/multi-rest.ly index aaf3fd8c68..e05b218f4f 100644 --- a/input/test/multi-rest.ly +++ b/input/test/multi-rest.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; voice_one = \notes\transpose c''{ \stemup R1 * 2 | f'4-. r r2 | R1 * 3 | diff --git a/input/test/noteheadstyle.ly b/input/test/noteheadstyle.ly index 3db8223a4b..abc1e5fbd4 100644 --- a/input/test/noteheadstyle.ly +++ b/input/test/noteheadstyle.ly @@ -26,4 +26,4 @@ c4 c2 c8 c16 c16 c1 } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/notemode-chords.ly b/input/test/notemode-chords.ly index b8652f0582..5b26d4c1c2 100644 --- a/input/test/notemode-chords.ly +++ b/input/test/notemode-chords.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score{ \notes \transpose c''{ diff --git a/input/test/number-staff-lines.fly b/input/test/number-staff-lines.fly index 4794afadc7..92a96187cf 100644 --- a/input/test/number-staff-lines.fly +++ b/input/test/number-staff-lines.fly @@ -1,2 +1,2 @@ -c' c c \property Staff . numberOfStaffLines = 3 +c' c c c | g' g g g \property Staff . numberOfStaffLines = 3 diff --git a/input/test/orchestscore.ly b/input/test/orchestscore.ly index 2887bd11ec..f055cdd281 100644 --- a/input/test/orchestscore.ly +++ b/input/test/orchestscore.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; m = \notes \relative c''{ c1 | c2 c | c c | c c | c c | c c | c c | c c | diff --git a/input/test/ossia.ly b/input/test/ossia.ly index 059cc24019..1057776aff 100644 --- a/input/test/ossia.ly +++ b/input/test/ossia.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; \score { diff --git a/input/test/perform-tie.fly b/input/test/perform-tie.fly new file mode 100644 index 0000000000..484f1368c5 --- /dev/null +++ b/input/test/perform-tie.fly @@ -0,0 +1,2 @@ +c8 c c ~ c c c c ~ c ~ c ~ c ~ c c c +%\grace { d16 c16 d16 } c8 diff --git a/input/test/repeatbar.fly b/input/test/repeatbar.fly new file mode 100644 index 0000000000..0829b73d29 --- /dev/null +++ b/input/test/repeatbar.fly @@ -0,0 +1,3 @@ +c'' d e f | \repetitions1*3 | +\time 3/4; +g4 a b | R2.*2 | diff --git a/input/test/rest-collision.ly b/input/test/rest-collision.ly index b97610a4ca..d5e5e9bc5b 100644 --- a/input/test/rest-collision.ly +++ b/input/test/rest-collision.ly @@ -38,4 +38,4 @@ restsII = \context Staff \notes { } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/rhythmic.ly b/input/test/rhythmic.ly new file mode 100644 index 0000000000..9670f5b44b --- /dev/null +++ b/input/test/rhythmic.ly @@ -0,0 +1,8 @@ +\score{ + \context RhythmicStaff { + \notes\relative c''{ + \time 4/4; + r4 r g2 | r4 g r2 | g1:32 | r1 | + } + } +} diff --git a/input/test/scales.fly b/input/test/scales.fly new file mode 100644 index 0000000000..d53b627070 --- /dev/null +++ b/input/test/scales.fly @@ -0,0 +1,102 @@ +% sharp-major +% c g d a e b fis cis + +\key c; +c' d e f g a b c + +\key g; +g a b c d e fis g + +\key d; +d, e fis g a b cis d + +\key a; +a b cis d e fis gis a + +\key e; +e, fis gis a b cis dis e + +\key b; +b cis dis e fis gis ais b + +\key fis; +fis, gis ais b cis dis eis fis + +\key cis; +cis, dis eis fis gis ais bis cis + +% sharp-minor +% a e b fis cis gis dis ais + +\key a\minor; +a b c d e f gis a + +\key e\minor; +e, fis g a b c dis e + +\key b\minor; +b cis d e fis g ais b + +\key fis\minor; +fis, gis a b cis d eis fis + +\key cis\minor; +cis, dis e fis gis a bis cis + +\key gis\minor; +gis ais b cis dis e fisis gis + +\key dis\minor; +dis, eis fis gis ais b cisis dis + +\key ais\minor; +ais bis cis dis eis fis gisis ais + +% flat-major +% c f bes es as des ges ces + +\key f; +f, g a bes c d e f + +\key bes; +bes, c d es f g a bes + +\key es; +es,, f g as bes c d es + +\key as; +as, bes c des es f g as + +\key des; +des,, es f ges as bes c des + +\key ges; +ges, as bes ces des es f ges + +\key ces; +ces,, des es fes ges as bes ces + +% flat-minor +% a d g c f bes es as + +\key d\minor; +d, e f g a bes cis d + +\key g\minor; +g, a bes c d es fis g + +\key c\minor; +c,, d es f g as b c + +\key f\minor; +f, g as bes c des e f + +\key bes\minor; +bes, c des es f ges a bes + +\key es\minor; +es,, f ges as bes ces d es + +\key as\minor; +as, bes ces des es fes g as + diff --git a/input/test/score-bar-scripts.ly b/input/test/score-bar-scripts.ly index 4d5ab9466f..4e155e5632 100644 --- a/input/test/score-bar-scripts.ly +++ b/input/test/score-bar-scripts.ly @@ -1,7 +1,7 @@ -\version "1.0.21"; +\version "1.1.52"; onestaff = \context Staff = foo\notes { \property Staff.instr = instr diff --git a/input/test/sleur.ly b/input/test/sleur.ly index d74f328c4b..b5ae077078 100644 --- a/input/test/sleur.ly +++ b/input/test/sleur.ly @@ -5,7 +5,7 @@ TestedFeatures = "This file tests Feta embedded slurs" + "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.21"; +\version "1.1.52"; shortlong = \notes{ c4()c( c c | diff --git a/input/test/slur-bug.ly b/input/test/slur-bug.ly index 4814daaac7..ff28f8d777 100644 --- a/input/test/slur-bug.ly +++ b/input/test/slur-bug.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; % bug % excentric slur can't handle this ... diff --git a/input/test/slur-damping.ly b/input/test/slur-damping.ly index 313d75a777..6b5619b7c8 100644 --- a/input/test/slur-damping.ly +++ b/input/test/slur-damping.ly @@ -1,5 +1,5 @@ % test damping -\version "1.0.21"; +\version "1.1.52"; \score{ \notes\relative c'{ diff --git a/input/test/slur-interstaff.ly b/input/test/slur-interstaff.ly index 90d03844c9..2d176e5565 100644 --- a/input/test/slur-interstaff.ly +++ b/input/test/slur-interstaff.ly @@ -38,4 +38,4 @@ } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/slur-swap.ly b/input/test/slur-swap.ly index 13abcdd1a1..ccd6dd0b3a 100644 --- a/input/test/slur-swap.ly +++ b/input/test/slur-swap.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; % urg, the direction of the slur gets swapped! \score{ diff --git a/input/test/slurs.ly b/input/test/slurs.ly index 2bd6626572..0cc8f2f06c 100644 --- a/input/test/slurs.ly +++ b/input/test/slurs.ly @@ -1,5 +1,5 @@ -\version "1.0.21"; +\version "1.1.52"; \score{ \notes\transpose c'{ diff --git a/input/test/spacing-2.ly b/input/test/spacing-2.ly index 9f0f43243c..3977dc81e1 100644 --- a/input/test/spacing-2.ly +++ b/input/test/spacing-2.ly @@ -33,4 +33,4 @@ source = "Petits Preludes et Fugues. Urtext. Editions Henry Lemoine, Paris."; } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/spacing.ly b/input/test/spacing.ly index cecb18c9d8..de7accdd5a 100644 --- a/input/test/spacing.ly +++ b/input/test/spacing.ly @@ -6,7 +6,7 @@ copyright = "public domain"; TestedFeatures = "This file tests various spacings"; } -\version "1.0.21"; +\version "1.1.52"; multipart = \notes \relative c'{ \context StaffGroup < diff --git a/input/test/span-bars.ly b/input/test/span-bars.ly index 37d13ef68a..ce5d89b3e1 100644 --- a/input/test/span-bars.ly +++ b/input/test/span-bars.ly @@ -1,5 +1,5 @@ -\version "1.0.21"; +\version "1.1.52"; nt = \notes { c1 \break c1 c1 } stuff = \notes \relative c'' < \context Staff = stone { \nt } diff --git a/input/test/staff-margin.ly b/input/test/staff-margin.ly index ca8e9dea33..fbf54a16f4 100644 --- a/input/test/staff-margin.ly +++ b/input/test/staff-margin.ly @@ -1,6 +1,6 @@ -\version "1.0.21"; +\version "1.1.52"; \score { diff --git a/input/test/staff-side-slur.ly b/input/test/staff-side-slur.ly index ff92e5b0b3..3c1a5fe44e 100644 --- a/input/test/staff-side-slur.ly +++ b/input/test/staff-side-slur.ly @@ -18,4 +18,4 @@ } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/staff-size.ly b/input/test/staff-size.ly index adf8d50c26..40db541ff0 100644 --- a/input/test/staff-size.ly +++ b/input/test/staff-size.ly @@ -14,4 +14,4 @@ > \paper { linewidth = -1.; } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/stem-tremolo.ly b/input/test/stem-tremolo.ly index 6e76092aad..bc59e46504 100644 --- a/input/test/stem-tremolo.ly +++ b/input/test/stem-tremolo.ly @@ -1,5 +1,5 @@ -\version "1.0.21"; +\version "1.1.52"; \score{ \notes \transpose c'''{ \stemup diff --git a/input/test/stem.ly b/input/test/stem.ly index a728939ef8..274405cbb6 100644 --- a/input/test/stem.ly +++ b/input/test/stem.ly @@ -8,7 +8,7 @@ of beams"; } -\version "1.0.21"; +\version "1.1.52"; beamintervals = \notes{ \time 7/4; diff --git a/input/test/tchaikovsky.ly b/input/test/tchaikovsky.ly index 6a0dc872ea..7b819215e4 100644 --- a/input/test/tchaikovsky.ly +++ b/input/test/tchaikovsky.ly @@ -7,7 +7,7 @@ enteredby = "Maarten Storm"; instrument= "Violoncello"; } -\version "1.0.21"; +\version "1.1.52"; % this is an example of extreme dynamics diff --git a/input/test/test-lyrics.ly b/input/test/test-lyrics.ly index f0cc24574e..8cbeaaa738 100644 --- a/input/test/test-lyrics.ly +++ b/input/test/test-lyrics.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; $somewhat_long = \lyrics{ \property Lyrics . textStyle = "roman" diff --git a/input/test/thumb.ly b/input/test/thumb.ly index 57dd37d821..ae3016d156 100644 --- a/input/test/thumb.ly +++ b/input/test/thumb.ly @@ -7,7 +7,7 @@ % the thumb-script is used in cello music to indicate a note that should % be played with your thumb. -\version "1.0.21"; +\version "1.1.52"; \score { \notes \relative c'' { [ <)b_\thumb b'-3> diff --git a/input/test/tie-bug.ly b/input/test/tie-bug.ly index 8df3c3c5a3..f52151068f 100644 --- a/input/test/tie-bug.ly +++ b/input/test/tie-bug.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; % middle tie is wrong diff --git a/input/test/tie.ly b/input/test/tie.ly index 61f4c512a3..90e9389b40 100644 --- a/input/test/tie.ly +++ b/input/test/tie.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; tie = \notes\transpose c''{ diff --git a/input/test/title.ly b/input/test/title.ly index 6058ef4d0a..05ee23883d 100644 --- a/input/test/title.ly +++ b/input/test/title.ly @@ -10,7 +10,7 @@ source = "urtext"; instrument= "Instrument"; } -\version "1.0.21"; +\version "1.1.52"; \score{ \notes diff --git a/input/test/transposition.ly b/input/test/transposition.ly index 72efd42818..be8fca2c86 100644 --- a/input/test/transposition.ly +++ b/input/test/transposition.ly @@ -22,7 +22,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; vOne = \notes \relative c''{ \clef"violin"; diff --git a/input/test/tup.ly b/input/test/tup.ly index 06b9dc8458..6a0e13cb09 100644 --- a/input/test/tup.ly +++ b/input/test/tup.ly @@ -8,4 +8,4 @@ } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/vertical-align.ly b/input/test/vertical-align.ly index 8295ae22ef..b3de054952 100644 --- a/input/test/vertical-align.ly +++ b/input/test/vertical-align.ly @@ -1,5 +1,5 @@ -\version "1.0.21"; +\version "1.1.52"; \score { \notes < diff --git a/input/test/vertical-text.ly b/input/test/vertical-text.ly index f6b98c1072..59d8024761 100644 --- a/input/test/vertical-text.ly +++ b/input/test/vertical-text.ly @@ -15,4 +15,4 @@ } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/test/wtk-huh.ly b/input/test/wtk-huh.ly index 5b38a572b0..d7111dac20 100644 --- a/input/test/wtk-huh.ly +++ b/input/test/wtk-huh.ly @@ -21,4 +21,4 @@ What's supposed to be demonstrated here? } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/input/tril.ly b/input/tril.ly index e513f364cf..60c612bd65 100644 --- a/input/tril.ly +++ b/input/tril.ly @@ -5,7 +5,7 @@ TestedFeatures = "This file tests trills" + "(Feta definitively is not an abbreviation of Font-En-TjA)"; } -\version "1.0.21"; +\version "1.1.52"; \score{ \notes{ diff --git a/input/twinkle-pop.ly b/input/twinkle-pop.ly index c7fb240f10..cb188cc04c 100644 --- a/input/twinkle-pop.ly +++ b/input/twinkle-pop.ly @@ -7,11 +7,7 @@ enteredby = "HWN, chords by Johan Vromans"; copyright = "public domain"; } -%{ -Tested Features lyrics and chords -%} - -\version "1.0.21"; +\version "1.1.52"; melodie = \notes\relative c'' { \clef "violin"; @@ -40,7 +36,7 @@ acc = \chords { text = \lyrics{ \property Lyrics . textStyle = "italic" - Ah!4 vous dir- ai_- je ma man2 + Ah!4 vous dir- ai- je ma man2 Ce4 qui cau- se mon tour- ment2 Pa-4 pa veut que je rai- so- nne Comme4 un- e grand- e per- so- nne diff --git a/input/twinkle.ly b/input/twinkle.ly index b791a6d665..1f5c15fa1b 100644 --- a/input/twinkle.ly +++ b/input/twinkle.ly @@ -19,7 +19,7 @@ traditional song in various languages. Tested Features: lyrics, interleaving lyrics and staffs, repeats %} -\version "1.0.21"; +\version "1.1.52"; melody = \notes \relative c'' { \clef violin; @@ -53,11 +53,11 @@ global = \notes { tekst = \lyrics{ Al-4 tijd is Kort- jak- je ziek,2 - midden4 in_de week maar s,_zon- dags niet.2 - s,_Zon-4 dags gaat ze naar de kerk,2 + midden4 "in de" week maar "'s zon-" dags niet.2 + "'s Zon-"4 dags gaat ze naar de kerk,2 met4 een boek vol zil- ver werk.2 Al-4 tijd is Kort- jak- je ziek,2 - midden8 _8 in_de8 _8 week4 maar s,_zon- dags niet.2 + mid-8 den in de week4 maar "'s zon-" dags niet.2 } @@ -69,7 +69,7 @@ tekst. Mogen wij ook af en toe ergens op afgeven? hegedraagjetekst = \lyrics{ Al-4 tijd zuigt Bill Gates mijn piek,2 "\TeX"4 is slecht- ser dan mu- ziek.2 - s,_Zon-4 dags gaat het door een raam,2 + "'s Zon-"4 dags gaat het door een raam,2 Weet4 dat ik me er- voor schaam.2 Al-4 tijd zuigt Bill Gates mijn piek,2 "\TeX"4 is slecht- ser dan mu- ziek.2 @@ -78,7 +78,7 @@ hegedraagjetekst = \lyrics{ texte = \lyrics{ \property Lyrics . textStyle" = "italic" % \property Lyrics . textStyle" = "roman" - Ah!4 vous dir- ai_- je ma- man2 + Ah!4 vous dir- ai- je ma- man2 Ce4 qui cau- se mon tour- ment2 Pa-4 pa veut que je rai- son- ne Comm' u- ne gran- de per- son- ne @@ -109,7 +109,7 @@ textii = \lyrics{ textiii = \lyrics{ Then4 the tra- veler in the dark2 Thanks4 you for your ti- ny spark;2 - He_could4 not see which way to go,2 + He4 could not see which way8 to8 go,2 If4 you did not twin- kle so.2 Twin-4 kle, twin- kle, lit- tle star,2 How4 I won- der what you are!2 diff --git a/lily/audio-element.cc b/lily/audio-element.cc index 275e0a50a5..717e2b0ea1 100644 --- a/lily/audio-element.cc +++ b/lily/audio-element.cc @@ -9,7 +9,9 @@ #include "audio-element.hh" #include "debug.hh" - +Audio_element::Audio_element () +{ +} Audio_element::~Audio_element() { diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 7adf3de060..f48f92179c 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -8,92 +8,61 @@ #include "debug.hh" #include "audio-item.hh" #include "midi-item.hh" -#include "request.hh" #include "audio-column.hh" Audio_instrument::Audio_instrument (String instrument_str) - : Audio_item (0) { str_ = instrument_str; } -Midi_item* -Audio_instrument::midi_item_p() -{ - return str_.length_i() ? new Midi_instrument(0, str_) : 0; -} - - -Audio_item::Audio_item (Request* req_l) +Audio_item::Audio_item () { audio_column_l_ = 0; - req_l_ = req_l; -} - -Audio_key::Audio_key (Request* req_l) - : Audio_item (req_l) -{ } -Midi_item* -Audio_key::midi_item_p() -{ - return new Midi_key (this); -} - - -Audio_note::Audio_note (Request* req_l, int transposing_i) - : Audio_item (req_l) +Audio_note::Audio_note (Musical_pitch p, Moment m, int transposing_i) { + pitch_ = p; + length_mom_ = m; transposing_i_ = transposing_i; } -Midi_item* -Audio_note::midi_item_p() +Audio_key::Audio_key (Key_def const& k) { - return new Midi_note (this); + key_ = k; } - - Audio_tempo::Audio_tempo (int per_minute_4_i) - : Audio_item (0) { per_minute_4_i_ = per_minute_4_i; } -Midi_item* -Audio_tempo::midi_item_p() +Audio_time_signature::Audio_time_signature (int beats, int one_beat) { - return new Midi_tempo (this); + beats_i_ = beats; + one_beat_i_ = one_beat; } - - -Audio_time_signature::Audio_time_signature (Request* req_l) - : Audio_item (req_l) +Audio_text::Audio_text (Audio_text::Type type, String text_str) { + text_str_ = text_str; + type_ = type; } -Midi_item* -Audio_time_signature::midi_item_p() +Audio_tie::Audio_tie () { - return new Midi_time_signature (this); + note_l_drul_[RIGHT] = 0; + note_l_drul_[LEFT] = 0; } - - -Audio_text::Audio_text (Audio_text::Type type, String text_str) - : Audio_item (0) +void +Audio_tie::set_note (Direction d, Audio_note* note_l) { - text_str_ = text_str; - type_ = type; -} + assert (!note_l_drul_[d]); + note_l_drul_[d] = note_l; + //set_bounds (d, head_l); -Midi_item* -Audio_text::midi_item_p() -{ - return text_str_.length_i() ? new Midi_text(this) : 0; + // add_dependency (head_l); } void @@ -104,11 +73,6 @@ Audio_item::do_print () const { DOUT << "at: "<< audio_column_l_->at_mom (); } - if (req_l_) - { - DOUT << "from: "; - req_l_->print (); - } #endif } diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 20cb6b70c8..acca44ad5a 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -6,16 +6,16 @@ (c) 1999 Jan Nieuwenhuizen */ - +#include "new-beaming.hh" #include "auto-beam-engraver.hh" #include "musical-request.hh" #include "bar.hh" #include "beam.hh" -#include "rhythmic-grouping.hh" #include "rest.hh" #include "stem.hh" #include "debug.hh" -#include "time-description.hh" +#include "timing-engraver.hh" +#include "engraver-group-engraver.hh" ADD_THIS_TRANSLATOR (Auto_beam_engraver); @@ -26,6 +26,14 @@ Auto_beam_engraver::Auto_beam_engraver () finished_beam_p_ = 0; finished_grouping_p_ = 0; grouping_p_ = 0; + timer_l_ =0; +} + +void +Auto_beam_engraver::do_creation_processing () +{ + Translator * t = daddy_grav_l ()->get_simple_translator ("Timing_engraver"); + timer_l_ = dynamic_cast (t); } void @@ -37,7 +45,10 @@ Auto_beam_engraver::do_process_requests () void Auto_beam_engraver::consider_end_and_begin () { - Time_description const *time = get_staff_info().time_C_; + if (!timer_l_) + return; + + Time_description const *time = &timer_l_->time_; int num = time->whole_per_measure_ / time->one_beat_; int den = time->one_beat_.den_i (); String time_str = String ("time") + to_str (num) + "_" + to_str (den); @@ -158,7 +169,9 @@ Auto_beam_engraver::begin_beam () assert (!stem_l_arr_p_); stem_l_arr_p_ = new Array; assert (!grouping_p_); - grouping_p_ = new Rhythmic_grouping; + grouping_p_ = new Beaming_info_list; + beam_start_moment_ = now_mom (); + beam_start_location_ = timer_l_->time_.whole_in_measure_; } Beam* @@ -205,9 +218,8 @@ Auto_beam_engraver::typeset_beam () { if (finished_beam_p_) { - Rhythmic_grouping const * rg_C = get_staff_info().rhythmic_C_; - rg_C->extend (finished_grouping_p_->interval()); - finished_beam_p_->set_grouping (*rg_C, *finished_grouping_p_); + finished_grouping_p_->beamify (); + finished_beam_p_->set_beaming (finished_grouping_p_); typeset_element (finished_beam_p_); finished_beam_p_ = 0; @@ -246,85 +258,68 @@ Auto_beam_engraver::same_grace_state_b (Score_element* e) void Auto_beam_engraver::acknowledge_element (Score_element_info info) { + if (!same_grace_state_b (info.elem_l_) || !timer_l_) + return; + if (stem_l_arr_p_) { if (Beam *b = dynamic_cast (info.elem_l_)) { - if (same_grace_state_b (b)) - junk_beam (); + junk_beam (); } else if (Bar *b = dynamic_cast (info.elem_l_)) { - if (same_grace_state_b (b)) - junk_beam (); + junk_beam (); } - else if (Rhythmic_req *rhythmic_req = dynamic_cast (info.req_l_)) + else if (Rest* rest_l = dynamic_cast (info.elem_l_)) { - if (Rest* rest_l = dynamic_cast (info.elem_l_)) + end_beam (); + } + else if (Stem* stem_l = dynamic_cast (info.elem_l_)) + { + Rhythmic_req *rhythmic_req = dynamic_cast (info.req_l_); + if (!rhythmic_req) { - if (same_grace_state_b (rest_l)) - end_beam (); + programming_error ("Stem must have rhythmic structure"); + return; } - else if (Stem* stem_l = dynamic_cast (info.elem_l_)) + + if (stem_l->beam_l_) { + junk_beam (); + return ; + } + /* - if we're a nice grace beam, but the new note is regular, - gracefully end beam, and consider starting a regular one. - */ + now that we have last_add_mom_, perhaps we can (should) do away + with these individual junk_beams + */ + + int durlog =rhythmic_req->duration_.durlog_i_; + if (durlog <= 2) + end_beam (); + else + { /* - When does that happen !? --hwn - */ -#if 0 - if (stem_l_arr_p_ && stem_l_arr_p_->size () - && grace_b (stem_l_arr_p_->top ()) - && !grace_b (stem_l)) - { - end_beam (); - consider_end_and_begin (); - if (!stem_l_arr_p_) - return; - } -#endif - if (same_grace_state_b (stem_l)) + if shortest duration would change + reconsider ending/starting beam first. + */ + Moment mom = rhythmic_req->duration_.length_mom (); + if (mom < shortest_mom_) { - if (stem_l->beam_l_) - junk_beam (); - /* - now that we have last_add_mom_, perhaps we can (should) do away - with these individual junk_beams - */ - else if (rhythmic_req->duration_.durlog_i_ <= 2) - end_beam (); - else + if (stem_l_arr_p_->size ()) { - Moment start = get_staff_info().time_C_->whole_in_measure_; - if (!grouping_p_->child_fit_b (start)) - end_beam (); - else - { - /* - if shortest duration would change - reconsider ending/starting beam first. - */ - Moment mom = rhythmic_req->duration_.length_mom (); - if (mom < shortest_mom_) - { - if (stem_l_arr_p_->size ()) - { - shortest_mom_ = mom; - consider_end_and_begin (); - } - shortest_mom_ = mom; - } - grouping_p_->add_child (start, rhythmic_req->length_mom ()); - - stem_l_arr_p_->push (stem_l); - Moment now = now_mom (); - last_add_mom_ = now; - extend_mom_ = extend_mom_ >? now + rhythmic_req->length_mom (); - } + shortest_mom_ = mom; + consider_end_and_begin (); } + shortest_mom_ = mom; } + Moment now = now_mom (); + + grouping_p_->add_stem (now - beam_start_moment_ + beam_start_location_, durlog - 2); + stem_l_arr_p_->push (stem_l); + last_add_mom_ = now; + extend_mom_ = extend_mom_ >? now + rhythmic_req->length_mom (); } } } diff --git a/lily/bar-engraver.cc b/lily/bar-engraver.cc index 04eca12429..2d48eb6c4a 100644 --- a/lily/bar-engraver.cc +++ b/lily/bar-engraver.cc @@ -6,7 +6,7 @@ (c) 1997, 1998, 1999 Han-Wen Nienhuys Jan Nieuwenhuizen */ - +#include "score-engraver.hh" #include "bar-engraver.hh" #include "staff-bar.hh" #include "musical-request.hh" @@ -14,6 +14,7 @@ #include "command-request.hh" #include "time-description.hh" #include "engraver-group-engraver.hh" +#include "warn.hh" Bar_engraver::Bar_engraver() { @@ -34,7 +35,6 @@ Bar_engraver::do_try_music (Music*r_l) } return false; - } @@ -62,10 +62,21 @@ Bar_engraver::create_bar () { bar_p_->set_elt_property (at_line_start_scm_sym, SCM_BOOL_T); } + prop = get_property ("barSize", 0); + if (prop.isnum_b ()) + { + bar_p_->set_elt_property (bar_size_scm_sym, + gh_double2scm (Real(prop))); + } announce_element (Score_element_info (bar_p_, bar_req_l_)); } } +/** + Make a barline. If there are both |: and :| requested, merge them + to :|: + +*/ void Bar_engraver::request_bar (String type_str) { @@ -77,10 +88,11 @@ Bar_engraver::request_bar (String type_str) return; } create_bar (); + if (((type_str == "|:") && (bar_p_->type_str_ == ":|")) || ((type_str == ":|") && (bar_p_->type_str_ == "|:"))) bar_p_->type_str_ = ":|:"; - else + else if (type_str_.length_i ()) bar_p_->type_str_ = type_str; } @@ -128,9 +140,17 @@ Bar_engraver::do_process_requests() if (!bar_p_) { - Break_req r; - r.penalty_i_ = Break_req::DISALLOW; - daddy_grav_l ()->try_music (&r); + Score_engraver * e = 0; + Translator * t = daddy_grav_l (); + for (; !e && t; t = t->daddy_trans_l_) + { + e = dynamic_cast (t); + } + + if (!e) + programming_error ("No score engraver!"); + else + e->forbid_breaks (); } } diff --git a/lily/bar.cc b/lily/bar.cc index 31ff0b9c25..913c2c72ed 100644 --- a/lily/bar.cc +++ b/lily/bar.cc @@ -32,7 +32,8 @@ Bar::do_print () const Real Bar::get_bar_size () const { - return paper_l ()->get_var ("barsize"); + // Never called! + return 0; } diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 4e860dcd21..849163e5be 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -6,21 +6,23 @@ (c) 1998--1999 Han-Wen Nienhuys */ - +#include "timing-engraver.hh" +#include "engraver-group-engraver.hh" #include "beam-engraver.hh" #include "musical-request.hh" #include "beam.hh" -#include "rhythmic-grouping.hh" #include "stem.hh" #include "warn.hh" #include "time-description.hh" +#include "new-beaming.hh" +#include "score-engraver.hh" Beam_engraver::Beam_engraver () { beam_p_ = 0; finished_beam_p_ =0; - finished_grouping_p_ = 0; - grouping_p_ =0; + finished_beam_info_p_=0; + beam_info_p_ =0; reqs_drul_[LEFT] = reqs_drul_[RIGHT] =0; prev_start_req_ =0; } @@ -56,10 +58,26 @@ Beam_engraver::do_process_requests () reqs_drul_[STOP]->warning (_("No beam to end")); prev_start_req_ =0; finished_beam_p_ = beam_p_; - finished_grouping_p_ = grouping_p_; + finished_beam_info_p_ = beam_info_p_; + beam_info_p_ =0; beam_p_ = 0; - grouping_p_ = 0; + } + + + if (beam_p_) + { + Score_engraver * e = 0; + Translator * t = daddy_grav_l (); + for (; !e && t; t = t->daddy_trans_l_) + { + e = dynamic_cast (t); + } + + if (!e) + programming_error ("No score engraver!"); + else + e->forbid_breaks (); } if (reqs_drul_[START]) @@ -72,7 +90,14 @@ Beam_engraver::do_process_requests () prev_start_req_ = reqs_drul_[START]; beam_p_ = new Beam; - grouping_p_ = new Rhythmic_grouping; + + Translator * t = daddy_grav_l ()->get_simple_translator ("Timing_engraver"); + Timing_engraver *timer = dynamic_cast (t); + beam_start_location_ = (t) ? timer->time_.whole_in_measure_ : Moment (0); + beam_start_mom_ = now_mom(); + beam_info_p_ = new Beaming_info_list; + + Scalar prop = get_property ("beamslopedamping", 0); if (prop.isnum_b ()) @@ -91,15 +116,14 @@ Beam_engraver::typeset_beam () { if (finished_beam_p_) { - Rhythmic_grouping const * rg_C = get_staff_info().rhythmic_C_; - rg_C->extend (finished_grouping_p_->interval()); - finished_beam_p_->set_grouping (*rg_C, *finished_grouping_p_); + finished_beam_info_p_->beamify (); + + finished_beam_p_->set_beaming (finished_beam_info_p_); typeset_element (finished_beam_p_); + delete finished_beam_info_p_; + finished_beam_info_p_ =0; finished_beam_p_ = 0; - delete finished_grouping_p_; - finished_grouping_p_= 0; - reqs_drul_[STOP] = 0; } } @@ -124,7 +148,7 @@ Beam_engraver::do_removal_processing () { prev_start_req_->warning (_ ("Unfinished beam")); finished_beam_p_ = beam_p_; - finished_grouping_p_ = grouping_p_; + finished_beam_info_p_ = beam_info_p_; typeset_beam (); } } @@ -164,27 +188,10 @@ Beam_engraver::acknowledge_element (Score_element_info info) return; } - /* - TODO: do something sensible if it doesn't fit in the beam. - */ - Moment start = get_staff_info().time_C_->whole_in_measure_; - - if (!grouping_p_->child_fit_b (start)) - { - String s (_ ("please fix me") + ": " - + _f ("stem at %s doesn't fit in beam", now_mom ().str ())); - - if (info.req_l_) - info.req_l_->warning(s); - else - warning (s); - } - else - { - grouping_p_->add_child (start, rhythmic_req->length_mom ()); - stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_; - beam_p_->add_stem (stem_l); - } + stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_; + Moment stem_location = now_mom () - beam_start_mom_ + beam_start_location_; + beam_info_p_->add_stem (stem_location, rhythmic_req->duration_.durlog_i_ - 2); + beam_p_->add_stem (stem_l); } } diff --git a/lily/beam.cc b/lily/beam.cc index c6ae9c7f89..e523466d3c 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -24,6 +24,7 @@ needs what, and what information should be available when. #include +#include "new-beaming.hh" #include "proto.hh" #include "dimensions.hh" #include "beam.hh" @@ -34,7 +35,6 @@ needs what, and what information should be available when. #include "stem.hh" #include "paper-def.hh" #include "lookup.hh" -#include "rhythmic-grouping.hh" Beam::Beam () { @@ -573,6 +573,8 @@ Beam::set_stemlens () // enge floots Real epsilon_f = staffline_f / 8; + + // je bent zelf eng --hwn. Real dy_f = check_stemlengths_f (false); for (int i = 0; i < 2; i++) { @@ -589,52 +591,42 @@ Beam::set_stemlens () test_pos %= 4; } -/* - FIXME - ugh. this is broken and should be rewritten. - - [c8. c32 c32] - */ void -Beam::set_grouping (Rhythmic_grouping def, Rhythmic_grouping cur) +Beam::set_beaming (Beaming_info_list *beaming) +{ + Direction d = LEFT; + for (int i=0; i < stems_.size (); i++) + { + do + { + if (stems_[i]->beams_i_drul_[d] < 0) + stems_[i]->beams_i_drul_[d] = beaming->infos_.elem (i).beams_i_drul_[d]; + } + while (flip (&d) != LEFT); + } +} + + +void +Beam::do_add_processing () { - def.OK (); - cur.OK (); - assert (cur.children.size () == stems_.size ()); - - cur.split (def); - - Array b; - { - Array flags; - for (int j=0; j flag_i_ - 2; - assert (f>0); - flags.push (f); - } - int fi =0; - b= cur.generate_beams (flags, fi); - b.insert (0,0); - b.push (0); - assert (stems_.size () == b.size ()/2); - } - - for (int j=0, i=0; i < b.size () && j beams_i_drul_[d] < 0) - s->beams_i_drul_[d] = b[i]; - - multiple_i_ = multiple_i_ >? s->beams_i_drul_[d]; - i++; + multiple_i_ = multiple_i_ >? stems_[i]->beams_i_drul_[d]; } while ((flip (&d)) != LEFT); } + + if (stems_.size ()) + { + stems_[0]->beams_i_drul_[LEFT] =0; + stems_.top()->beams_i_drul_[RIGHT] =0; + } } + + /* beams to go with one stem. */ diff --git a/lily/command-request.cc b/lily/command-request.cc index 6cbd2bc92f..7ce3b9fd6c 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -11,10 +11,10 @@ #include "musical-request.hh" void -Cadenza_req::do_print() const +Cadenza_req::do_print () const { #ifndef NPRINT - DOUT << on_b_; + DOUT << (int)on_b_; #endif } @@ -40,7 +40,7 @@ Bar_req::do_equal_b (Request*r) const } void -Bar_req::do_print() const +Bar_req::do_print () const { #ifndef NPRINT DOUT << type_str_; @@ -73,7 +73,7 @@ Barcheck_req::do_equal_b (Request*r) const } void -Clef_change_req::do_print() const +Clef_change_req::do_print () const { #ifndef NPRINT DOUT << clef_str_ ; @@ -86,13 +86,13 @@ Clef_change_req::Clef_change_req (String s) } void -Partial_measure_req::do_print() const +Partial_measure_req::do_print () const { DOUT << length_mom_; } void -Time_signature_change_req::do_print() const +Time_signature_change_req::do_print () const { #ifndef NPRINT DOUT << beats_i_ << "/" << one_beat_i_; @@ -109,23 +109,23 @@ Time_signature_change_req::do_equal_b (Request * r) const && one_beat_i_ == m->one_beat_i_; } -Time_signature_change_req::Time_signature_change_req() +Time_signature_change_req::Time_signature_change_req () { beats_i_ = 0; one_beat_i_ =0; } -Tempo_req::Tempo_req() +Tempo_req::Tempo_req () { metronome_i_ = 60; dur_. durlog_i_ = 2; } void -Tempo_req::do_print() const +Tempo_req::do_print () const { - DOUT << dur_.str() << " = " << metronome_i_; + DOUT << dur_.str () << " = " << metronome_i_; } @@ -137,145 +137,24 @@ Tempo_req::do_equal_b (Request *r) const return t&& t->dur_.length_mom ()== dur_.length_mom () && metronome_i_ == t->metronome_i_; } -void -Measure_grouping_req::do_print() const -{ - for (int i=0; i < elt_length_arr_.size(); i++) - { - DOUT << beat_i_arr_[i] << "*" << elt_length_arr_[i].str () << " "; - } -} -bool -Measure_grouping_req::do_equal_b (Request*) const -{ - return false; // todo -} - -void -Key_change_req::transpose (Musical_pitch d) -{ - if (ordinary_key_b_ ) - { - if (pitch_arr_.size () > 0) - pitch_arr_[0].transpose(d); - else - { - warning(_ ("don't know how handle empty keys")); // TODO - } - } - else - { - Array old_pitch_arr_; - for (int i = 0; i < pitch_arr_.size(); i++) - { - old_pitch_arr_.push(pitch_arr_[i]); - } - // set accidentals for \key d (as in Key_engraver::read_req) - // (later called "new accidentals") - int p = d.semitone_pitch (); - /* Solve the equation 7*no_of_acc mod 12 = p, -6 <= no_of_acc <= 5 */ - int no_of_acc = (7*p) % 12; - no_of_acc = (no_of_acc + 18) % 12 -6; - - /* Correct from flats to sharps or vice versa */ - if (no_of_acc * d.accidental_i_ < 0) - no_of_acc += 12 * sign (d.accidental_i_); - - pitch_arr_.clear (); - if (no_of_acc < 0) - { - int accidental = 6 ; // First accidental: bes - for ( ; no_of_acc < 0 ; no_of_acc++ ) - { - Musical_pitch m; - m.accidental_i_ = -1; - m.notename_i_ = accidental; - pitch_arr_.push(m); - - accidental = (accidental + 3) % 7 ; - } - } - else - { - int accidental = 3 ; // First accidental: fis - for ( ; no_of_acc > 0 ; no_of_acc-- ) - { - Musical_pitch m; - m.accidental_i_ = 1; - m.notename_i_ = accidental; - pitch_arr_.push(m); - - accidental = (accidental + 4) % 7 ; - } - } - // Check if transposed old accidentals and the new ones coincide - no_of_acc = pitch_arr_.size(); - int acc_found; - Musical_pitch mm; - for (int i=0; i < old_pitch_arr_.size(); i++) - { - acc_found = 0; - mm = old_pitch_arr_[i]; - mm.transpose(d); - for (int j=0; ((j < no_of_acc) && (acc_found == 0)); j++) - { - if (pitch_arr_[j].notename_i_ == mm.notename_i_) - { - if (mm.accidental_i_ == 0) - { - // remove new accidental - pitch_arr_.del(j); - no_of_acc--; - acc_found = 1; - } - else - { - // change new accidental - pitch_arr_[j].accidental_i_ = mm.accidental_i_; - acc_found = 1; - } - } - } - if (acc_found == 0) - { - // add transposed old accidental - pitch_arr_.push(mm); - } - } - } -} - - -void -Key_change_req::squash_octaves() -{ - for (int i=0; i < pitch_arr_.size(); i++) - { - pitch_arr_[i].octave_i_ = 0; - } -} void -Key_change_req::do_print() const +Key_change_req::do_print () const { #ifndef NPRINT - for (int i=0; i < pitch_arr_.size(); i++) + for (int i=0; i < key_.pitch_arr_.size (); i++) { - pitch_arr_[i].print(); + key_.pitch_arr_[i].print (); } #endif } -Key_change_req::Key_change_req() +Key_change_req::Key_change_req () { - modality_i_ = 0; - ordinary_key_b_= false; } - - Break_req::Break_req () { penalty_i_ = 0; @@ -291,33 +170,3 @@ Mark_req::do_print () const { DOUT << str_; } - -int -Key_change_req::flats_i() -{ - int flats_i = 0; - for (int i = 0; i < pitch_arr_.size(); i++) - { - if (pitch_arr_[i].accidental_i_ < 0) - flats_i -= pitch_arr_[i].accidental_i_; - } - return flats_i; -} - -bool -Key_change_req::minor_b() const -{ - return modality_i_ == 3; -} - -int -Key_change_req::sharps_i() -{ - int sharps_i = 0; - for (int i = 0; i < pitch_arr_.size(); i++) - { - if (pitch_arr_[i].accidental_i_ > 0) - sharps_i += pitch_arr_[i].accidental_i_; - } - return sharps_i; -} diff --git a/lily/grace-performer-group.cc b/lily/grace-performer-group.cc new file mode 100644 index 0000000000..65d4cdef7f --- /dev/null +++ b/lily/grace-performer-group.cc @@ -0,0 +1,110 @@ +/* + grace-performer-group.cc -- implement Grace_performer_group + + source file of the GNU LilyPond music playter + + (c) 1999 Jan Nieuwenhuizen + + */ +#include "grace-performer-group.hh" +#include "lily-guile.hh" +#include "ly-symbols.hh" +#include "audio-element.hh" + +ADD_THIS_TRANSLATOR (Grace_performer_group); + +void +Grace_performer_group::start () +{ +} +/* + We're really finished with this context. Get rid of everything. + */ +void +Grace_performer_group::finish () +{ + calling_self_b_ = true; + removal_processing (); // ugr. We'd want to have this done by our parents.g + for (int i=0; i < announce_to_top_.size (); i++) + { + Performer::announce_element (announce_to_top_[i]); + } + + for (int i=0; i < play_us_.size (); i++) + { + Performer::play_element (play_us_[i]); + } + play_us_.clear (); + calling_self_b_ = false; +} + +void +Grace_performer_group::do_removal_processing () +{ + Performer_group_performer::do_removal_processing (); +} + +void +Grace_performer_group::announce_element (Audio_element_info inf) +{ + announce_info_arr_.push (inf); + // do not propagate to top + announce_to_top_.push (inf); + + //inf.elem_l_->set_elt_property (grace_scm_sym, SCM_BOOL_T); +} + +void +Grace_performer_group::play_element (Audio_element*e) +{ + play_us_.push (e); +} + + +Grace_performer_group::Grace_performer_group() +{ + calling_self_b_ = false; +} + +void +Grace_performer_group::process () +{ + calling_self_b_ = true; + process_requests (); + do_announces(); + pre_move_processing(); + check_removal(); + calling_self_b_ = false; +} + + +void +Grace_performer_group::each (Method_pointer method) +{ + if (calling_self_b_) + Performer_group_performer::each (method); +} + + +void +Grace_performer_group::each (Const_method_pointer method) const +{ + if (calling_self_b_) + Performer_group_performer::each (method); +} + +/* + don't let the commands trickle up. + */ +bool +Grace_performer_group::do_try_music (Music *m) +{ + bool hebbes_b =false; + + Link_array nongroups (nongroup_l_arr ()); + + for (int i =0; !hebbes_b && i < nongroups.size() ; i++) + hebbes_b =nongroups[i]->try_music (m); + + return hebbes_b; +} diff --git a/lily/graphical-axis-group.cc b/lily/graphical-axis-group.cc index 484b25368d..a3b8ffdb28 100644 --- a/lily/graphical-axis-group.cc +++ b/lily/graphical-axis-group.cc @@ -104,8 +104,8 @@ Graphical_axis_group::do_print() const Graphical_axis_group::Graphical_axis_group () { ordered_b_ = false; - axes_[0] = -1 ; - axes_[1] = -1 ; + axes_[0] = (Axis)-1 ; + axes_[1] = (Axis)-1 ; } void diff --git a/lily/include/audio-element.hh b/lily/include/audio-element.hh index dc46b926c6..16955f4027 100644 --- a/lily/include/audio-element.hh +++ b/lily/include/audio-element.hh @@ -12,12 +12,16 @@ #include "virtual-methods.hh" -struct Audio_element { - void print ()const; - - virtual ~Audio_element(); +class Audio_element +{ +public: + Audio_element (); + virtual ~Audio_element (); + + void print () const; protected: virtual void do_print () const; }; + #endif // AUDIO_ELEMENT_HH diff --git a/lily/include/audio-item.hh b/lily/include/audio-item.hh index b6b6d33c00..5c4f8ebce6 100644 --- a/lily/include/audio-item.hh +++ b/lily/include/audio-item.hh @@ -10,26 +10,24 @@ #include "lily-proto.hh" #include "string.hh" #include "audio-element.hh" +#include "key-def.hh" +#include "musical-pitch.hh" +#include "moment.hh" +#include "drul-array.hh" /** Any piece of audio information. - We need virtual constructors, + We need virtual conclassors, let's try decentralised factory for specific audio implemenations. */ -struct Audio_item : public Audio_element { - Audio_item (Request* req_l); - - /// Create a midi-item from myself. - virtual Midi_item* midi_item_p() = 0; +class Audio_item : public Audio_element +{ +public: + Audio_item (); Audio_column* audio_column_l_; - /* - THIS SUX. This ties the output system to the input system. Bad move. - */ - Request* req_l_; - protected: virtual void do_print () const; @@ -38,50 +36,69 @@ private: Audio_item& operator=( Audio_item const&); }; -struct Audio_key : public Audio_item { - Audio_key (Request* req_l); - - virtual Midi_item* midi_item_p(); +class Audio_key : public Audio_item +{ +public: + Audio_key (Key_def const& key); + + Key_def key_; }; -struct Audio_instrument : public Audio_item { +class Audio_instrument : public Audio_item +{ +public: Audio_instrument (String instrument_str); - virtual Midi_item* midi_item_p(); + String str_; - }; -struct Audio_note : public Audio_item { - - Audio_note (Request* req_l, int transposing_i = 0); - virtual Midi_item* midi_item_p(); +class Audio_note : public Audio_item +{ +public: + Audio_note (Musical_pitch p, Moment m, int transposing_i = 0); + + Musical_pitch pitch_; + Moment length_mom_; int transposing_i_; }; -struct Audio_text : Audio_item { +class Audio_text : public Audio_item +{ +public: enum Type { TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC, MARKER, CUE_POINT }; Audio_text (Audio_text::Type type, String text_str); - virtual Midi_item* midi_item_p(); Type type_; String text_str_; }; -struct Audio_tempo : Audio_item { +class Audio_tempo : public Audio_item +{ +public: Audio_tempo (int per_minute_4_i); - virtual Midi_item* midi_item_p(); - + int per_minute_4_i_; }; -struct Audio_time_signature : Audio_item { - Audio_time_signature (Request* req_l); - virtual Midi_item* midi_item_p(); - +class Audio_tie : public Audio_item +{ +public: + Audio_tie (); + void set_note (Direction, Audio_note*); + Drul_array note_l_drul_; +}; + +class Audio_time_signature : public Audio_item +{ +public: + Audio_time_signature (int beats, int one_beat); + + int beats_i_; + int one_beat_i_; }; #endif // AUDIO_ITEM_HH diff --git a/lily/include/auto-beam-engraver.hh b/lily/include/auto-beam-engraver.hh index 18b5ffceb0..ce8655dd24 100644 --- a/lily/include/auto-beam-engraver.hh +++ b/lily/include/auto-beam-engraver.hh @@ -25,7 +25,7 @@ protected: virtual void acknowledge_element (Score_element_info); virtual void do_process_requests (); virtual void process_acknowledged (); - + virtual void do_creation_processing (); private: void begin_beam (); void consider_end_and_begin (); @@ -38,12 +38,18 @@ private: Moment shortest_mom_; Beam *finished_beam_p_; Array* stem_l_arr_p_; + Moment last_add_mom_; Moment extend_mom_; + + + Moment beam_start_moment_; + Moment beam_start_location_; + Timing_translator * timer_l_; // We act as if beam were created, and start a grouping anyway. - Rhythmic_grouping*grouping_p_; - Rhythmic_grouping*finished_grouping_p_; + Beaming_info_list*grouping_p_; + Beaming_info_list*finished_grouping_p_; }; #endif /* AUTO_BEAM_ENGRAVER_HH */ diff --git a/lily/include/beam-engraver.hh b/lily/include/beam-engraver.hh index 292977680f..b0001c89df 100644 --- a/lily/include/beam-engraver.hh +++ b/lily/include/beam-engraver.hh @@ -19,8 +19,15 @@ class Beam_engraver : public Engraver { Beam *finished_beam_p_; Beam *beam_p_; Span_req * prev_start_req_; - Rhythmic_grouping*grouping_p_; - Rhythmic_grouping*finished_grouping_p_; + + Beaming_info_list * beam_info_p_; + Beaming_info_list * finished_beam_info_p_; + + /// location within measure where beam started. + Moment beam_start_location_; + + /// moment (global time) where beam started. + Moment beam_start_mom_; void typeset_beam (); protected: diff --git a/lily/include/beam.hh b/lily/include/beam.hh index e8458196eb..39f9b3b99b 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -59,6 +59,7 @@ public: Stem_info get_stem_info (Stem*); void set_grouping (Rhythmic_grouping def, Rhythmic_grouping current); + void set_beaming (Beaming_info_list *); void set_stemlens (); VIRTUAL_COPY_CONS(Score_element); @@ -72,14 +73,20 @@ protected: virtual void do_pre_processing (); virtual void do_post_processing (); virtual void do_substitute_element_pointer (Score_element*, Score_element*); + virtual void do_add_processing (); virtual void do_print() const; - virtual void quantise_left_y (bool extend_b); - virtual Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const; - virtual void calculate_slope (); - virtual Real check_stemlengths_f (bool set_b); - virtual void solve_slope (); - virtual void quantise_dy (); virtual Molecule*do_brew_molecule_p () const; + + Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const; + +private: + void calculate_slope (); + Real check_stemlengths_f (bool set_b); + void solve_slope (); + + void quantise_left_y (bool extend_b); + void quantise_dy (); + }; #endif // BEAM_HH diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index 805f100031..47507b8c3c 100644 --- a/lily/include/command-request.hh +++ b/lily/include/command-request.hh @@ -14,6 +14,7 @@ #include "array.hh" #include "duration.hh" #include "musical-pitch.hh" +#include "key-def.hh" class Break_req : public Request { public: @@ -101,15 +102,6 @@ public: VIRTUAL_COPY_CONS(Music); }; -class Measure_grouping_req : public Timing_req { -public: - Array beat_i_arr_; - Array elt_length_arr_; -protected: - virtual void do_print () const; - bool do_equal_b (Request *) const; - VIRTUAL_COPY_CONS(Music); -}; /** draw a (repeat)-bar. This something different than #Barcheck_req#, the latter should only happen at the start of a measure. */ @@ -133,26 +125,15 @@ class Breathing_sign_req : public Request { Routines for sharps and flats are separated, so that caller may identify non-conventional keys. */ -class Key_change_req : public Request { +class Key_change_req : public Request +{ public: - Array pitch_arr_; - int modality_i_; - bool ordinary_key_b_; - - Key_change_req(); - - /// squash the octaves to 1 - void squash_octaves(); - /// return number of flats in key - int flats_i(); - - /// return number of sharps in key - int sharps_i(); - bool minor_b() const; + Key_change_req (); + Key_def key_; protected: VIRTUAL_COPY_CONS(Music); - void transpose (Musical_pitch d); + // void transpose (Musical_pitch d); virtual void do_print () const; }; diff --git a/lily/include/grace-performer-group.hh b/lily/include/grace-performer-group.hh new file mode 100644 index 0000000000..515015e106 --- /dev/null +++ b/lily/include/grace-performer-group.hh @@ -0,0 +1,37 @@ +/* + grace-performer-group.hh -- declare + + source file of the GNU LilyPond music typesetter + + (c) 1999 Jan Nieuwenhuizen + + */ + +#ifndef GRACE_PERFORMER_GROUP_HH +#define GRACE_PERFORMER_GROUP_HH + +#include "performer-group-performer.hh" +#include "global-translator.hh" + +class Grace_performer_group : public Performer_group_performer, public Global_translator +{ + Link_array play_us_; + Array announce_to_top_; + bool calling_self_b_; +public: + VIRTUAL_COPY_CONS(Translator); + Grace_performer_group (); +protected: + virtual void announce_element (Audio_element_info); + virtual void start (); + virtual void finish (); + virtual void process (); + virtual void each (Method_pointer); + virtual void each (Const_method_pointer) const; + virtual void do_removal_processing () ; + virtual void play_element (Audio_element*); + virtual bool do_try_music (Music *m); +}; + + +#endif /* GRACE_PERFORMER_GROUP_HH */ diff --git a/lily/include/key-def.hh b/lily/include/key-def.hh new file mode 100644 index 0000000000..0303fb4e84 --- /dev/null +++ b/lily/include/key-def.hh @@ -0,0 +1,46 @@ +/* + key-def.hh -- declare + + source file of the GNU LilyPond music typesetter + + (c) 1999 Jan Nieuwenhuizen + + */ + +#ifndef KEY_DEF_HH +#define KEY_DEF_HH + +#include "array.hh" +#include "musical-pitch.hh" + +/** + Universal key definition (Should rename class Key to 'Accidentals'?) + */ +class Key_def +{ +public: + Key_def (); + + Array pitch_arr_; + int modality_i_; + bool ordinary_key_b_; + + /// squash the octaves to 1 + void squash_octaves (); + + /// return number accidentals in key; ordinary key only + int ordinary_accidentals_i () const; + + /// return number of flats in key + int flats_i () const; + + /// return number of sharps in key + int sharps_i () const; + + /// modality == 3 + bool minor_b () const; + + void transpose (Musical_pitch d); +}; + +#endif /* KEY_DEF_HH */ diff --git a/lily/include/key-performer.hh b/lily/include/key-performer.hh index 127dafb231..896db23ba4 100644 --- a/lily/include/key-performer.hh +++ b/lily/include/key-performer.hh @@ -12,7 +12,8 @@ #include "lily-proto.hh" #include "performer.hh" -class Key_performer : public Performer { +class Key_performer : public Performer +{ public: VIRTUAL_COPY_CONS(Translator); @@ -22,10 +23,12 @@ public: protected: void do_print() const; virtual bool do_try_music (Music* req_l); - virtual void do_process_requests(); + virtual void do_process_requests (); + virtual void do_pre_move_processing (); private: Key_change_req* key_req_l_; + Audio_key* audio_p_; }; #endif // KEY_PERFOMER_HH diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index 97d9d57970..e78946882c 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -25,10 +25,13 @@ struct Audio_element; struct Audio_element_info; struct Audio_column; struct Audio_item; +struct Audio_instrument; struct Audio_key; +struct Audio_text; struct Audio_time_signature; struct Audio_note; struct Audio_note_off; +struct Audio_tie; struct Audio_staff; struct Audio_tempo; struct Auto_beam_engraver; @@ -46,6 +49,8 @@ struct Barcheck_req; struct Beam; struct Beam_engraver; struct Beam_req; +struct Beaming_info; +struct Beaming_info_list; struct Blank_req; struct Bow; struct Box; @@ -168,7 +173,7 @@ struct Note_req; struct Note_head; struct Note_head_engraver; struct Notename_table; -struct New_repeated_music; +struct Repeated_music; struct Unfolded_repeat_iterator; struct Folded_repeat_iterator; struct Offset; @@ -259,6 +264,8 @@ struct Tonic_req; struct Translator; struct Translator_group; struct Timing_req; +struct Timing_translator; +struct Timing_engraver; struct Vertical_brace; struct Vertical_spanner; diff --git a/lily/include/ly-symbols.hh b/lily/include/ly-symbols.hh index dee6c5f0aa..4383fc8eea 100644 --- a/lily/include/ly-symbols.hh +++ b/lily/include/ly-symbols.hh @@ -16,7 +16,9 @@ #define DECLARE_LY_SYMBOL(a) extern SCM a ## _scm_sym #endif +DECLARE_LY_SYMBOL(alt_symbol); DECLARE_LY_SYMBOL(at_line_start); +DECLARE_LY_SYMBOL(bar_size); DECLARE_LY_SYMBOL(beam); DECLARE_LY_SYMBOL(beam_thickness); DECLARE_LY_SYMBOL(beam_dir); diff --git a/lily/include/lyric-performer.hh b/lily/include/lyric-performer.hh index c2e03d0727..d5198fafac 100644 --- a/lily/include/lyric-performer.hh +++ b/lily/include/lyric-performer.hh @@ -17,15 +17,17 @@ class Lyric_performer : public Performer { public: VIRTUAL_COPY_CONS(Translator); - + Lyric_performer (); protected: void do_print() const; virtual bool do_try_music (Music* req_l); virtual void do_process_requests(); + virtual void do_pre_move_processing (); private: Link_array lreq_arr_; + Audio_text* audio_p_; }; #endif // LYRIC_PERFOMER_HH diff --git a/lily/include/midi-item.hh b/lily/include/midi-item.hh index eb3b9f5276..6a64b0b93d 100644 --- a/lily/include/midi-item.hh +++ b/lily/include/midi-item.hh @@ -18,39 +18,41 @@ Maybe use base classes for RIFF files? */ -struct Midi_item { - Midi_item (Audio_item* audio_item_l); +class Midi_item +{ +public: + Midi_item (); virtual ~Midi_item (); + + /// factory + static Midi_item* midi_p (Audio_item* a); + static String i2varint_str (int i); + virtual String str () const = 0; - Audio_item* audio_item_l_; int channel_i_; - -private: - Midi_item (Midi_item const&); - Midi_item& operator = ( Midi_item const&); }; /** timed MIDI event */ -struct Midi_event +class Midi_event { - Midi_event (Moment delta_mom, Midi_item* mitem_l); - ~Midi_event (); +public: + Midi_event (Moment delta_mom, Midi_item* midi_l); + Moment delta_mom_; - Midi_item* mitem_p_; + Midi_item* midi_p_; String str () const; }; /** variable sized MIDI data */ -struct Midi_chunk : Midi_item { - - Midi_chunk (); - +class Midi_chunk : public Midi_item +{ +public: void set (String header_str, String data_str, String footer_str); virtual String str () const; virtual String data_str () const; @@ -61,51 +63,70 @@ private: String header_str_; }; -struct Midi_duration : public Midi_item { +class Midi_duration : public Midi_item +{ +public: Midi_duration (Real seconds_f); virtual String str () const; Real seconds_f_; }; -struct Midi_header : Midi_chunk { +class Midi_header : public Midi_chunk +{ +public: Midi_header (int format_i, int tracks_i, int clocks_per_4_i); }; /** Change instrument event */ -struct Midi_instrument : public Midi_item { - Midi_instrument (int channel_i, String instrument_str); +class Midi_instrument : public Midi_item +{ +public: + Midi_instrument (Audio_instrument*); virtual String str () const; - String instrument_str_; + + Audio_instrument* audio_l_; }; -struct Midi_key : public Midi_item { - Midi_key (Audio_item* audio_item_l); +class Midi_key : public Midi_item +{ +public: + Midi_key (Audio_key*); virtual String str () const; + + Audio_key* audio_l_; }; -struct Midi_time_signature : Midi_item { - Midi_time_signature (Audio_item* audio_item_l); +class Midi_time_signature : public Midi_item +{ +public: + Midi_time_signature (Audio_time_signature*); virtual String str () const; + + Audio_time_signature* audio_l_; int clocks_per_1_i_; }; /** Turn a note on. */ -struct Midi_note : public Midi_item { - Midi_note (Audio_item* audio_item_l); +class Midi_note : public Midi_item +{ +public: + Midi_note (Audio_note*); Moment length_mom () const; int pitch_i () const; virtual String str () const; + Audio_note* audio_l_; + static int const c0_pitch_i_c_ = 60; Byte dynamic_byte_; }; @@ -113,53 +134,53 @@ struct Midi_note : public Midi_item { /** Turn a note off */ -struct Midi_note_off : public Midi_item { +class Midi_note_off : public Midi_item +{ +public: Midi_note_off (Midi_note*); int pitch_i () const; virtual String str () const; + Midi_note* on_l_; Byte aftertouch_byte_; }; -struct Midi_text : Midi_item { - - +class Midi_text : public Midi_item +{ +public: enum Type { TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC, MARKER, CUE_POINT }; - Midi_text (Midi_text::Type type, String text_str); - Midi_text (Audio_item* audio_item_l); + + Midi_text (Audio_text*); virtual String str () const; - Type type_; - String text_str_; + Audio_text* audio_l_; }; -struct Midi_tempo : Midi_item { - Midi_tempo (int per_minute_4_i); - Midi_tempo (Audio_item* audio_item_l); +class Midi_tempo : public Midi_item +{ +public: + Midi_tempo (Audio_tempo*); virtual String str () const; - int per_minute_4_i_; + Audio_tempo* audio_l_; }; -struct Midi_track : Midi_chunk { +class Midi_track : public Midi_chunk +{ +public: int number_i_; Cons_list event_p_list_; Midi_track (); - ~Midi_track (); - void add (Moment delta_time_mom, Midi_item* mitem_l); + void add (Moment delta_time_mom, Midi_item* midi_l); virtual String data_str () const; - -private: - // copy trap - Midi_track (Midi_track const&); }; #endif // MIDI_ITEM_HH diff --git a/lily/include/midi-stream.hh b/lily/include/midi-stream.hh index 08643bb8d1..f367d62a2a 100644 --- a/lily/include/midi-stream.hh +++ b/lily/include/midi-stream.hh @@ -16,7 +16,7 @@ struct Midi_stream { ~Midi_stream(); Midi_stream& operator <<( String str); - Midi_stream& operator <<( Midi_item const& mitem_c_r); + Midi_stream& operator <<( Midi_item const& midi_c_r); Midi_stream& operator <<( int i); void open(); diff --git a/lily/include/multi-measure-rest-engraver.hh b/lily/include/multi-measure-rest-engraver.hh index 43732df92f..aa36e00edf 100644 --- a/lily/include/multi-measure-rest-engraver.hh +++ b/lily/include/multi-measure-rest-engraver.hh @@ -32,7 +32,7 @@ private: Drul_array rest_moments_; int start_measure_i_; - Multi_measure_rest_req* multi_measure_req_l_; + Rhythmic_req* multi_measure_req_l_; Multi_measure_rest* mmrest_p_; Multi_measure_rest* lastrest_p_; }; diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index 28ce7bf4cd..2c220138a9 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -124,13 +124,21 @@ public: /** Part: typeset a measure with the number of measures rest - Score: typeset all individual measures ass full rests + Score: typeset all individual measures as full rests */ class Multi_measure_rest_req : public Rhythmic_req { public: VIRTUAL_COPY_CONS(Music); }; +/** + Typeset a repetition sign in each bar. + */ +class Repetitions_req : public Rhythmic_req { +public: + VIRTUAL_COPY_CONS(Music); +}; + /// an extender line class Extender_req : public Request { public: diff --git a/lily/include/new-beaming.hh b/lily/include/new-beaming.hh new file mode 100644 index 0000000000..c4c0778b42 --- /dev/null +++ b/lily/include/new-beaming.hh @@ -0,0 +1,39 @@ +/* + new-beaming.hh -- declare New_beaming.hh + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys + + */ + +#ifndef NEW_BEAMING_HH +#define NEW_BEAMING_HH + +#include "parray.hh" +#include "drul-array.hh" +#include "moment.hh" + +struct Beaming_info +{ + Moment start_mom_; + Drul_array beams_i_drul_; + + Beaming_info (Moment, int); + int count (Direction d); + Beaming_info (); +}; + +struct Beaming_info_list +{ + Array infos_; + + int beam_extend_count (Direction) const; + int min_denominator_index () const; + void beamify (); + void add_stem (Moment d, int beams); +}; + + +#endif /* NEW_BEAMING_HH */ + diff --git a/lily/include/new-repeated-music.hh b/lily/include/new-repeated-music.hh index 8185180203..5cf2ff3166 100644 --- a/lily/include/new-repeated-music.hh +++ b/lily/include/new-repeated-music.hh @@ -1,5 +1,5 @@ /* - new-repeated-music.hh -- declare New_repeated_music + new-repeated-music.hh -- declare Repeated_music source file of the GNU LilyPond music typesetter @@ -7,8 +7,8 @@ */ -#ifndef NEW_REPEATED_MUSIC_HH -#define NEW_REPEATED_MUSIC_HH +#ifndef RepEATED_MUSIC_HH +#define RepEATED_MUSIC_HH #include "music.hh" @@ -47,7 +47,7 @@ the first alternative is assumed to be repeated. */ -class New_repeated_music : public Music +class Repeated_music : public Music { public: bool fold_b_; @@ -75,12 +75,12 @@ public: virtual void compress (Moment factor); VIRTUAL_COPY_CONS(Music); - New_repeated_music (Music*, int , Music_sequence*); - New_repeated_music (New_repeated_music const&); - ~New_repeated_music (); + Repeated_music (Music*, int , Music_sequence*); + Repeated_music (Repeated_music const&); + ~Repeated_music (); protected: virtual void do_print() const; }; -#endif /* NEW_REPEATED_MUSIC_HH */ +#endif /* RepEATED_MUSIC_HH */ diff --git a/lily/include/note-performer.hh b/lily/include/note-performer.hh index 837804367b..bfd49375c1 100644 --- a/lily/include/note-performer.hh +++ b/lily/include/note-performer.hh @@ -21,12 +21,14 @@ public: Note_performer(); protected: - virtual void do_process_requests(); + virtual void do_process_requests (); virtual bool do_try_music (Music *req_l) ; - virtual void do_print() const; + virtual void do_print () const; + virtual void do_pre_move_processing (); private: - Array note_req_l_; + Array note_req_l_arr_; + Array note_p_arr_; }; #endif // NOTE_PERFORMER_HH diff --git a/lily/include/paper-outputter.hh b/lily/include/paper-outputter.hh index 8eeae2cf30..f5c103d0a7 100644 --- a/lily/include/paper-outputter.hh +++ b/lily/include/paper-outputter.hh @@ -24,9 +24,6 @@ */ class Paper_outputter { -#ifdef __powerpc__ - Protected_scm port_; -#endif public: Paper_outputter (Paper_stream *); ~Paper_outputter (); diff --git a/lily/include/performer.hh b/lily/include/performer.hh index 03fea2f259..ce5b71ad51 100644 --- a/lily/include/performer.hh +++ b/lily/include/performer.hh @@ -19,17 +19,19 @@ Convert a music definition into a audio representation. A baseclass */ -class Performer : public virtual Translator{ +class Performer : public virtual Translator +{ public: VIRTUAL_COPY_CONS(Translator); friend class Performer_group_performer; Performer_group_performer* daddy_perf_l() const; + protected: virtual void announce_element (Audio_element_info); virtual void acknowledge_element (Audio_element_info); virtual void process_acknowledged (); virtual int get_tempo_i() const; - virtual void play (Audio_element * elem_p ); + virtual void play_element (Audio_element * elem_p ); }; diff --git a/lily/include/repeat-engraver.hh b/lily/include/repeat-engraver.hh index c5bcd04f81..2a4067e02e 100644 --- a/lily/include/repeat-engraver.hh +++ b/lily/include/repeat-engraver.hh @@ -10,6 +10,23 @@ #define REPEAT_ENGRAVER_HH #include "engraver.hh" +#include "cons.hh" + +struct Bar_create_event +{ + Moment when_; + bool bar_b_; + bool last_b_; + String type_; + Bar_create_event(); + Bar_create_event (Moment w, String s); + Bar_create_event (Moment w, int i, int j); +}; + +int compare (Bar_create_event const & c1, Bar_create_event const &c2) +{ + return (c1.when_ - c2.when_).sign(); +} /** Generate repeat-bars |: :| for repeated-music @@ -17,26 +34,28 @@ class Repeat_engraver : public Engraver { public: - VIRTUAL_COPY_CONS(Translator); - + Repeat_engraver (); protected: virtual void acknowledge_element (Score_element_info i); virtual void do_removal_processing (); virtual bool do_try_music (Music *req_l); virtual void do_process_requests(); virtual void do_pre_move_processing(); + virtual void do_post_move_processing (); + void queue_events (); private: - Link_array repeated_music_arr_; - Link_array alternative_music_arr_; - - Array bar_b_arr_; - Link_array volta_p_arr_; - Array stop_mom_arr_; - Array alternative_start_mom_arr_; - Array alternative_stop_mom_arr_; - Array alternative_str_arr_; + Repeated_music *repeated_music_l_; + bool done_this_one_b_; + + /* + Royal_brackla_create_queue is only two Whiskies away. :-) + */ + Cons *create_barmoments_queue_; + + Volta_spanner * volta_span_p_; + Volta_spanner* end_volta_span_p_; }; #endif // REPEAT_ENGRAVER_HH diff --git a/lily/include/score-engraver.hh b/lily/include/score-engraver.hh index 731f489921..e98e002681 100644 --- a/lily/include/score-engraver.hh +++ b/lily/include/score-engraver.hh @@ -35,7 +35,7 @@ public: VIRTUAL_COPY_CONS(Translator); Paper_score * pscore_p_; - + void forbid_breaks (); Score_engraver(); virtual Music_output *get_output_p (); protected: diff --git a/lily/include/score-performer.hh b/lily/include/score-performer.hh index 62abffaed8..289f694828 100644 --- a/lily/include/score-performer.hh +++ b/lily/include/score-performer.hh @@ -30,9 +30,11 @@ protected: virtual void process(); virtual void start(); virtual void do_add_processing (); + virtual void announce_element (Audio_element_info); virtual int get_tempo_i() const; - virtual void play (Audio_element* p); + virtual void play_element (Audio_element* p); virtual Music_output *get_output_p (); + private: void header (Midi_stream&); diff --git a/lily/include/staff-info.hh b/lily/include/staff-info.hh index 72ec7831da..3eaa1a4e48 100644 --- a/lily/include/staff-info.hh +++ b/lily/include/staff-info.hh @@ -18,7 +18,6 @@ */ struct Staff_info { Time_description const *time_C_; - Rhythmic_grouping const *rhythmic_C_; Score_column *musical_l_; Score_column *command_l_; diff --git a/lily/include/staff-performer.hh b/lily/include/staff-performer.hh index d9b2471c3e..1eb3cda727 100644 --- a/lily/include/staff-performer.hh +++ b/lily/include/staff-performer.hh @@ -11,7 +11,7 @@ #include "performer-group-performer.hh" /** Perform a staff. Individual notes should have their instrument - (staff-wide) set, so we override play() + (staff-wide) set, so we override play_element() */ class Staff_performer : public Performer_group_performer @@ -27,13 +27,18 @@ public: String instrument_str_; protected: - virtual void play (Audio_element* p); + virtual void play_element (Audio_element* p); virtual void do_removal_processing (); virtual void do_creation_processing (); virtual void do_process_requests (); + virtual void do_pre_move_processing (); private: Audio_staff* audio_staff_p_; + Audio_instrument* instrument_p_; + Audio_text* instrument_name_p_; + Audio_text* name_p_; + Audio_tempo* tempo_p_; }; #endif // STAFF_PERFORMER_HH diff --git a/lily/include/swallow-perf.hh b/lily/include/swallow-perf.hh index 9d3ea590c0..38b84befe3 100644 --- a/lily/include/swallow-perf.hh +++ b/lily/include/swallow-perf.hh @@ -12,7 +12,8 @@ #include "performer.hh" -class Swallow_performer : public Performer { +class Swallow_performer : public Performer +{ public: VIRTUAL_COPY_CONS(Translator); diff --git a/lily/include/tie-performer.hh b/lily/include/tie-performer.hh new file mode 100644 index 0000000000..08fe1b98f9 --- /dev/null +++ b/lily/include/tie-performer.hh @@ -0,0 +1,64 @@ +/* + tie-performer.hh -- declare + + source file of the GNU LilyPond music typesetter + + (c) 1999 Jan Nieuwenhuizen + + */ + +#ifndef TIE_PERFORMER_HH +#define TIE_PERFORMER_HH + +#include "pqueue.hh" +#include "performer.hh" + +struct CNote_melodic_tuple { + Melodic_req *req_l_ ; + Audio_note *note_l_; + Moment end_; + CNote_melodic_tuple (); + CNote_melodic_tuple (Audio_note*, Melodic_req*, Moment); + static int pitch_compare (CNote_melodic_tuple const &, CNote_melodic_tuple const &); + static int time_compare (CNote_melodic_tuple const &, CNote_melodic_tuple const &); +}; + +inline int compare (CNote_melodic_tuple const &a, CNote_melodic_tuple const &b) +{ + return CNote_melodic_tuple::time_compare (a,b); +} + + +/** + Manufacture ties. Acknowledge notes, and put them into a + priority queue. If we have a Tie_req, connect the notes that finish + just at this time, and note that start at this time. + + TODO: should share code with Tie_engraver ? + */ +class Tie_performer : public Performer +{ +public: + VIRTUAL_COPY_CONS(Translator); + Tie_performer (); + +private: + PQueue past_notes_pq_; + Tie_req *req_l_; + Array now_notes_; + Array stopped_notes_; + Link_array tie_p_arr_; + +protected: + virtual void do_post_move_processing (); + virtual void do_pre_move_processing (); + virtual void acknowledge_element (Audio_element_info); + virtual bool do_try_music (Music*); + virtual void do_process_requests (); + virtual void process_acknowledged (); + +}; + + +#endif /* TIE_PERFORMER_HH */ + diff --git a/lily/include/time-description.hh b/lily/include/time-description.hh index e32f4fcaa8..29c9ddcbd5 100644 --- a/lily/include/time-description.hh +++ b/lily/include/time-description.hh @@ -15,15 +15,15 @@ struct Time_description { Moment when_; - /// found an error so far? - bool error_b_ ; - /// if true, no bars needed, no reduction of whole_in_measure bool cadenza_b_; /// current measure info Moment whole_per_measure_; + /* + ugh: naming! junk whole_ prefixes. + */ /// where am i Moment whole_in_measure_; diff --git a/lily/include/time-signature-engraver.hh b/lily/include/time-signature-engraver.hh index 8d5a78bf63..9567489243 100644 --- a/lily/include/time-signature-engraver.hh +++ b/lily/include/time-signature-engraver.hh @@ -11,7 +11,6 @@ #define TIME_SIG_ENGRAVER_HH #include "engraver.hh" #include "time-description.hh" -#include "rhythmic-grouping.hh" /** generate time_signatures. diff --git a/lily/include/time-signature-performer.hh b/lily/include/time-signature-performer.hh index b86e9b4a6a..e03514706d 100644 --- a/lily/include/time-signature-performer.hh +++ b/lily/include/time-signature-performer.hh @@ -6,13 +6,14 @@ (c) 1997--1999 Jan Nieuwenhuizen */ -#ifndef METER_PERFOMER_HH -#define METER_PERFOMER_HH +#ifndef TIME_SIGNATURE_PERFORMER_HH +#define TIME_SIGNATURE_PERFORMER_HH #include "lily-proto.hh" #include "performer.hh" -class Time_signature_performer : public Performer { +class Time_signature_performer : public Performer +{ public: VIRTUAL_COPY_CONS(Translator); @@ -23,9 +24,11 @@ protected: void do_print() const; virtual bool do_try_music (Music* req_l); virtual void do_process_requests(); + virtual void do_pre_move_processing (); private: Time_signature_change_req* time_signature_req_l_; + Audio_time_signature* audio_p_; }; -#endif // METER_PERFOMER_HH +#endif // TIME_SIGNATURE_PERFORMER_HH diff --git a/lily/include/timing-engraver.hh b/lily/include/timing-engraver.hh index 1fc1524b53..00d55c5a46 100644 --- a/lily/include/timing-engraver.hh +++ b/lily/include/timing-engraver.hh @@ -11,6 +11,7 @@ #define TIMING_GRAV_HH #include "timing-translator.hh" +#include "engraver.hh" /** Do time bookkeeping diff --git a/lily/include/timing-translator.hh b/lily/include/timing-translator.hh index 5f67f7b984..ad2517ee22 100644 --- a/lily/include/timing-translator.hh +++ b/lily/include/timing-translator.hh @@ -12,7 +12,6 @@ #include "translator.hh" #include "time-description.hh" -#include "rhythmic-grouping.hh" #include "parray.hh" class Timing_translator : public virtual Translator @@ -20,10 +19,9 @@ class Timing_translator : public virtual Translator public: VIRTUAL_COPY_CONS(Translator); Time_signature_change_req * time_signature_req_l () const; - Timing_translator (); Time_description time_; - Rhythmic_grouping default_grouping_; + Link_array timing_req_l_arr_; protected: virtual void do_print () const; diff --git a/lily/include/volta-spanner.hh b/lily/include/volta-spanner.hh index a1debb439b..636acf03bb 100644 --- a/lily/include/volta-spanner.hh +++ b/lily/include/volta-spanner.hh @@ -19,10 +19,10 @@ public: Volta_spanner (); void add_column (Note_column*); - void add_column (Bar*); + void add_bar (Bar*); String number_str_; - Link_array column_arr_; + Link_array bar_arr_; Link_array note_column_arr_; bool last_b_; diff --git a/lily/item.cc b/lily/item.cc index f74418df8d..40da38cb8c 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -53,9 +53,9 @@ Item::line_l() const void Item::copy_breakable_items() { - if (broken_to_drul_[LEFT] || broken_to_drul_[RIGHT] - || ! breakable_b ()) - return; + if (broken_to_drul_[LEFT] || broken_to_drul_[RIGHT] + || !breakable_b ()) + return ; Drul_array new_copies; Direction i=LEFT; @@ -114,7 +114,8 @@ Item::do_breakable_col_processing() { if (breakable_b ()) do_break (); - + else + try_visibility_lambda (); } Item* Item::find_prebroken_piece (Line_of_score*l) const diff --git a/lily/key-def.cc b/lily/key-def.cc new file mode 100644 index 0000000000..7c492b23f3 --- /dev/null +++ b/lily/key-def.cc @@ -0,0 +1,184 @@ +/* + key-def.cc -- implement + + source file of the GNU LilyPond music typesetter + + (c) 1999 Jan Nieuwenhuizen + + */ + +#include "key-def.hh" +#include "debug.hh" + +Key_def::Key_def () +{ + modality_i_ = 0; + ordinary_key_b_ = false; +} + +int +Key_def::ordinary_accidentals_i () const +{ + if (!ordinary_key_b_) + { + programming_error ("Accidentals requested for non-conventional key"); + return 0; + } + + int p; + if (pitch_arr_.size () < 1) + { + warning (_ ("No key name: assuming `C'")); + p = 0; + } + else + { + p = pitch_arr_[0].semitone_pitch (); + p += modality_i_; + } + /* Solve the equation 7*accidentals_i mod 12 = p, -6 <= accidentals_i <= 5 */ + int accidentals_i = (7*p) % 12; + accidentals_i = (accidentals_i + 18) % 12 -6; + + /* Correct from flats to sharps or vice versa */ + if (accidentals_i * pitch_arr_[0].accidental_i_ < 0) + accidentals_i += 12 * sign (pitch_arr_[0].accidental_i_); + return accidentals_i; +} + +int +Key_def::flats_i () const +{ + if (ordinary_key_b_) + return 0 >? -ordinary_accidentals_i (); + int flats_i = 0; + for (int i = 0; i < pitch_arr_.size (); i++) + { + if (pitch_arr_[i].accidental_i_ < 0) + flats_i -= pitch_arr_[i].accidental_i_; + } + return flats_i; +} + +bool +Key_def::minor_b () const +{ + return modality_i_ == 3; +} + +int +Key_def::sharps_i () const +{ + if (ordinary_key_b_) + return 0 >? ordinary_accidentals_i (); + int sharps_i = 0; + for (int i = 0; i < pitch_arr_.size (); i++) + { + if (pitch_arr_[i].accidental_i_ > 0) + sharps_i += pitch_arr_[i].accidental_i_; + } + return sharps_i; +} + +void +Key_def::transpose (Musical_pitch d) +{ + if (ordinary_key_b_ ) + { + if (pitch_arr_.size () > 0) + pitch_arr_[0].transpose (d); + else + { + warning (_ ("don't know how handle empty keys")); // TODO + } + } + else + { + Array old_pitch_arr_; + for (int i = 0; i < pitch_arr_.size (); i++) + { + old_pitch_arr_.push (pitch_arr_[i]); + } + // set accidentals for \key d (as in Key_engraver::read_req) + // (later called "new accidentals") + int p = d.semitone_pitch (); + /* Solve the equation 7*accidentals_i mod 12 = p, -6 <= accidentals_i <= 5 */ + int accidentals_i = (7*p) % 12; + accidentals_i = (accidentals_i + 18) % 12 -6; + + /* Correct from flats to sharps or vice versa */ + if (accidentals_i * d.accidental_i_ < 0) + accidentals_i += 12 * sign (d.accidental_i_); + + pitch_arr_.clear (); + if (accidentals_i < 0) + { + int accidental = 6 ; // First accidental: bes + for ( ; accidentals_i < 0 ; accidentals_i++ ) + { + Musical_pitch m; + m.accidental_i_ = -1; + m.notename_i_ = accidental; + pitch_arr_.push (m); + + accidental = (accidental + 3) % 7 ; + } + } + else + { + int accidental = 3 ; // First accidental: fis + for ( ; accidentals_i > 0 ; accidentals_i-- ) + { + Musical_pitch m; + m.accidental_i_ = 1; + m.notename_i_ = accidental; + pitch_arr_.push (m); + + accidental = (accidental + 4) % 7 ; + } + } + // Check if transposed old accidentals and the new ones coincide + accidentals_i = pitch_arr_.size (); + int acc_found; + Musical_pitch mm; + for (int i=0; i < old_pitch_arr_.size (); i++) + { + acc_found = 0; + mm = old_pitch_arr_[i]; + mm.transpose (d); + for (int j=0; ( (j < accidentals_i) && (acc_found == 0)); j++) + { + if (pitch_arr_[j].notename_i_ == mm.notename_i_) + { + if (mm.accidental_i_ == 0) + { + // remove new accidental + pitch_arr_.del (j); + accidentals_i--; + acc_found = 1; + } + else + { + // change new accidental + pitch_arr_[j].accidental_i_ = mm.accidental_i_; + acc_found = 1; + } + } + } + if (acc_found == 0) + { + // add transposed old accidental + pitch_arr_.push (mm); + } + } + } +} + +void +Key_def::squash_octaves () +{ + for (int i=0; i < pitch_arr_.size (); i++) + { + pitch_arr_[i].octave_i_ = 0; + } +} diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 0fc8ad8946..50b137ab89 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -134,27 +134,11 @@ Key_engraver::read_req (Key_change_req const * r) accidental_idx_arr_.clear (); - if (r->ordinary_key_b_) + if (r->key_.ordinary_key_b_) { - int p; - if (r->pitch_arr_.size () < 1) - { - r->warning (_ ("No key name: assuming `C'")); - p = 0; - } - else - { - p = r->pitch_arr_[0].semitone_pitch (); - p += r->modality_i_; - } - /* Solve the equation 7*no_of_acc mod 12 = p, -6 <= no_of_acc <= 5 */ - int no_of_acc = (7*p) % 12; - no_of_acc = (no_of_acc + 18) % 12 -6; - - /* Correct from flats to sharps or vice versa */ - if (no_of_acc * r->pitch_arr_[0].accidental_i_ < 0) - no_of_acc += 12 * sign (r->pitch_arr_[0].accidental_i_); + int no_of_acc = r->key_.ordinary_accidentals_i (); + // Hmm, can't these be handled/constructed by Key_change_req? if (no_of_acc < 0) { int accidental = 6 ; // First accidental: bes @@ -192,9 +176,9 @@ Key_engraver::read_req (Key_change_req const * r) } else // Special key { - for (int i = 0; i < r->pitch_arr_.size (); i ++) + for (int i = 0; i < r->key_.pitch_arr_.size (); i ++) { - Musical_pitch m_l =r->pitch_arr_[i]; + Musical_pitch m_l =r->key_.pitch_arr_[i]; if (key_.multi_octave_b_) key_.set (m_l); else diff --git a/lily/key-performer.cc b/lily/key-performer.cc index ce9be75422..14d73dbbb9 100644 --- a/lily/key-performer.cc +++ b/lily/key-performer.cc @@ -13,32 +13,47 @@ -ADD_THIS_TRANSLATOR(Key_performer); +ADD_THIS_TRANSLATOR (Key_performer); -Key_performer::Key_performer() +Key_performer::Key_performer () { key_req_l_ = 0; + audio_p_ = 0; } -Key_performer::~Key_performer() +Key_performer::~Key_performer () { } void -Key_performer::do_print() const +Key_performer::do_print () const { #ifndef NPRINT if (key_req_l_) - key_req_l_->print(); + key_req_l_->print (); #endif } void -Key_performer::do_process_requests() +Key_performer::do_process_requests () { if (key_req_l_) - play (new Audio_key (key_req_l_)); - key_req_l_ = 0; + { + audio_p_ = new Audio_key (key_req_l_->key_); + Audio_element_info info (audio_p_, key_req_l_); + announce_element (info); + key_req_l_ = 0; + } +} + +void +Key_performer::do_pre_move_processing () +{ + if (audio_p_) + { + play_element (audio_p_); + audio_p_ = 0; + } } bool diff --git a/lily/lyric-performer.cc b/lily/lyric-performer.cc index 7ae0484379..be719e1c03 100644 --- a/lily/lyric-performer.cc +++ b/lily/lyric-performer.cc @@ -10,25 +10,42 @@ #include "musical-request.hh" #include "audio-item.hh" +ADD_THIS_TRANSLATOR (Lyric_performer); - - -ADD_THIS_TRANSLATOR(Lyric_performer); +Lyric_performer::Lyric_performer () +{ + audio_p_ = 0; +} void -Lyric_performer::do_print() const +Lyric_performer::do_print () const { #ifndef NPRINT - if (lreq_arr_.size()) - lreq_arr_[0]->print(); + if (lreq_arr_.size ()) + lreq_arr_[0]->print (); #endif } void -Lyric_performer::do_process_requests() +Lyric_performer::do_process_requests () { - if (lreq_arr_.size() && lreq_arr_[0]->text_str_.length_i()) - play (new Audio_text (Audio_text::LYRIC, lreq_arr_[0]->text_str_)); + if (lreq_arr_.size () && lreq_arr_[0]->text_str_.length_i ()) + { + audio_p_ = new Audio_text (Audio_text::LYRIC, lreq_arr_[0]->text_str_); + Audio_element_info info (audio_p_, lreq_arr_[0]); + announce_element (info); + } + lreq_arr_.clear(); +} + +void +Lyric_performer::do_pre_move_processing () +{ + if (audio_p_) + { + play_element (audio_p_); + audio_p_ = 0; + } lreq_arr_.clear(); } diff --git a/lily/midi-item.cc b/lily/midi-item.cc index b358e18433..b52ca3cf16 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -11,17 +11,33 @@ #include "misc.hh" #include "string.hh" #include "string-convert.hh" -#include "command-request.hh" -#include "musical-request.hh" #include "midi-item.hh" #include "midi-stream.hh" #include "audio-item.hh" +#include "duration.hh" #include "killing-cons.tcc" -Midi_chunk::Midi_chunk () - : Midi_item (0) +Midi_item* +Midi_item::midi_p (Audio_item* a) { + if (Audio_key* i = dynamic_cast (a)) + return new Midi_key (i); + else if (Audio_instrument* i = dynamic_cast (a)) + return i->str_.length_i () ? new Midi_instrument (i) : 0; + else if (Audio_note* i = dynamic_cast (a)) + return new Midi_note (i); + else if (Audio_tempo* i = dynamic_cast (a)) + return new Midi_tempo (i); + else if (Audio_time_signature* i = dynamic_cast (a)) + return new Midi_time_signature (i); + else if (Audio_text* i = dynamic_cast (a)) + return i->text_str_.length_i () ? new Midi_text (i) : 0; + else + assert (0); + + // isn't C++ grand? + return 0; } void @@ -43,12 +59,7 @@ Midi_chunk::str () const { String str = header_str_; String dat = data_str (); -#if 1 String length_str = String_convert::i2hex_str (dat.length_i () -#else - // huh, huh?? - String length_str = String_convert::i2hex_str (data_str_.length_i () -#endif + footer_str_.length_i (), 8, '0'); length_str = String_convert::hex2bin_str (length_str); str += length_str; @@ -58,7 +69,6 @@ Midi_chunk::str () const } Midi_duration::Midi_duration (Real seconds_f) - : Midi_item (0) { seconds_f_ = seconds_f; } @@ -69,16 +79,10 @@ Midi_duration::str () const return String (""; } -Midi_event::Midi_event (Moment delta_mom, Midi_item* mitem_p) +Midi_event::Midi_event (Moment delta_mom, Midi_item* midi_p) { delta_mom_ = delta_mom; - mitem_p_ = mitem_p; -} - -Midi_event::~Midi_event () -{ -// uhuh -// delete mitem_p_; + midi_p_ = midi_p; } String @@ -86,14 +90,13 @@ Midi_event::str () const { int delta_i = delta_mom_ * Moment (Duration::division_1_i_s); String delta_str = Midi_item::i2varint_str (delta_i); - String mitem_str = mitem_p_->str (); - assert (mitem_str.length_i ()); - return delta_str + mitem_str; + String midi_str = midi_p_->str (); + assert (midi_str.length_i ()); + return delta_str + midi_str; } Midi_header::Midi_header (int format_i, int tracks_i, int clocks_per_4_i) - : Midi_chunk () { String str; @@ -277,16 +280,10 @@ char const* const instrument_name_sz_a_[ ] = { 0 }; -Midi_instrument::Midi_instrument (int channel_i, String instrument_str) - : Midi_item (0) -{ - instrument_str_ = instrument_str; - instrument_str_.to_lower (); - channel_i_ = channel_i; -} - -Midi_item::~Midi_item () +Midi_instrument::Midi_instrument (Audio_instrument* a) { + audio_l_ = a; + audio_l_->str_.to_lower (); } String @@ -295,7 +292,7 @@ Midi_instrument::str () const Byte program_byte = 0; bool found = false; for (int i = 0; !found && instrument_name_sz_a_[i]; i++) - if (instrument_str_ == String (instrument_name_sz_a_[ i ])) + if (audio_l_->str_ == String (instrument_name_sz_a_[ i ])) { program_byte = (Byte)i; found = true; @@ -303,7 +300,7 @@ Midi_instrument::str () const if (!found) { - warning (_f("No such instrument: `%s'", instrument_str_.ch_C ())); + warning (_f("No such instrument: `%s'", audio_l_->str_.ch_C ())); } String str = to_str ((char) (0xc0 + channel_i_)); @@ -311,12 +308,15 @@ Midi_instrument::str () const return str; } -Midi_item::Midi_item (Audio_item* audio_item_l) +Midi_item::Midi_item () { - audio_item_l_ = audio_item_l; channel_i_ = 0; } +Midi_item::~Midi_item () +{ +} + String Midi_item::i2varint_str (int i) { @@ -340,17 +340,16 @@ Midi_item::i2varint_str (int i) return str; } -Midi_key::Midi_key (Audio_item* audio_item_l) - : Midi_item (audio_item_l) +Midi_key::Midi_key (Audio_key*a) { + audio_l_ = a; } String Midi_key::str () const { - Key_change_req* k = dynamic_cast (audio_item_l_->req_l_); - int sharps_i = k->sharps_i (); - int flats_i = k->flats_i (); + int sharps_i = audio_l_->key_.sharps_i (); + int flats_i = audio_l_->key_.flats_i (); // midi cannot handle non-conventional keys if (flats_i && sharps_i) @@ -363,23 +362,21 @@ Midi_key::str () const String str = "ff5902"; str += String_convert::i2hex_str (accidentals_i, 2, '0'); - int minor_i = k->minor_b (); - str += String_convert::i2hex_str (minor_i, 2, '0'); + str += String_convert::i2hex_str ((int)audio_l_->key_.minor_b (), 2, '0'); return String_convert::hex2bin_str (str); } -Midi_time_signature::Midi_time_signature (Audio_item* audio_item_l) - : Midi_item (audio_item_l) +Midi_time_signature::Midi_time_signature (Audio_time_signature* a) { + audio_l_ = a; clocks_per_1_i_ = 18; } String Midi_time_signature::str () const { - Time_signature_change_req* m = dynamic_cast (audio_item_l_->req_l_); - int num_i = m->beats_i_; - int den_i = m->one_beat_i_; + int num_i = audio_l_->beats_i_; + int den_i = audio_l_->one_beat_i_; String str = "ff5804"; str += String_convert::i2hex_str (num_i, 2, '0'); @@ -389,30 +386,30 @@ Midi_time_signature::str () const return String_convert::hex2bin_str (str); } -Midi_note::Midi_note (Audio_item* audio_item_l) - : Midi_item (audio_item_l) +Midi_note::Midi_note (Audio_note* a) { + audio_l_ = a; dynamic_byte_ = 0x7f; - assert (dynamic_cast (audio_item_l)); } Moment Midi_note::length_mom () const { - Moment m = dynamic_cast (audio_item_l_->req_l_)->length_mom (); + Moment m = audio_l_->length_mom_; +#if 0 if (m < Moment (1, 1000)) { warning (_ ("silly duration")); m = 1; } +#endif return m; } int Midi_note::pitch_i () const { - int p = dynamic_cast (audio_item_l_->req_l_)->pitch_.semitone_pitch () - + dynamic_cast(audio_item_l_)->transposing_i_; + int p = audio_l_->pitch_.semitone_pitch () + audio_l_->transposing_i_; if (p == INT_MAX) { warning (_ ("silly pitch")); @@ -433,19 +430,25 @@ Midi_note::str () const return str; } -Midi_note_off::Midi_note_off (Midi_note* midi_note_l) - : Midi_item (midi_note_l->audio_item_l_) +Midi_note_off::Midi_note_off (Midi_note* n) { + on_l_ = n; + channel_i_ = n->channel_i_; + + // Anybody who hears any difference, or knows how this works? + // 0x64 is supposed to be neutral, but let's try - aftertouch_byte_ = 0x64; - channel_i_ = midi_note_l->channel_i_; + //aftertouch_byte_ = 0x64; + + static int i = 0; + aftertouch_byte_ = i; + i += 0x10; } int Midi_note_off::pitch_i () const { - return dynamic_cast (audio_item_l_->req_l_)->pitch_.semitone_pitch () - + dynamic_cast(audio_item_l_)->transposing_i_; + return on_l_->pitch_i (); } String @@ -459,48 +462,41 @@ Midi_note_off::str () const return str; } -Midi_tempo::Midi_tempo (Audio_item* audio_item_l) - : Midi_item (audio_item_l) -{ - per_minute_4_i_ = dynamic_cast(audio_item_l_)->per_minute_4_i_; -} - -Midi_tempo::Midi_tempo (int per_minute_4_i) - : Midi_item (0) +Midi_tempo::Midi_tempo (Audio_tempo* a) { - per_minute_4_i_ = per_minute_4_i; + audio_l_ = a; } String Midi_tempo::str () const { - int useconds_per_4_i = 60 * (int)1e6 / per_minute_4_i_; + int useconds_per_4_i = 60 * (int)1e6 / audio_l_->per_minute_4_i_; String str = "ff5103"; str += String_convert::i2hex_str (useconds_per_4_i, 6, '0'); return String_convert::hex2bin_str (str); } -Midi_text::Midi_text (Audio_item* audio_item_l) - : Midi_item (audio_item_l) +Midi_text::Midi_text (Audio_text* a) { - text_str_ = dynamic_cast(audio_item_l_)->text_str_; - type_ = (Type) dynamic_cast(audio_item_l_)->type_; + audio_l_ = a; } +#if 0 Midi_text::Midi_text (Midi_text::Type type, String text_str) - : Midi_item (0) + : Audio_text () { text_str_ = text_str; type_ = type; } +#endif String Midi_text::str () const { - String str = "ff" + String_convert::i2hex_str (type_, 2, '0'); + String str = "ff" + String_convert::i2hex_str (audio_l_->type_, 2, '0'); str = String_convert::hex2bin_str (str); - str += i2varint_str (text_str_.length_i ()); - str += text_str_; + str += i2varint_str (audio_l_->text_str_.length_i ()); + str += audio_l_->text_str_; return str; } @@ -544,11 +540,11 @@ Midi_track::Midi_track () } void -Midi_track::add (Moment delta_time_mom, Midi_item* mitem_p) +Midi_track::add (Moment delta_time_mom, Midi_item* midi_p) { assert (delta_time_mom >= Moment (0)); - Midi_event * e = new Midi_event (delta_time_mom, mitem_p); + Midi_event * e = new Midi_event (delta_time_mom, midi_p); event_p_list_.append (new Killing_cons (e, 0)); } @@ -566,7 +562,3 @@ Midi_track::data_str () const } return str; } - -Midi_track::~Midi_track () -{ -} diff --git a/lily/midi-stream.cc b/lily/midi-stream.cc index f51110daed..ba8f161a95 100644 --- a/lily/midi-stream.cc +++ b/lily/midi-stream.cc @@ -40,10 +40,10 @@ Midi_stream::operator << (String str) } Midi_stream& -Midi_stream::operator << (Midi_item const& mitem_c_r) +Midi_stream::operator << (Midi_item const& midi_c_r) { -// *this <silent_b ("Midistrings")) { str = String_convert::bin2hex_str (str) + "\n"; diff --git a/lily/midi-walker.cc b/lily/midi-walker.cc index 2caa202576..c0afd12f15 100644 --- a/lily/midi-walker.cc +++ b/lily/midi-walker.cc @@ -106,27 +106,32 @@ Midi_walker::output_event (Moment now_mom, Midi_item* l) void Midi_walker::process() { - Audio_item* ptr = (*item_l_arr_l_)[index_]; - do_stop_notes (ptr->audio_column_l_->at_mom ()); + Audio_item* audio_p = (*item_l_arr_l_)[index_]; + do_stop_notes (audio_p->audio_column_l_->at_mom ()); /* THIS IS A MEMORY LEAK. FIXME. */ - Midi_item* p = ptr->midi_item_p (); - if (!p) - return; - p->channel_i_ = track_l_->number_i_; - - if (Midi_note *mi = dynamic_cast(p)) - do_start_note (mi); - else - output_event (ptr->audio_column_l_->at_mom (), p); + //Midi_item* p = ptr->midi_item_p (); + if (Midi_item* midi_p = Midi_item::midi_p (audio_p)) + { + midi_p->channel_i_ = track_l_->number_i_; + if (Midi_note* note_p = dynamic_cast(midi_p)) + { + if (note_p->length_mom ()) + do_start_note (note_p); + } + else + output_event (audio_p->audio_column_l_->at_mom (), midi_p); + } } + bool Midi_walker::ok () const { return index_ size (); } + void Midi_walker::operator ++(int) { diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 37e3baa7ac..00fd9118c1 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -42,20 +42,28 @@ Multi_measure_rest_engraver::acknowledge_element (Score_element_info i) bool Multi_measure_rest_engraver::do_try_music (Music* req_l) { - if (Multi_measure_rest_req *mr = dynamic_cast (req_l)) - { - if (multi_measure_req_l_) - if (!multi_measure_req_l_->equal_b (mr) - || rest_moments_[START] != now_mom ()) - return false; - - multi_measure_req_l_ = mr; - rest_moments_[START] = now_mom (); - - rest_moments_[STOP] = rest_moments_[START] + multi_measure_req_l_->duration_.length_mom (); - return true; - } - return false; + Rhythmic_req *r=0; + if (Multi_measure_rest_req *mr = + dynamic_cast (req_l)) + r=mr; + else if (Repetitions_req *rr = + dynamic_cast (req_l)) + r=rr; + if (r) + { + if (multi_measure_req_l_) + if (!multi_measure_req_l_->equal_b (r) + || rest_moments_[START] != now_mom ()) + return false; + + multi_measure_req_l_ = r; + rest_moments_[START] = now_mom (); + + rest_moments_[STOP] = rest_moments_[START] + + multi_measure_req_l_->duration_.length_mom (); + return true; + } + return false; } void @@ -65,6 +73,9 @@ Multi_measure_rest_engraver::do_process_requests () { Time_description const *time = get_staff_info().time_C_; mmrest_p_ = new Multi_measure_rest; + if(dynamic_cast (multi_measure_req_l_)) + mmrest_p_->set_elt_property (alt_symbol_scm_sym, + gh_str02scm("scripts-repeatsign")); announce_element (Score_element_info (mmrest_p_, multi_measure_req_l_)); start_measure_i_ = time->bars_i_; } diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 26e55b1770..5c604e3176 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -75,7 +75,14 @@ Multi_measure_rest::do_brew_molecule_p () const Molecule s; - if (measures_i_ == 1 || measures_i_ == 2 || measures_i_ == 4) + bool rest_symbol=true; + SCM alt_symbol_sym =get_elt_property (alt_symbol_scm_sym); + if (alt_symbol_sym != SCM_BOOL_F) + { + s = lookup_l () -> afm_find (ly_scm2string (SCM_CDR(alt_symbol_sym))); + rest_symbol = false; + } + else if (measures_i_ == 1 || measures_i_ == 2 || measures_i_ == 4) { s = lookup_l ()->rest (- intlog2(measures_i_), 0, ""); s.translate_axis (-s.extent ()[X_AXIS].length () / 2, X_AXIS); @@ -86,7 +93,7 @@ Multi_measure_rest::do_brew_molecule_p () const } mol_p->add_molecule (s); Real interline_f = staff_line_leading_f (); - if (measures_i_ == 1) + if (measures_i_ == 1 && rest_symbol) { mol_p->translate_axis (interline_f, Y_AXIS); } @@ -97,7 +104,6 @@ Multi_measure_rest::do_brew_molecule_p () const s.translate_axis (3.0 * interline_f, Y_AXIS); mol_p->add_molecule (s); } - mol_p->translate_axis (x_off, X_AXIS); return mol_p; } diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 1590f4fc49..e975d300a9 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -130,7 +130,7 @@ Music_iterator::static_get_iterator_p (Music const *m) p = new Grace_iterator; else if (dynamic_cast (m)) p = new Music_wrapper_iterator; - else if (New_repeated_music const * n = dynamic_cast (m)) + else if (Repeated_music const * n = dynamic_cast (m)) { if (n->fold_b_) p = new Folded_repeat_iterator; diff --git a/lily/music-list.cc b/lily/music-list.cc index c3cf8fab26..36087d65c4 100644 --- a/lily/music-list.cc +++ b/lily/music-list.cc @@ -20,7 +20,6 @@ Simultaneous_music::length_mom () const } - void Music_sequence::compress (Moment m) { diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 048dd1856b..d0521d2240 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -36,7 +36,6 @@ static Keyword_ent the_key_tab[]={ {"context", CONTEXT}, {"duration", DURATION}, {"font", FONT}, - {"grouping", GROUPING}, {"grace", GRACE}, {"header", HEADER}, {"in", IN_T}, @@ -60,6 +59,7 @@ static Keyword_ent the_key_tab[]={ {"relative", RELATIVE}, {"remove", REMOVE}, {"repeat", REPEAT}, + {"repetitions", REPETITIONS}, {"scm", SCM_T}, {"scmfile", SCMFILE}, {"score", SCORE}, diff --git a/lily/new-beaming.cc b/lily/new-beaming.cc new file mode 100644 index 0000000000..07337b25c9 --- /dev/null +++ b/lily/new-beaming.cc @@ -0,0 +1,97 @@ +/* + new-beaming.cc -- implement Beaming_info, Beaming_info_list + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys + + */ + +#include "new-beaming.hh" + +Beaming_info::Beaming_info( ) +{ + start_mom_ = 0; + beams_i_drul_[LEFT] = 0; + beams_i_drul_[RIGHT] = 0; +} + +Beaming_info::Beaming_info(Moment m, int i) +{ + start_mom_ = m; + beams_i_drul_[LEFT] = i; + beams_i_drul_[RIGHT] = i; +} + +const int infinity_i = 1000; // guh. + +int +Beaming_info_list::min_denominator_index () const +{ + int minden = infinity_i; + int minidx = -1; + + for (int i=1; i < infos_.size ( ); i++) + { + if (infos_[i].start_mom_.den_i () < minden) + { + minidx = i; + minden = infos_[i].start_mom_.den_i (); + } + } + + return minidx; +} + +int +Beaming_info_list::beam_extend_count (Direction d) const +{ + if (infos_.size () == 1) + return infos_[0].beams_i_drul_[d]; + + Beaming_info thisbeam = infos_.boundary (d, 0); + Beaming_info next = infos_.boundary (d, 1); + + return thisbeam.beams_i_drul_[-d] splits; + int m = min_denominator_index (); + splits[LEFT].infos_ = infos_.slice (0,m); + splits[RIGHT].infos_ = infos_.slice (m, infos_.size ()); + + Direction d = LEFT; + + do + { + splits[d].beamify (); + } + while (flip (&d) != LEFT); + + int middle_beams = splits[RIGHT].beam_extend_count (LEFT) 0) - for(int i=0;iprint (); + if (note_req_l_arr_.size()>0) + for(int i=0;iprint (); #endif } void Note_performer::do_process_requests () { - if (note_req_l_.size()>0) + if (note_req_l_arr_.size ()) { int transposing_i = 0; //urg @@ -39,18 +39,34 @@ Note_performer::do_process_requests () if (!prop.empty_b () && prop.isnum_b ()) transposing_i = prop; - while(note_req_l_.size()>0) - play (new Audio_note (note_req_l_.pop(), transposing_i)); - + while(note_req_l_arr_.size ()) + { + Note_req* n = note_req_l_arr_.pop (); + Audio_note* p = new Audio_note (n->pitch_, n->length_mom (), transposing_i); + Audio_element_info info (p, n); + announce_element (info); + note_p_arr_.push (p); + } } } -bool +void +Note_performer::do_pre_move_processing () +{ + for (int i=0; i < note_p_arr_.size (); i++) + { + play_element (note_p_arr_[i]); + } + note_p_arr_.clear (); + note_req_l_arr_.clear (); +} + +bool Note_performer::do_try_music (Music* req_l) { if (Note_req *nr = dynamic_cast (req_l)) { - note_req_l_.push(nr); + note_req_l_arr_.push (nr); return true; } return false; diff --git a/lily/p-score.cc b/lily/p-score.cc index c48cbddce0..261d3795f2 100644 --- a/lily/p-score.cc +++ b/lily/p-score.cc @@ -176,9 +176,10 @@ Paper_score::process () } if (experimental_features_global_b) - *mlog << elem_p_arr_.size () + span_p_arr_.size () << " elements. "; + *mlog << elem_p_arr_.size () + span_p_arr_.size () << _ (" elements. "); - *mlog << "\nLine ... "; + *mlog << "\n"; + *mlog << _ ("Line ... "); line_l_->break_processing (); for (int i=0; i < lines.size (); i++) { @@ -187,7 +188,7 @@ Paper_score::process () Line_of_score *line_l = lines[i]; line_l->post_processing (); - *mlog << i << flush; + *mlog << i << flush; line_l->output_all (i + 1 == lines.size()); if (experimental_features_global_b) *mlog << '(' << elem_p_arr_.size () + span_p_arr_.size () << ')'; diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index bc926f42d3..6d82f74380 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -31,25 +31,6 @@ Paper_outputter::Paper_outputter (Paper_stream *s) outstream_l_ = s; output_header (); -#ifdef __powerpc__ - if (output_global_ch == String ("scm")) - { - int fd = 1; - ofstream * of = dynamic_cast (outstream_l_->os); - if (of) - fd = of->rdbuf()->fd(); - FILE *file = fdopen (fd, "a"); - port_ = scm_standard_stream_to_port (file, "a", ""); - scm_display (gh_str02scm ( - "(primitive-load-path 'lily.scm)\n" - "(eval (tex-scm 'all-definitions))\n" - ";(eval (ps-scm 'all-definitions))\n" - "(display (map (lambda (x) (string-append (eval x) \"%\\n\")) '(\n" - ), port_); - - scm_fflush (port_); - } -#else if (output_global_ch == String ("scm")) *outstream_l_->os << "" "(primitive-load-path 'lily.scm)\n" @@ -57,7 +38,6 @@ Paper_outputter::Paper_outputter (Paper_stream *s) ";(eval (ps-scm 'all-definitions))\n" "(display (map (lambda (x) (string-append (eval x) \"\\n\")) '(\n" ; -#endif } Paper_outputter::~Paper_outputter () @@ -65,18 +45,10 @@ Paper_outputter::~Paper_outputter () SCM scm = gh_list (ly_symbol ("end-output"), SCM_UNDEFINED); output_scheme (scm); -#ifdef __powerpc__ - if (String (output_global_ch) == "scm") - { - scm_display (gh_str02scm (")))\n"), port_); - scm_fflush (port_); - } -#else if (String (output_global_ch) == "scm") { *outstream_l_->os << ")))"; } -#endif } void @@ -200,20 +172,11 @@ Paper_outputter::output_comment (String str) void Paper_outputter::output_scheme (SCM scm) { -#ifdef __powerpc__ - if (String (output_global_ch) == "scm") - { - scm_write (scm, port_); - scm_display (gh_str02scm ("\n"), port_); - scm_fflush (port_); - } -#else if (String (output_global_ch) == "scm") { SCM result = scm_eval (scm_listify (ly_symbol ("scm->string"), ly_quote_scm (scm), SCM_UNDEFINED)); *outstream_l_->os << ly_scm2string (result) << endl; } -#endif else { SCM result = scm_eval (scm); diff --git a/lily/parser.yy b/lily/parser.yy index adc565e244..cb4f0a942b 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -56,14 +56,14 @@ #include "grace-music.hh" // mmm -Mudela_version oldest_version ("1.0.20"); +Mudela_version oldest_version ("1.1.52"); Mudela_version version ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL ); void print_mudela_versions (ostream &os) { - os << "Mudela versions: oldest " << oldest_version.str () << " current " << version.str () < @@ -150,7 +150,6 @@ yylex (YYSTYPE *s, void * v_l) %token DURATION %token EXTENDER %token FONT -%token GROUPING %token GRACE %token HEADER %token IN_T @@ -173,6 +172,7 @@ yylex (YYSTYPE *s, void * v_l) %token RELATIVE %token REMOVE %token REPEAT +%token REPETITIONS %token SCM_T %token SCMFILE %token SCORE @@ -229,7 +229,7 @@ yylex (YYSTYPE *s, void * v_l) %type identifier_init %type steno_duration notemode_duration %type entered_notemode_duration explicit_duration -%type intastint_list int_list +%type int_list %type pre_requests post_requests %type gen_text_def %type explicit_musical_pitch steno_musical_pitch musical_pitch absolute_musical_pitch @@ -542,16 +542,6 @@ output_def: } ; -intastint_list: - /* */ { $$ =new Array; } - | intastint_list int '*' int { - $$->push ($2); $$->push ($4); - } - | intastint_list int { - $$->push ($2); $$->push (1); - } - ; - /* PAPER @@ -717,6 +707,7 @@ Alternative_music: } | ALTERNATIVE Music_sequence { $$ = $2; + $2->set_spot (THIS->here_input ()); } ; @@ -727,12 +718,16 @@ Repeated_music: REPEAT STRING unsigned Music Alternative_music { Music_sequence* m = dynamic_cast ($5); + if (m && $3 < m->length_i ()) + $5->warning ("More alternatives than repeats. Junking excess alternatives."); - New_repeated_music * r = new New_repeated_music ($4, $3 >? 1, m); + Repeated_music * r = new Repeated_music ($4, $3 >? 1, m); $$ = r; r->fold_b_ = (*$2 == "fold"); r->semi_fold_b_ = (*$2 == "semi"); delete $2; + r->set_spot (THIS->here_input ()); + } ; @@ -979,31 +974,20 @@ verbose_command_req: } | KEY NOTENAME_PITCH optional_modality { Key_change_req *key_p= new Key_change_req; - key_p->pitch_arr_.push(*$2); - key_p->ordinary_key_b_ = true; - key_p->modality_i_ = $3; + key_p->key_.pitch_arr_.push (*$2); + key_p->key_.ordinary_key_b_ = true; + key_p->key_.modality_i_ = $3; $$ = key_p; delete $2; } | KEYSIGNATURE pitch_list { Key_change_req *key_p= new Key_change_req; - key_p->pitch_arr_ = *$2; - key_p->ordinary_key_b_ = false; + key_p->key_.pitch_arr_ = *$2; + key_p->key_.ordinary_key_b_ = false; $$ = key_p; delete $2; } - | GROUPING intastint_list { - Measure_grouping_req * mr_p = new Measure_grouping_req; - for (int i=0; i < $2->size();) - { - mr_p->elt_length_arr_.push (Moment (1, $2->elem(i++))); - mr_p->beat_i_arr_.push ($2->elem(i++)); - } - - $$ = mr_p; - delete $2; - } ; post_requests: @@ -1377,6 +1361,16 @@ simple_element: velt_p->add_music (m); $$ = velt_p; } + | REPETITIONS notemode_duration { + Repetitions_req* r = new Repetitions_req; + r->duration_ = *$2; + delete $2; + + Simultaneous_music*velt_p = new Request_chord; + velt_p->set_spot (THIS->here_input ()); + velt_p->add_music (r); + $$ = velt_p; + } | STRING notemode_duration { if (!THIS->lexer_p_->lyric_state_b ()) THIS->parser_error (_ ("have to be in Lyric mode for lyrics")); diff --git a/lily/performance.cc b/lily/performance.cc index f25b63eea1..b97df6b69c 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -15,6 +15,7 @@ #include "midi-item.hh" #include "midi-stream.hh" #include "audio-column.hh" +#include "audio-item.hh" #include "audio-staff.hh" #include "performance.hh" #include "score.hh" @@ -45,11 +46,16 @@ Performance::output (Midi_stream& midi_stream) midi_stream << Midi_header (1, tracks_i, clocks_per_4_i); output_header_track (midi_stream); + *mlog << "\n"; + *mlog << _ ("Track ... "); int channel = 1; for (int i =0; i < audio_staff_l_arr_.size (); i++) { + *mlog << '[' << flush; Audio_staff *s = audio_staff_l_arr_[i]; + *mlog << i << flush; + /* Aargh, let's hear it for the MIDI standard. MIDI players tend to ignore instrument settings on @@ -58,6 +64,7 @@ Performance::output (Midi_stream& midi_stream) if (channel == 9) channel++; s->output (midi_stream, channel++); + *mlog << ']' << flush; } } @@ -74,7 +81,12 @@ Performance::output_header_track (Midi_stream& midi_stream) str += gnu_lilypond_version_str(); str += "\n"; - Midi_text creator (Midi_text::TEXT, str); + /* + This seems silly, but in fact the audio elements should + be generated elsewhere: not midi-specific. + */ + Audio_text creator_a (Audio_text::TEXT, str); + Midi_text creator (&creator_a); midi_track.add (Moment (0), &creator); str = _("Automatically generated"); @@ -87,19 +99,24 @@ Performance::output_header_track (Midi_stream& midi_stream) str += ctime (&t); str = str.left_str (str.length_i() - 1); } - Midi_text generate (Midi_text::TEXT, str); + Audio_text generate_a (Audio_text::TEXT, str); + Midi_text generate (&generate_a); midi_track.add (Moment (0), &generate); str = _f ("from musical definition: %s", origin_str_); - Midi_text from (Midi_text::TEXT, str); + Audio_text from_a (Audio_text::TEXT, str); + Midi_text from (&from_a); midi_track.add (Moment (0), &from); - Midi_text track_name (Midi_text::TRACK_NAME, "Track " - + String_convert::i2dec_str (0, 0, '0')); + Audio_text track_name_a (Audio_text::TRACK_NAME, "Track " + + String_convert::i2dec_str (0, 0, '0')); + Midi_text track_name (&track_name_a); + midi_track.add (Moment (0), &track_name); - Midi_tempo tempo (midi_l_->get_tempo_i (Moment (1, 4))); + Audio_tempo tempo_a (midi_l_->get_tempo_i (Moment (1, 4))); + Midi_tempo tempo (&tempo_a); midi_track.add (Moment (0), &tempo); midi_stream << midi_track; diff --git a/lily/performer-group-performer.cc b/lily/performer-group-performer.cc index c44d68ad7d..b0278c661d 100644 --- a/lily/performer-group-performer.cc +++ b/lily/performer-group-performer.cc @@ -49,7 +49,10 @@ Performer_group_performer::do_announces() for (int i=0; i < nongroups.size(); i++) { // Is this good enough? Performer * eng = dynamic_cast (nongroups[i]); - if (eng && eng!= info.origin_trans_l_arr_[0]) + // urg, huh? core dump? + //if (eng && eng!= info.origin_trans_l_arr_[0]) + if (eng && info.origin_trans_l_arr_.size () + && eng!= info.origin_trans_l_arr_[0]) eng->acknowledge_element (info); } } diff --git a/lily/performer.cc b/lily/performer.cc index 62ac44481e..f0cd2585e2 100644 --- a/lily/performer.cc +++ b/lily/performer.cc @@ -12,9 +12,9 @@ #include "debug.hh" void -Performer::play (Audio_element* p) +Performer::play_element (Audio_element* p) { - daddy_perf_l ()->play (p); + daddy_perf_l ()->play_element (p); } int diff --git a/lily/repeat-engraver.cc b/lily/repeat-engraver.cc index 650b5b3dd4..5864e06527 100644 --- a/lily/repeat-engraver.cc +++ b/lily/repeat-engraver.cc @@ -24,175 +24,255 @@ ADD_THIS_TRANSLATOR (Repeat_engraver); /* - Urg. Hairy. Needs redesign? + Needs redesign? + + - Logic needs to be moved out of do_try_music(), + + - don't try to do multiple repeated music. Lets assume repeats don't nest. + */ bool Repeat_engraver::do_try_music (Music* m) { - if (New_repeated_music* r = dynamic_cast (m)) + if (Repeated_music* r = dynamic_cast (m)) { - if (!r->semi_fold_b_) - return true; + if (repeated_music_l_) + { + m->warning ("Already have repeated music."); + return false; + } + + if (r->semi_fold_b_) + { + repeated_music_l_ = r; + return true; + } + } + return false; +} + +/** + Walk through repeat music, and generate events for appropriate times. +*/ +void +Repeat_engraver::queue_events () +{ + Music_sequence* alt = repeated_music_l_->alternatives_p_; + Moment walk_mom = now_mom () + repeated_music_l_->repeat_body_p_->length_mom (); + + + Cons_list becel; + becel.append (new Bar_create_event (now_mom (), "|:")); - Music_sequence* alt = r->alternatives_p_; - Moment repeat_length_mom = r->repeat_body_p_->length_mom (); - Moment stop_mom = now_mom () + repeat_length_mom; - Moment alt_mom = now_mom () + repeat_length_mom; + if (!alt) + { + becel.append (new Bar_create_event (walk_mom, ":|")); + becel.append (new Bar_create_event (walk_mom, "stop")); + } + else + { + int last_number = 0; + int volta_number = repeated_music_l_->repeats_i_ - alt->length_i () + 1; /* - if there's a repeat block, we'll need a stop-repeat :| - */ - if (repeat_length_mom) + all repeat alternatives, and generate events with + appropriate timestamps. The volta spanner event (a number string) + happens at the begin of the alt. The :| bar event at the ending. + */ + for (Cons *i = alt->music_p_list_p_->head_; i; i = i->next_) { + /* - if there are alternatives, the :| comes before last alternative - (only for semi-unfolded, but otherwise we're not here anyway?) - */ - if (alt) + some idiot might typeset a repeat not starting on a + barline. Make sure there is one. + + (todo: should try to avoid line breaks?) + */ + if (last_number == 0) { - for (Cons *i (alt->music_p_list_p_->head_); i && i->next_; i = i->next_) - { - stop_mom += i->car_->length_mom (); - if (r->fold_b_) - break; - } - } - repeated_music_arr_.push (r); - stop_mom_arr_.push (stop_mom); + becel.append (new Bar_create_event (walk_mom, "")); + } + + + Bar_create_event * c = new Bar_create_event (walk_mom, last_number+ 1, + volta_number); + + if (!i->next_) + c->last_b_ = true; + + becel.append (c); + last_number = volta_number; + volta_number ++; + + // should think about voltaSpannerDuration + walk_mom += i->car_->length_mom(); + + if (i->next_) + becel.append (new Bar_create_event (walk_mom, ":|")); + else + becel.append (new Bar_create_event (walk_mom, "stop")); } + } + create_barmoments_queue_ = becel.head_ ; + becel.head_ = 0; +} - /* - Counting nested repeats, it seems safest to forbid - two pieces of alternative music to start at the same time. - */ - for (int i = 0; i < alternative_start_mom_arr_.size (); i++) - if (alternative_start_mom_arr_[i] == alt_mom) - return false; +void +Repeat_engraver::do_process_requests () +{ + if (repeated_music_l_ && !done_this_one_b_) + { + queue_events (); + done_this_one_b_ = true; + } + + + Cons * head = create_barmoments_queue_; + if (!head) + return; - /* - Coda kludge: see input/test/coda-kludge.ly - */ - Moment span_mom; - Scalar prop = get_property ("voltaSpannerDuration", 0); - if (prop.length_i ()) - span_mom = prop.to_rat (); - - if (!alt) - return true; - - int alt_i = r->repeats_i_ + 1 - cons_list_size_i (alt->music_p_list_p_->head_ ) >? 1; - for (Cons *i = alt->music_p_list_p_->head_; i ; i = i->next_) - { - alternative_music_arr_.push (i->car_); - alternative_start_mom_arr_.push (alt_mom); - if (span_mom) - alternative_stop_mom_arr_.push (alt_mom + span_mom); + Bar_engraver* bar_engraver_l = dynamic_cast + (daddy_grav_l ()->get_simple_translator ("Bar_engraver")); + + /* + Do all the events that need to be done now. + */ + bool stop = false; + while (head && now_mom () == head->car_->when_) + { + create_barmoments_queue_ = create_barmoments_queue_->next_; + head->next_ =0; + if (bar_engraver_l) + { + String t = head->car_->type_; + if (head->car_->bar_b_) + { + if (t == "stop" || t == ":|") + { + end_volta_span_p_ = volta_span_p_; + volta_span_p_ =0; + } + + if (t != "stop") + bar_engraver_l->request_bar (t); + } else - alternative_stop_mom_arr_.push (alt_mom + i->car_->length_mom ()); - String str; - if ((alt_i != 1) && (alt_i != r->repeats_i_) && (i == alt->music_p_list_p_->head_)) - str = "1.-"; - str += to_str (alt_i) + "."; - alt_i++; - alternative_str_arr_.push (str); - if (!dynamic_cast (alt)) - alt_mom += i->car_->length_mom (); + { + assert (!volta_span_p_); + volta_span_p_ = new Volta_spanner; + announce_element (Score_element_info (volta_span_p_,0)); + volta_span_p_->number_str_ = t; + volta_span_p_->last_b_ = head->car_->last_b_; + // voltaSpannerDuration stuff here. + // other property stuff here. + } + + } + else + { + warning ("No bar engraver found. Ignoring repeats."); } - return true; + + delete head->car_; + delete head; + + head = create_barmoments_queue_; } - return false; -} + + assert (!head || head->car_->when_ > now_mom ()); +} + void Repeat_engraver::acknowledge_element (Score_element_info i) { - Moment now = now_mom (); if (Note_column *c = dynamic_cast (i.elem_l_)) { - for (int i = 0; i < volta_p_arr_.size (); i++) - if (volta_p_arr_[i] && (now >= alternative_start_mom_arr_[i])) - volta_p_arr_[i]->add_column (c); + if (volta_span_p_) + volta_span_p_->add_column (c); + if (end_volta_span_p_) + end_volta_span_p_->add_column (c); } if (Bar *c = dynamic_cast (i.elem_l_)) { - for (int i = 0; i < volta_p_arr_.size (); i++) - if (volta_p_arr_[i] && (now >= alternative_start_mom_arr_[i])) - volta_p_arr_[i]->add_column (c); + if (volta_span_p_) + volta_span_p_->add_bar (c); + if (end_volta_span_p_) + end_volta_span_p_ ->add_bar(c); } } + void Repeat_engraver::do_removal_processing () { - for (int i = 0; i < volta_p_arr_.size (); i++) - if (volta_p_arr_[i]) - typeset_element (volta_p_arr_[i]); -} - -void -Repeat_engraver::do_process_requests () -{ - Moment now = now_mom (); - Bar_engraver* bar_engraver_l = dynamic_cast - (daddy_grav_l ()->get_simple_translator ("Bar_engraver")); - for (int i = bar_b_arr_.size (); i < repeated_music_arr_.size (); i++) + if (volta_span_p_) { - if (bar_engraver_l) - bar_engraver_l->request_bar ("|:"); - bar_b_arr_.push (true); + typeset_element(volta_span_p_); } - for (int i = 0; i < bar_b_arr_.size (); i++) + if (end_volta_span_p_) { - if (!bar_b_arr_[i] && (now >= stop_mom_arr_[i])) - { - if (bar_engraver_l) - bar_engraver_l->request_bar (":|"); - } - } - for (int i = volta_p_arr_.size (); i < alternative_music_arr_.size (); i++) - { - Volta_spanner* v = new Volta_spanner; - Scalar prop = get_property ("voltaVisibility", 0); - if (!prop.to_bool ()) - v->set_elt_property (transparent_scm_sym, SCM_BOOL_T); - prop = get_property ("voltaSpannerDuration", 0); - if ((i == alternative_music_arr_.size () - 1) || prop.length_i ()) - v->last_b_ = true; - - v->number_str_ = alternative_str_arr_[i]; - volta_p_arr_.push (v); - announce_element (Score_element_info (v, alternative_music_arr_[i])); + typeset_element (end_volta_span_p_); } + // todo: the paranoid may also delete create_barmoments_queue_ +} + +void +Repeat_engraver::do_post_move_processing () +{ + for (Cons *p = create_barmoments_queue_; + p && p->car_->when_ == now_mom (); p = p->next_) + if (p->car_->type_ == "stop") + { + repeated_music_l_ = 0; + done_this_one_b_ = false; + } } void Repeat_engraver::do_pre_move_processing () { - Moment now = now_mom (); - for (int i = bar_b_arr_.size (); i--; ) + if (end_volta_span_p_) { - if (bar_b_arr_[i]) - bar_b_arr_[i] = false; - if (now >= stop_mom_arr_[i]) - { - bar_b_arr_.del (i); - stop_mom_arr_.del (i); - repeated_music_arr_.del (i); - } - } - for (int i = volta_p_arr_.size (); i--; ) - { - if (volta_p_arr_[i] && (now >= alternative_stop_mom_arr_[i]) - && (volta_p_arr_[i]->column_arr_.size () >= 1)) - { - typeset_element (volta_p_arr_[i]); - volta_p_arr_[i] = 0; - volta_p_arr_.del (i); - alternative_music_arr_[i] = 0; - alternative_music_arr_.del (i); - alternative_start_mom_arr_.del (i); - alternative_stop_mom_arr_.del (i); - alternative_str_arr_.del (i); - } + typeset_element (end_volta_span_p_ ); + end_volta_span_p_ =0; } + +} + + +Repeat_engraver::Repeat_engraver() +{ + repeated_music_l_ =0; + end_volta_span_p_ =0; + volta_span_p_ =0; + done_this_one_b_ = false; + create_barmoments_queue_ =0; +} + +/* ************** */ +Bar_create_event::Bar_create_event() +{ + last_b_ =false; + bar_b_ = true; +} + +Bar_create_event::Bar_create_event (Moment w, String s) +{ + last_b_ =false; + when_ = w; + type_ = s; + bar_b_ = true; +} + +Bar_create_event::Bar_create_event (Moment w, int i, int j) +{ + last_b_ =false; + when_ = w ; + bar_b_ = false; + + if (i!=j) + type_ = to_str (i) + ".-" ; + + type_ += to_str(j) + "."; } diff --git a/lily/repeated-music-iterator.cc b/lily/repeated-music-iterator.cc index 23fb55f790..03854fd5e0 100644 --- a/lily/repeated-music-iterator.cc +++ b/lily/repeated-music-iterator.cc @@ -45,7 +45,7 @@ Folded_repeat_iterator::next_moment () const void Folded_repeat_iterator::construct_children () { - New_repeated_music const * mus = dynamic_cast (music_l_); + Repeated_music const * mus = dynamic_cast (music_l_); main_iter_p_ = get_iterator_p (mus->repeat_body_p_); if (!main_iter_p_->ok()) { @@ -64,7 +64,7 @@ Folded_repeat_iterator::do_process_and_next (Moment m) music_l_->warning ( _("No one to print a volta bracket")); } - New_repeated_music const * mus = dynamic_cast (music_l_); + Repeated_music const * mus = dynamic_cast (music_l_); if (main_iter_p_) { @@ -92,7 +92,7 @@ Folded_repeat_iterator::do_process_and_next (Moment m) void Folded_repeat_iterator::leave_body () { - New_repeated_music const * mus = dynamic_cast (music_l_); + Repeated_music const * mus = dynamic_cast (music_l_); delete main_iter_p_; main_iter_p_ = 0; main_length_mom_ += mus->repeat_body_p_->length_mom (); @@ -101,7 +101,7 @@ Folded_repeat_iterator::leave_body () void Folded_repeat_iterator::enter_alternative () { - New_repeated_music const * mus = dynamic_cast (music_l_); + Repeated_music const * mus = dynamic_cast (music_l_); if (mus->alternatives_p_) { Simultaneous_music_iterator * s = new Simultaneous_music_iterator; diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc index 19a700504c..d00a932107 100644 --- a/lily/repeated-music.cc +++ b/lily/repeated-music.cc @@ -1,5 +1,5 @@ /* - new-repeated-music.cc -- implement New_repeated_music + new-repeated-music.cc -- implement Repeated_music source file of the GNU LilyPond music typesetter @@ -12,16 +12,18 @@ #include "musical-pitch.hh" #include "debug.hh" -New_repeated_music::New_repeated_music(Music *beg, int times, Music_sequence * alts) +Repeated_music::Repeated_music(Music *beg, int times, Music_sequence * alts) { repeat_body_p_ = beg; fold_b_ = false; repeats_i_ = times; alternatives_p_ = alts; semi_fold_b_ = true; + if (alts) + alts->music_p_list_p_->truncate (times); } -New_repeated_music::New_repeated_music (New_repeated_music const &s) +Repeated_music::Repeated_music (Repeated_music const &s) : Music (s) { repeats_i_ = s.repeats_i_; @@ -33,14 +35,14 @@ New_repeated_music::New_repeated_music (New_repeated_music const &s) ? dynamic_cast (s.alternatives_p_->clone ()):0; } -New_repeated_music::~New_repeated_music () +Repeated_music::~Repeated_music () { delete repeat_body_p_; delete alternatives_p_; } void -New_repeated_music::do_print () const +Repeated_music::do_print () const { #ifndef NPRINT DOUT << "Fold = " << fold_b_ << " reps: " << repeats_i_; @@ -54,7 +56,7 @@ New_repeated_music::do_print () const } Musical_pitch -New_repeated_music::to_relative_octave (Musical_pitch p) +Repeated_music::to_relative_octave (Musical_pitch p) { if (repeat_body_p_) p = repeat_body_p_->to_relative_octave (p); @@ -66,7 +68,7 @@ New_repeated_music::to_relative_octave (Musical_pitch p) void -New_repeated_music::transpose (Musical_pitch p) +Repeated_music::transpose (Musical_pitch p) { if (repeat_body_p_) repeat_body_p_->transpose (p); @@ -76,7 +78,7 @@ New_repeated_music::transpose (Musical_pitch p) } void -New_repeated_music::compress (Moment p) +Repeated_music::compress (Moment p) { if (repeat_body_p_) repeat_body_p_->compress (p); @@ -86,7 +88,7 @@ New_repeated_music::compress (Moment p) } Moment -New_repeated_music::alternatives_length_mom () const +Repeated_music::alternatives_length_mom () const { if (!alternatives_p_ ) return 0; @@ -108,7 +110,7 @@ New_repeated_music::alternatives_length_mom () const } Moment -New_repeated_music::length_mom () const +Repeated_music::length_mom () const { Moment m =0; if (fold_b_) diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 3d73c012c4..70d2943c74 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -237,6 +237,9 @@ Score_engraver::do_try_music (Music*r) if (!gotcha) { + /* + UGH! THIS IS NOT SYMMETRIC. CLEAN ME UP! + */ if (Break_req* b = dynamic_cast (r)) { gotcha = true; @@ -247,9 +250,13 @@ Score_engraver::do_try_music (Music*r) } } return gotcha; - } +void +Score_engraver::forbid_breaks () +{ + break_penalty_i_ = Break_req::DISALLOW; +} ADD_THIS_TRANSLATOR(Score_engraver); diff --git a/lily/score-performer.cc b/lily/score-performer.cc index c0357ec6e7..b69dcbe5b7 100644 --- a/lily/score-performer.cc +++ b/lily/score-performer.cc @@ -20,21 +20,21 @@ #include "audio-staff.hh" -ADD_THIS_TRANSLATOR(Score_performer); +ADD_THIS_TRANSLATOR (Score_performer); -Score_performer::Score_performer() +Score_performer::Score_performer () { - performance_p_ =0; + performance_p_ = 0; } -Score_performer::~Score_performer() +Score_performer::~Score_performer () { } void -Score_performer::play (Audio_element * p) +Score_performer::play_element (Audio_element * p) { if (Audio_item * i=dynamic_cast (p)) { @@ -43,12 +43,27 @@ Score_performer::play (Audio_element * p) performance_p_->add_element (p); } +void +Score_performer::announce_element (Audio_element_info info) +{ + announce_info_arr_.push (info); + info.origin_trans_l_arr_.push (this); + + /* + huh? + copied from score-engraver, but + this way staff gets in list twice + if (Audio_item* i = dynamic_cast (info.elem_l_)) + performance_p_->add_element (i); + */ +} + void Score_performer::prepare (Moment m) { Global_translator::prepare (m); audio_column_l_ = new Audio_column (m); - play (audio_column_l_); + play_element (audio_column_l_); post_move_processing (); } diff --git a/lily/specialty-engraver.cc b/lily/specialty-engraver.cc index 163dfe9a72..5f87859db6 100644 --- a/lily/specialty-engraver.cc +++ b/lily/specialty-engraver.cc @@ -1,3 +1,5 @@ +#if 0 +// not finished yet. /* specialty-engraver.cc -- implement Specialty_engraver @@ -21,7 +23,7 @@ protected: void -Specialty_engraver::acknowledge_element (Score_element_info i) +Specialty_engraver::acknowledge_element (Score_element_info ) { /* We could do groovy stuff, by inserting our own custom (FUNC,FONT) @@ -30,3 +32,4 @@ Specialty_engraver::acknowledge_element (Score_element_info i) But not yet. This would be cleaner if we had SCM as properties. */ } +#endif diff --git a/lily/staff-bar.cc b/lily/staff-bar.cc index 44be80a76a..df97770e25 100644 --- a/lily/staff-bar.cc +++ b/lily/staff-bar.cc @@ -12,5 +12,9 @@ Real Staff_bar::get_bar_size () const { - return 4 * staff_line_leading_f (); + SCM size_sym = get_elt_property (bar_size_scm_sym); + if (size_sym != SCM_BOOL_F) + return gh_scm2double (SCM_CDR(size_sym)); + else + return (lines_i () -1) * staff_line_leading_f (); } diff --git a/lily/staff-info.cc b/lily/staff-info.cc index 5d214d080f..a527bc3c18 100644 --- a/lily/staff-info.cc +++ b/lily/staff-info.cc @@ -14,7 +14,6 @@ Staff_info::Staff_info() { time_C_ = 0; - rhythmic_C_ =0; command_l_ =0; musical_l_ =0; } diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc index 6628fbeca0..927285702b 100644 --- a/lily/staff-performer.cc +++ b/lily/staff-performer.cc @@ -19,36 +19,28 @@ ADD_THIS_TRANSLATOR (Staff_performer); Staff_performer::Staff_performer () { audio_staff_p_ = 0; + instrument_p_ = 0; + instrument_name_p_ = 0; + name_p_ = 0; + tempo_p_ = 0; } Staff_performer::~Staff_performer () { - delete audio_staff_p_; } void Staff_performer::do_creation_processing () { audio_staff_p_ = new Audio_staff; + announce_element (Audio_element_info (audio_staff_p_, 0)); - play (new Audio_text (Audio_text::TRACK_NAME, id_str_)); + name_p_ = new Audio_text (Audio_text::TRACK_NAME, id_str_); + announce_element (Audio_element_info (name_p_, 0)); -#if 1 - String str = new_instrument_str (); - if (str.length_i ()) - // instrument description - play (new Audio_text (Audio_text::INSTRUMENT_NAME, str)); -#endif - - // tempo - play (new Audio_tempo (get_tempo_i ())); + tempo_p_ = new Audio_tempo (get_tempo_i ()); + announce_element (Audio_element_info (tempo_p_, 0)); -#if 1 - if (str.length_i ()) - // instrument - play (new Audio_instrument (str)); -#endif - Performer_group_performer::do_creation_processing (); } @@ -58,18 +50,45 @@ Staff_performer::do_process_requests () String str = new_instrument_str (); if (str.length_i ()) { - play (new Audio_text (Audio_text::INSTRUMENT_NAME, str)); - play (new Audio_instrument (str)); + instrument_name_p_ = new Audio_text (Audio_text::INSTRUMENT_NAME, str); + announce_element (Audio_element_info (instrument_name_p_, 0)); + instrument_p_ = new Audio_instrument (str); + announce_element (Audio_element_info (instrument_p_, 0)); } Performer_group_performer::do_process_requests (); } +void +Staff_performer::do_pre_move_processing () +{ + if (name_p_) + { + play_element (name_p_); + name_p_ = 0; + } + if (tempo_p_) + { + play_element (tempo_p_); + tempo_p_ = 0; + } + if (instrument_name_p_) + { + play_element (instrument_name_p_); + instrument_name_p_ = 0; + } + if (instrument_p_) + { + play_element (instrument_p_); + instrument_p_ = 0; + } + Performer_group_performer::do_pre_move_processing (); +} void Staff_performer::do_removal_processing () { Performer_group_performer::do_removal_processing (); - Performer::play (audio_staff_p_); + Performer::play_element (audio_staff_p_); audio_staff_p_ = 0; } @@ -95,12 +114,12 @@ Staff_performer::new_instrument_str () } void -Staff_performer::play (Audio_element* p) +Staff_performer::play_element (Audio_element* p) { if (Audio_item *ai = dynamic_cast (p)) { audio_staff_p_->add_audio_item (ai); } - Performer::play (p); + Performer::play_element (p); } diff --git a/lily/staff-switching-translator.cc b/lily/staff-switching-translator.cc index ae56d110d3..1d1809ed84 100644 --- a/lily/staff-switching-translator.cc +++ b/lily/staff-switching-translator.cc @@ -16,6 +16,8 @@ class Staff_switching_translator : public Engraver { Interpretation_context_handle my_voice_; Drul_array staff_handle_drul_; + + int switch_pitch_i_ ; protected: virtual bool do_try_music (Music* m); virtual void do_creation_processing (); @@ -28,6 +30,7 @@ public: Staff_switching_translator::Staff_switching_translator () { + switch_pitch_i_ =0; } void @@ -35,9 +38,18 @@ Staff_switching_translator::do_creation_processing () { Translator_group * daddy =daddy_grav_l (); // staff switching context + + Scalar pit = get_property ("switchPitch", 0); + if (pit.isnum_b ()) + switch_pitch_i_ = int (pit); Scalar s = get_property("staffContextName", 0); - staff_handle_drul_[UP].set_translator (daddy->daddy_trans_l_ -> find_create_translator_l (s, "upper")); - staff_handle_drul_[DOWN].set_translator (daddy->daddy_trans_l_-> find_create_translator_l (s, "lower")); + Scalar up = get_property ("upStaffName",0); + Scalar down = get_property ("downStaffName",0); + if (!up.length_i()) up = "upper"; + if (!down.length_i()) up = "lower"; + + staff_handle_drul_[UP].set_translator (daddy->daddy_trans_l_ -> find_create_translator_l (s, up)); + staff_handle_drul_[DOWN].set_translator (daddy->daddy_trans_l_-> find_create_translator_l (s, down)); staff_handle_drul_[DOWN].report_to_l ()->set_property ("defaultClef", "bass"); @@ -58,7 +70,7 @@ Staff_switching_translator::do_try_music (Music*m) { if (Note_req*nr = dynamic_cast (m)) { - Direction staff = (nr->pitch_.semitone_pitch () >= 0) + Direction staff = (nr->pitch_.semitone_pitch () >= switch_pitch_i_) ? UP : DOWN; diff --git a/lily/tie-performer.cc b/lily/tie-performer.cc new file mode 100644 index 0000000000..0d7d5a0257 --- /dev/null +++ b/lily/tie-performer.cc @@ -0,0 +1,171 @@ +/* + tie-performer.cc -- implement + + source file of the GNU LilyPond music typesetter + + (c) 1999 Jan Nieuwenhuizen + + */ + +#include "tie-performer.hh" +#include "command-request.hh" +#include "audio-item.hh" +#include "musical-request.hh" + + +ADD_THIS_TRANSLATOR (Tie_performer); + +Tie_performer::Tie_performer() +{ + req_l_ = 0; +} + +bool +Tie_performer::do_try_music (Music *m) +{ + if (Tie_req * c = dynamic_cast (m)) + { + req_l_ = c; + return true; + } + return false; +} + +void +Tie_performer::acknowledge_element (Audio_element_info i) +{ + if (Audio_note *nh = dynamic_cast (i.elem_l_)) + { + Note_req * m = dynamic_cast (i.req_l_); + if (!m) + return; + now_notes_.push (CNote_melodic_tuple (nh, m, now_mom()+ m->length_mom ())); + } +} + +void +Tie_performer::do_process_requests () +{ + if (req_l_) + { + Moment now = now_mom (); + Link_array nharr; + + stopped_notes_.clear (); + while (past_notes_pq_.size () + && past_notes_pq_.front ().end_ == now) + stopped_notes_.push (past_notes_pq_.get ()); + } +} + +void +Tie_performer::process_acknowledged () +{ + if (req_l_) + { + now_notes_.sort (CNote_melodic_tuple::pitch_compare); + stopped_notes_.sort(CNote_melodic_tuple::pitch_compare); + int i=0; + int j=0; + int tie_count=0; + while ( i < now_notes_.size () && j < stopped_notes_.size ()) + { + int comp + = Musical_pitch::compare (now_notes_[i].req_l_->pitch_ , + stopped_notes_[j].req_l_->pitch_); + + if (comp) + { + (comp < 0) ? i ++ : j++; + continue; + } + else + { + tie_count ++; + + /* don't go around recreating ties that were already + made. Not infallible. Due to reordering in sort (), + we will make the wrong ties when notenotes are + added. */ + if (tie_count > tie_p_arr_.size ()) + { + Audio_tie * p = new Audio_tie; + p->set_note (LEFT, stopped_notes_[j].note_l_); + p->set_note (RIGHT, now_notes_[i].note_l_); + tie_p_arr_.push (p); + announce_element (Audio_element_info (p, req_l_)); + } + i++; + j++; + + } + } + + if (!tie_p_arr_.size ()) + { + req_l_->warning (_("No ties were created!")); + } + + } +} + +void +Tie_performer::do_pre_move_processing () +{ + for (int i=0; i < now_notes_.size (); i++) + { + past_notes_pq_.insert (now_notes_[i]); + } + now_notes_.clear (); + + for (int i=0; i< tie_p_arr_.size (); i++) + { + //play_element (tie_p_arr_[i]); + /* + urg. + doesn't work for c ~ c ~ c + */ + tie_p_arr_[i]->note_l_drul_[LEFT]->length_mom_ += + tie_p_arr_[i]->note_l_drul_[RIGHT]->length_mom_; + tie_p_arr_[i]->note_l_drul_[RIGHT]->length_mom_ = 0; + } + tie_p_arr_.clear (); +} + +void +Tie_performer::do_post_move_processing () +{ + req_l_ =0; + Moment now = now_mom (); + while (past_notes_pq_.size () && past_notes_pq_.front ().end_ < now) + past_notes_pq_.delmin (); +} + + +CNote_melodic_tuple::CNote_melodic_tuple () +{ + note_l_ =0; + req_l_ =0; + end_ = 0; +} + +CNote_melodic_tuple::CNote_melodic_tuple (Audio_note *h, Melodic_req*m, Moment mom) +{ + note_l_ = h; + req_l_ = m; + end_ = mom; +} + +int +CNote_melodic_tuple::pitch_compare (CNote_melodic_tuple const&h1, + CNote_melodic_tuple const &h2) +{ + return Melodic_req::compare (*h1.req_l_, *h2.req_l_); +} + +int +CNote_melodic_tuple::time_compare (CNote_melodic_tuple const&h1, + CNote_melodic_tuple const &h2) +{ + return (h1.end_ - h2.end_ ).sign (); +} diff --git a/lily/time-description.cc b/lily/time-description.cc index 347dbce0a8..6fecdb99d8 100644 --- a/lily/time-description.cc +++ b/lily/time-description.cc @@ -57,7 +57,6 @@ Time_description::set_cadenza (bool b) Time_description::Time_description() { - error_b_ = false; whole_per_measure_ = 1; whole_in_measure_ =0; one_beat_ = Moment (1,4); diff --git a/lily/time-signature-performer.cc b/lily/time-signature-performer.cc index fdd75bea77..95eeacabc0 100644 --- a/lily/time-signature-performer.cc +++ b/lily/time-signature-performer.cc @@ -10,33 +10,47 @@ #include "command-request.hh" #include "audio-item.hh" +ADD_THIS_TRANSLATOR (Time_signature_performer); -ADD_THIS_TRANSLATOR(Time_signature_performer); - -Time_signature_performer::Time_signature_performer() +Time_signature_performer::Time_signature_performer () { time_signature_req_l_ = 0; + audio_p_ = 0; } -Time_signature_performer::~Time_signature_performer() +Time_signature_performer::~Time_signature_performer () { } void -Time_signature_performer::do_print() const +Time_signature_performer::do_print () const { #ifndef NPRINT if (time_signature_req_l_) - time_signature_req_l_->print(); + time_signature_req_l_->print (); #endif } void -Time_signature_performer::do_process_requests() +Time_signature_performer::do_process_requests () { if (time_signature_req_l_) - play (new Audio_time_signature (time_signature_req_l_)); - time_signature_req_l_ = 0; + { + audio_p_ = new Audio_time_signature (time_signature_req_l_->beats_i_, time_signature_req_l_->one_beat_i_); + Audio_element_info info (audio_p_, time_signature_req_l_); + announce_element (info); + time_signature_req_l_ = 0; + } +} + +void +Time_signature_performer::do_pre_move_processing () +{ + if (audio_p_) + { + play_element (audio_p_); + audio_p_ = 0; + } } bool diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index 510f24b40c..953e802f4b 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -5,18 +5,17 @@ (c) 1997--1999 Han-Wen Nienhuys */ + #include "score-engraver.hh" #include "timing-engraver.hh" #include "command-request.hh" #include "score-element-info.hh" #include "multi-measure-rest.hh" - void Timing_engraver::fill_staff_info (Staff_info &inf) { inf.time_C_ = &time_; - inf.rhythmic_C_ = &default_grouping_; } diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index 10bc8f196b..08cddf2790 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -12,11 +12,6 @@ #include "global-translator.hh" #include "multi-measure-rest.hh" -Timing_translator::Timing_translator () -{ - default_grouping_ = Rhythmic_grouping (MInterval (0, 1), 4); // ugh -} - bool Timing_translator::do_try_music (Music*r) { @@ -68,10 +63,6 @@ Timing_translator::do_process_requests() else { time_.set_time_signature (b_i, o_i); - - default_grouping_ = - Rhythmic_grouping (MInterval (0,Moment (b_i, o_i)), - b_i == 1 ? 2 : b_i); } } else if (Partial_measure_req *pm = dynamic_cast (tr_l)) @@ -93,20 +84,12 @@ Timing_translator::do_process_requests() time_.whole_in_measure_.str ())); time_.whole_in_measure_ = 0; // resync - time_.error_b_ = true; } } else if (Cadenza_req *cr = dynamic_cast (tr_l)) { time_.set_cadenza (cr->on_b_); } - else if (Measure_grouping_req *mg=dynamic_cast (tr_l)) - { - default_grouping_ = - parse_grouping (mg->beat_i_arr_, - mg->elt_length_arr_); - - } } Translator_group * tr=0; @@ -165,6 +148,5 @@ Timing_translator::do_print () const { #ifndef NPRINT time_.print (); - default_grouping_.print (); #endif } diff --git a/lily/unfolded-repeat-iterator.cc b/lily/unfolded-repeat-iterator.cc index 4b6d40d16e..3a9118cab3 100644 --- a/lily/unfolded-repeat-iterator.cc +++ b/lily/unfolded-repeat-iterator.cc @@ -40,7 +40,7 @@ the alternative just set. void Unfolded_repeat_iterator::next_element () { - New_repeated_music const* mus =dynamic_cast (music_l_); + Repeated_music const* mus =dynamic_cast (music_l_); delete current_iter_p_; current_iter_p_ =0; @@ -113,7 +113,7 @@ Unfolded_repeat_iterator::next_moment () const void Unfolded_repeat_iterator::construct_children () { - New_repeated_music const* mus =dynamic_cast (music_l_); + Repeated_music const* mus =dynamic_cast (music_l_); alternative_cons_l_ = (mus->alternatives_p_) ? mus->alternatives_p_->music_p_list_p_->head_ : 0; diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index 32c48b9687..2cf391856c 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -30,7 +30,7 @@ Volta_spanner::do_brew_molecule_p () const { Molecule* mol_p = new Molecule; - if (!column_arr_.size ()) + if (!bar_arr_.size ()) return mol_p; Real interline_f = paper_l ()->get_realvar (interline_scm_sym); @@ -43,8 +43,8 @@ Volta_spanner::do_brew_molecule_p () const Real h = volta.dim_.y ().length (); Molecule num (lookup_l ()->text ("volta", number_str_, paper_l ())); - Real dy = column_arr_.top ()->extent (Y_AXIS) [UP] > - column_arr_[0]->extent (Y_AXIS) [UP]; + Real dy = bar_arr_.top ()->extent (Y_AXIS) [UP] > + bar_arr_[0]->extent (Y_AXIS) [UP]; dy += 2 * h; for (int i = 0; i < note_column_arr_.size (); i++) @@ -65,10 +65,10 @@ Volta_spanner::do_brew_molecule_p () const void Volta_spanner::do_add_processing () { - if (column_arr_.size ()) + if (bar_arr_.size ()) { - set_bounds (LEFT, column_arr_[0]); - set_bounds (RIGHT, column_arr_.top ()); + set_bounds (LEFT, bar_arr_[0]); + set_bounds (RIGHT, bar_arr_.top ()); } } @@ -85,8 +85,8 @@ Volta_spanner::do_height () const void Volta_spanner::do_post_processing () { - if (column_arr_.size()) - translate_axis (column_arr_[0]->extent (Y_AXIS)[UP], Y_AXIS); + if (bar_arr_.size()) + translate_axis (bar_arr_[0]->extent (Y_AXIS)[UP], Y_AXIS); } void @@ -95,13 +95,13 @@ Volta_spanner::do_substitute_element_pointer (Score_element* o, Score_element* n if (Note_column* c = dynamic_cast (o)) note_column_arr_.substitute (c, dynamic_cast (n)); else if (Bar* c = dynamic_cast (o)) - column_arr_.substitute (c, dynamic_cast (n)); + bar_arr_.substitute (c, dynamic_cast (n)); } void -Volta_spanner::add_column (Bar* c) +Volta_spanner::add_bar (Bar* c) { - column_arr_.push (c); + bar_arr_.push (c); add_dependency (c); } diff --git a/ly/book-fragment.ly b/ly/book-fragment.ly index 514693c498..a57db26e50 100644 --- a/ly/book-fragment.ly +++ b/ly/book-fragment.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.21"; +\version "1.1.52"; \include "declarations.ly" diff --git a/ly/book-init.ly b/ly/book-init.ly index 3bba4f0837..1820f71541 100644 --- a/ly/book-init.ly +++ b/ly/book-init.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.21"; +\version "1.1.52"; \include "declarations.ly"; diff --git a/ly/center-fragment.ly b/ly/center-fragment.ly index a5bfb07806..4cc0ac1dc7 100644 --- a/ly/center-fragment.ly +++ b/ly/center-fragment.ly @@ -1,7 +1,7 @@ % Toplevel initialisation file. -\version "1.0.21"; +\version "1.1.52"; \include "declarations.ly" diff --git a/ly/center.ly b/ly/center.ly index b32c0338a4..1fec210840 100644 --- a/ly/center.ly +++ b/ly/center.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.21"; +\version "1.1.52"; \include "declarations.ly" diff --git a/ly/engraver.ly b/ly/engraver.ly index dce0e249eb..10adf06a55 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -63,6 +63,7 @@ StaffContext=\translator { RhythmicStaffContext=\translator{ \type "Engraver_group_engraver"; numberOfStaffLines = "1"; + barSize = \staffheight; \consists "Pitch_squash_engraver"; \consists "Separating_line_group_engraver"; \name RhythmicStaff; diff --git a/ly/fragment.ly b/ly/fragment.ly index 57e9bba99e..5c3ea3e33e 100644 --- a/ly/fragment.ly +++ b/ly/fragment.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.0.21"; +\version "1.1.52"; \include "declarations.ly" diff --git a/ly/paper16.ly b/ly/paper16.ly index cb2f9f3cf1..252795dd95 100644 --- a/ly/paper16.ly +++ b/ly/paper16.ly @@ -2,7 +2,7 @@ -\version "1.0.21"; +\version "1.1.52"; paper_sixteen = \paper { staffheight = 16.0\pt; diff --git a/ly/paper20.ly b/ly/paper20.ly index 86df45795e..25e85d7dc6 100644 --- a/ly/paper20.ly +++ b/ly/paper20.ly @@ -1,7 +1,7 @@ % paper20.ly -\version "1.0.21"; +\version "1.1.52"; paper_twenty = \paper { staffheight = 20.0\pt; diff --git a/ly/params.ly b/ly/params.ly index c3bbd2edad..a41d3c2c1a 100644 --- a/ly/params.ly +++ b/ly/params.ly @@ -116,7 +116,6 @@ slur_rc_factor = 2.4; notewidth = (\quartwidth + \wholewidth) / 2.0; % ugh -barsize = \staffheight; rulethickness = \staffline; gourlay_energybound = 100000.; diff --git a/ly/performer.ly b/ly/performer.ly index a4e4fca950..f9eafe68e2 100644 --- a/ly/performer.ly +++ b/ly/performer.ly @@ -3,42 +3,56 @@ % \translator { \type "Staff_performer"; + \name Staff; \accepts Voice; + \accepts VoiceOne; % ugh. \accepts VoiceTwo; \accepts VoiceThree; \accepts VoiceFour; - \name Staff; \consists "Key_performer"; \consists "Time_signature_performer"; } +%% urg, why (needs praeludium-*.ly) these? \translator { \type "Performer_group_performer"; \consists "Note_performer"; - \name VoiceFour; + \name VoiceFour; } \translator { \type "Performer_group_performer"; \consists "Note_performer"; -\name VoiceThree; + \name VoiceThree; } \translator { \type "Performer_group_performer"; \consists "Note_performer"; - \name VoiceOne; + \name VoiceOne; } + \translator { \type "Performer_group_performer"; + \name Voice; \consists "Note_performer"; -\name Voice; + \consists "Tie_performer"; +% \accepts Grace; } + +\translator { + \type "Grace_performer_group"; + \name "Grace"; + \consists "Note_performer"; + \consists "Tie_performer"; + weAreGraceContext = "1"; +} + \translator { \type "Performer_group_performer"; diff --git a/ly/property.ly b/ly/property.ly index 979e2e66f0..4ecbd24678 100644 --- a/ly/property.ly +++ b/ly/property.ly @@ -8,7 +8,7 @@ SEE THE REFERENCE MANUAL FOR EXPLANATIONS. %} -\version "1.0.20"; +\version "1.1.52"; %hmm, (these) abbrevs suck, imo % i guess they're meant as some form of doco diff --git a/ly/script.ly b/ly/script.ly index eea258c9d1..cbd3225c8e 100644 --- a/ly/script.ly +++ b/ly/script.ly @@ -43,3 +43,5 @@ prallprall = \script "prallprall" prallmordent = \script "prallmordent" upprall = \script "upprall" downprall = \script "downprall" +segno = \script "segno" +wheel = \script "wheel" \ No newline at end of file diff --git a/mf/feta-banier.mf b/mf/feta-banier.mf index 91ccd66bf5..64a289c86e 100644 --- a/mf/feta-banier.mf +++ b/mf/feta-banier.mf @@ -252,7 +252,7 @@ fet_beginchar("grace 8th Flag (up)", "u3grace", "graceeighthflag") (hip_width, foot_depth), hip_depth_ratio, foot_width_ratio, hip_thickness, foot_thickness); - pickup pencircle scaled stemthickness; + pickup pencircle scaled 1.5 stemthickness; draw (0, 0) .. (0,-2 interline); draw (-b ,-foot_depth * hip_depth_ratio) .. (w, -flare); @@ -440,7 +440,7 @@ fet_beginchar("grace 8th (down)", "d3grace", "dgraceeighthflag") hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness); - pickup pencircle scaled stemthickness; + pickup pencircle scaled 1.5 stemthickness; draw (0, 0) .. (0,-2 interline); draw (-b, -foot_depth * hip_depth_ratio) .. (w,-flare); y_mirror_char; diff --git a/mi2mu/main.cc b/mi2mu/main.cc index 79e559bafc..26e0c66b8e 100644 --- a/mi2mu/main.cc +++ b/mi2mu/main.cc @@ -138,6 +138,7 @@ main (int argc_i, char* argv_sz_a[]) textdomain (name.ch_C ()) ; #endif + bool key_override_b = false; Mudela_key key (0, 0); Long_option_init long_option_init_a[] = @@ -183,7 +184,8 @@ main (int argc_i, char* argv_sz_a[]) int i = str.index_i (':'); i = (i >=0 ? i : str.length_i ()); key.accidentals_i_ = String_convert::dec2_i (str.left_str (i)); - key.minor_i_ = (int)(bool)String_convert::dec2_i (str.cut_str (i + 1,1)); + key.minor_i_ = (int)(bool)String_convert::dec2_i (str.cut_str (i + 1, str.length_i ())); + key_override_b = true; break; } case 'n': @@ -250,7 +252,8 @@ main (int argc_i, char* argv_sz_a[]) return 1; // if given on command line: override - score_p->mudela_key_l_ = &key; + if (key_override_b || !score_p->mudela_key_l_) + score_p->mudela_key_l_ = &key; mudela_score_l_g = score_p; score_p->process(); diff --git a/mi2mu/midi-track-parser.cc b/mi2mu/midi-track-parser.cc index 661d6a8bcb..49840ec77c 100644 --- a/mi2mu/midi-track-parser.cc +++ b/mi2mu/midi-track-parser.cc @@ -304,12 +304,14 @@ Midi_track_parser::parse_event (Mudela_column* col_l) else if ((byte == 0x59) && (next == 0x02)) { next_byte (); - int accidentals_i = (int)next_byte (); - int minor_i = (int)next_byte (); + int accidentals_i = (int)(signed char)next_byte (); + int minor_i = (int)(bool)next_byte (); Mudela_key* p = new Mudela_key (accidentals_i, minor_i); item_p = p; +#if 0 info_l_->score_l_->mudela_key_l_ = p; mudela_staff_p_->mudela_key_l_ = p; +#endif } // SSME [\0x7f][\x03] else if ((byte == 0x7f) && (next == 0x03)) diff --git a/mi2mu/mudela-item.cc b/mi2mu/mudela-item.cc index 12b1b1f3ec..58a1db586b 100644 --- a/mi2mu/mudela-item.cc +++ b/mi2mu/mudela-item.cc @@ -46,21 +46,31 @@ Mudela_key::Mudela_key (int accidentals_i, int minor_i) minor_i_ = minor_i; } +char const *accname[] = {"eses", "es", "", "is" , "isis"}; + String Mudela_key::str () { - int key_i = 0; - if (accidentals_i_ >= 0) - key_i = ((accidentals_i_ % 7)[ "cgdaebf" ] - 'a' - 2) % 7; - else - key_i = ((-accidentals_i_ % 7)[ "cfbeadg" ] - 'a' - 2) % 7; + int key_i = accidentals_i_ >= 0 + ? ((accidentals_i_ % 7) ["cgdaebf"] - 'a' - 2 -2 * minor_i_ + 7) % 7 + : ((-accidentals_i_ % 7) ["cfbeadg"] - 'a' - 2 -2 * minor_i_ + 7) % 7; - String keyname = (1) // !minor_i_) - ? to_str ((char) ((key_i + 2) % 7 + 'A')) - : to_str ((char) ((key_i + 2 - 2) % 7 + 'a')); - // heu, -2: should be - 1 1/2: A -> fis - - return String("\\key " + keyname + ";\n"); + String notename_str = !minor_i_ + ? to_str ((char) ((key_i + 2) % 7 + 'A')) + : to_str ((char) ((key_i + 2) % 7 + 'a')); + + // fis cis gis dis ais eis bis + static int sharps_i_a [7] = { 2, 4, 6, 1, 3, 5, 7 }; + // bes es as des ges ces fes + static int flats_i_a [7] = { 6, 4, 2, 7, 5, 3, 1 }; + int accidentals_i = accidentals_i_ >= 0 + ? sharps_i_a [key_i] <= accidentals_i_ ? 1 : 0 + : flats_i_a [key_i] <= -accidentals_i_ ? -1 : 0; + + if (accidentals_i) + notename_str += String (accname [accidentals_i + 2]); + + return "\\key " + notename_str + (minor_i_ ? "\\minor" : "") + ";\n"; } String @@ -71,27 +81,20 @@ Mudela_key::notename_str (int pitch_i) // major scale: do-do // minor scale: la-la (= + 5) - static int notename_i_a[ 12 ] = { 0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6 }; - int notename_i = notename_i_a[ (minor_i_ * 5 + pitch_i) % 12 ]; + static int notename_i_a [12] = { 0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6 }; + int notename_i = notename_i_a [pitch_i % 12]; - static int accidentals_i_a[ 12 ] = { 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0 }; - int accidental_i = accidentals_i_a[ (minor_i_ * 5 + pitch_i) % 12 ]; + static int accidentals_i_a [12] = { 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0 }; + int accidental_i = accidentals_i_a [(minor_i_ * 5 + pitch_i) % 12]; if (accidental_i && (accidentals_i_ < 0)) { - accidental_i = - accidental_i; + accidental_i *= -1; notename_i = (notename_i + 1) % 7; } String notename_str = to_str ((char)(((notename_i + 2) % 7) + 'a')); - while (accidental_i-- > 0) - notename_str += "is"; - accidental_i++; - while (accidental_i++ < 0) - if ((notename_str == "a") || (notename_str == "e")) - notename_str += "s"; - else - notename_str += "es"; - accidental_i--; + if (accidental_i) + notename_str += String (accname [accidental_i + 2]); /* By tradition, all scales now consist of a sequence of 7 notes each @@ -113,18 +116,36 @@ Mudela_key::notename_str (int pitch_i) John Sankey + Let's also do a-minor: a b c d e f gis a + + --jcn + */ - /* ok, bit ugly, but here we go */ + /* ok, bit ugly, but here we go -- jcn */ - if (minor_i_ && (accidentals_i_ == -1)) - if (notename_str == "des") - notename_str = "cis"; - - if (minor_i_ && (accidentals_i_ == -2)) - if (notename_str == "ges") + + if (minor_i_) + { + if ((accidentals_i_ == 0) && (notename_str == "as")) + notename_str = "gis"; + else if ((accidentals_i_ == -1) && (notename_str == "des")) + notename_str = "cis"; + else if ((accidentals_i_ == -2) && (notename_str == "ges")) notename_str = "fis"; - + else if ((accidentals_i_ == 5) && (notename_str == "g")) + notename_str = "fisis"; + else if ((accidentals_i_ == 6) && (notename_str == "d")) + notename_str = "cisis"; + else if ((accidentals_i_ == 7) && (notename_str == "a")) + notename_str = "gisis"; + + if ((accidentals_i_ <= -6) && (notename_str == "b")) + notename_str = "ces"; + if ((accidentals_i_ <= -7) && (notename_str == "e")) + notename_str = "fes"; + } + String de_octavate_str = to_str (',', (Mudela_note::c0_pitch_i_c_ + 11 - pitch_i) / 12); String octavate_str = to_str ('\'', (pitch_i - Mudela_note::c0_pitch_i_c_) / 12); return notename_str +de_octavate_str + octavate_str; diff --git a/mi2mu/mudela-voice.cc b/mi2mu/mudela-voice.cc index 1052b3149d..286d2176c9 100644 --- a/mi2mu/mudela-voice.cc +++ b/mi2mu/mudela-voice.cc @@ -10,6 +10,9 @@ #include "mudela-staff.hh" #include "mudela-stream.hh" #include "mudela-voice.hh" +#include "mudela-score.hh" + +extern Mudela_score* mudela_score_l_g; Mudela_voice::Mudela_voice (Mudela_staff* mudela_staff_l) { @@ -56,6 +59,8 @@ Mudela_voice::output (Mudela_stream& mudela_stream_r) } mudela_stream_r << *i->car_; + if (Mudela_key* k = dynamic_cast (i->car_)) + mudela_staff_l_->mudela_key_l_ = mudela_score_l_g->mudela_key_l_ = k; } if (mudela_item_l_list_.size_i () > FAIRLY_LONG_VOICE_i) diff --git a/mutopia/Coriolan/bassi-part.ly b/mutopia/Coriolan/bassi-part.ly index 0bca494223..9663a9b281 100644 --- a/mutopia/Coriolan/bassi-part.ly +++ b/mutopia/Coriolan/bassi-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "violoncello.ly" diff --git a/mutopia/Coriolan/clarinetti-part.ly b/mutopia/Coriolan/clarinetti-part.ly index 923b3b57c6..b88420f9ba 100644 --- a/mutopia/Coriolan/clarinetti-part.ly +++ b/mutopia/Coriolan/clarinetti-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "clarinetti.ly" diff --git a/mutopia/Coriolan/clarinetti.ly b/mutopia/Coriolan/clarinetti.ly index aa441a3ba3..12f9d51f14 100644 --- a/mutopia/Coriolan/clarinetti.ly +++ b/mutopia/Coriolan/clarinetti.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "clarinetto-1.ly" \include "clarinetto-2.ly" diff --git a/mutopia/Coriolan/clarinetto-1.ly b/mutopia/Coriolan/clarinetto-1.ly index dca9983180..fe65e1f79d 100644 --- a/mutopia/Coriolan/clarinetto-1.ly +++ b/mutopia/Coriolan/clarinetto-1.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; clarinetto1 = \notes \relative c { R1 *2 | d''4-.\ff r r2 | R1 *3 | e4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/clarinetto-2.ly b/mutopia/Coriolan/clarinetto-2.ly index 281418a8fd..140bfab551 100644 --- a/mutopia/Coriolan/clarinetto-2.ly +++ b/mutopia/Coriolan/clarinetto-2.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; clarinetto2 = \notes \relative c { R1*2 bes''4-.\ff r r2 | R1*3 | cis4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/contrabasso-part.ly b/mutopia/Coriolan/contrabasso-part.ly index 8f364a98cc..82287a8420 100644 --- a/mutopia/Coriolan/contrabasso-part.ly +++ b/mutopia/Coriolan/contrabasso-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "contrabasso.ly" diff --git a/mutopia/Coriolan/contrabasso.ly b/mutopia/Coriolan/contrabasso.ly index 24ee6a2a3c..09a95d239c 100644 --- a/mutopia/Coriolan/contrabasso.ly +++ b/mutopia/Coriolan/contrabasso.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; contrabasso = \notes \relative c { % \translator Staff=violoncello diff --git a/mutopia/Coriolan/coriolan.ly b/mutopia/Coriolan/coriolan.ly index 70a369b32b..f1f569d53f 100644 --- a/mutopia/Coriolan/coriolan.ly +++ b/mutopia/Coriolan/coriolan.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" diff --git a/mutopia/Coriolan/corni-part.ly b/mutopia/Coriolan/corni-part.ly index 18356afdb4..4bb3ef670e 100644 --- a/mutopia/Coriolan/corni-part.ly +++ b/mutopia/Coriolan/corni-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "corni.ly" diff --git a/mutopia/Coriolan/corni.ly b/mutopia/Coriolan/corni.ly index 3baa0bff1a..488ce53deb 100644 --- a/mutopia/Coriolan/corni.ly +++ b/mutopia/Coriolan/corni.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "corno-1.ly" \include "corno-2.ly" diff --git a/mutopia/Coriolan/corno-1.ly b/mutopia/Coriolan/corno-1.ly index c3ea92df03..f590f63031 100644 --- a/mutopia/Coriolan/corno-1.ly +++ b/mutopia/Coriolan/corno-1.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; corno1 = \notes \relative c { R1 *2 | f''4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/corno-2.ly b/mutopia/Coriolan/corno-2.ly index 2461ec83d4..771c75ac57 100644 --- a/mutopia/Coriolan/corno-2.ly +++ b/mutopia/Coriolan/corno-2.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; corno2 = \notes \relative c { R1 *2 | d''4-.\ff r r2 | R1 *3 | d4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/fagotti-part.ly b/mutopia/Coriolan/fagotti-part.ly index 94fd4fd552..807d2c86f0 100644 --- a/mutopia/Coriolan/fagotti-part.ly +++ b/mutopia/Coriolan/fagotti-part.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "fagotti.ly" diff --git a/mutopia/Coriolan/fagotti.ly b/mutopia/Coriolan/fagotti.ly index 555c01ef9b..6b041a4c7b 100644 --- a/mutopia/Coriolan/fagotti.ly +++ b/mutopia/Coriolan/fagotti.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "fagotto-1.ly" \include "fagotto-2.ly" diff --git a/mutopia/Coriolan/fagotto-1.ly b/mutopia/Coriolan/fagotto-1.ly index fcdb906da0..3599a3b20e 100644 --- a/mutopia/Coriolan/fagotto-1.ly +++ b/mutopia/Coriolan/fagotto-1.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; fagotto1 = \notes \relative c { R1 *2 | as'4-.\ff r r2 | R1 *3 | as4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/fagotto-2.ly b/mutopia/Coriolan/fagotto-2.ly index 980337e003..1ee6a0f2c8 100644 --- a/mutopia/Coriolan/fagotto-2.ly +++ b/mutopia/Coriolan/fagotto-2.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; fagotto2 = \notes \relative c { R1 *2 | f4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/flauti-part.ly b/mutopia/Coriolan/flauti-part.ly index e10242a35b..ab246c4999 100644 --- a/mutopia/Coriolan/flauti-part.ly +++ b/mutopia/Coriolan/flauti-part.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "flauti.ly" diff --git a/mutopia/Coriolan/flauti.ly b/mutopia/Coriolan/flauti.ly index 335cfd3091..bb617f040b 100644 --- a/mutopia/Coriolan/flauti.ly +++ b/mutopia/Coriolan/flauti.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "flauto-1.ly" \include "flauto-2.ly" diff --git a/mutopia/Coriolan/flauto-1.ly b/mutopia/Coriolan/flauto-1.ly index 4ae7119a3b..cc58b2e8dc 100644 --- a/mutopia/Coriolan/flauto-1.ly +++ b/mutopia/Coriolan/flauto-1.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; flauto1 = \notes \relative c { R1 *2 | c'''4-.\ff r r2 | R1 *3 | d4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/flauto-2.ly b/mutopia/Coriolan/flauto-2.ly index 067a3620df..5a0299cfdd 100644 --- a/mutopia/Coriolan/flauto-2.ly +++ b/mutopia/Coriolan/flauto-2.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; flauto2 = \notes \relative c { R1 *2 | as'''4-.\ff r r2 | R1 *3 | b4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/global.ly b/mutopia/Coriolan/global.ly index 8eefc99001..1aa8083f41 100644 --- a/mutopia/Coriolan/global.ly +++ b/mutopia/Coriolan/global.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; global = \notes { \time 4/4; diff --git a/mutopia/Coriolan/oboe-1.ly b/mutopia/Coriolan/oboe-1.ly index 4631ba29e4..1a76753e3b 100644 --- a/mutopia/Coriolan/oboe-1.ly +++ b/mutopia/Coriolan/oboe-1.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; oboe1 = \notes \relative c'' { R1 *2 | as'4-.\ff r r2 | R1 *3 | as4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/oboe-2.ly b/mutopia/Coriolan/oboe-2.ly index 8a138bde03..3f63f8e683 100644 --- a/mutopia/Coriolan/oboe-2.ly +++ b/mutopia/Coriolan/oboe-2.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; oboe2 = \notes \relative c{ R1 *2| f''4-.\ff r r2 | R1 *3 | f4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/oboi-part.ly b/mutopia/Coriolan/oboi-part.ly index cbdc44edb3..4dc9b03581 100644 --- a/mutopia/Coriolan/oboi-part.ly +++ b/mutopia/Coriolan/oboi-part.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "oboi.ly" diff --git a/mutopia/Coriolan/oboi.ly b/mutopia/Coriolan/oboi.ly index d9d8db98d5..226c4b9627 100644 --- a/mutopia/Coriolan/oboi.ly +++ b/mutopia/Coriolan/oboi.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "oboe-1.ly" \include "oboe-2.ly" diff --git a/mutopia/Coriolan/timpani.ly b/mutopia/Coriolan/timpani.ly index 64182a018a..089fb1ca25 100644 --- a/mutopia/Coriolan/timpani.ly +++ b/mutopia/Coriolan/timpani.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; timpani = \notes \relative c { R1 *2 | c4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/trombe-part.ly b/mutopia/Coriolan/trombe-part.ly index 7e829fc02e..eb7d80eb41 100644 --- a/mutopia/Coriolan/trombe-part.ly +++ b/mutopia/Coriolan/trombe-part.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "trombe.ly" diff --git a/mutopia/Coriolan/trombe.ly b/mutopia/Coriolan/trombe.ly index 28ea0951ff..19b0052a97 100644 --- a/mutopia/Coriolan/trombe.ly +++ b/mutopia/Coriolan/trombe.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "trombo-1.ly" \include "trombo-2.ly" diff --git a/mutopia/Coriolan/trombo-1.ly b/mutopia/Coriolan/trombo-1.ly index 1d7a55ee4d..9fb05d6e4f 100644 --- a/mutopia/Coriolan/trombo-1.ly +++ b/mutopia/Coriolan/trombo-1.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; trombo1 = \notes \relative c { R1 *2 | c''4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/trombo-2.ly b/mutopia/Coriolan/trombo-2.ly index 92fd2bfa75..75d7bf3ef4 100644 --- a/mutopia/Coriolan/trombo-2.ly +++ b/mutopia/Coriolan/trombo-2.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; trombo2 = \notes \relative c { R1 *2 | c'4-.\ff r r2 | R1 *3 | c4-. r r2 | R1 *3 | diff --git a/mutopia/Coriolan/viola-1.ly b/mutopia/Coriolan/viola-1.ly index 7aac9fc86b..44b2312950 100644 --- a/mutopia/Coriolan/viola-1.ly +++ b/mutopia/Coriolan/viola-1.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; viola1 = \notes \relative c { \context Voice=one diff --git a/mutopia/Coriolan/viola-2.ly b/mutopia/Coriolan/viola-2.ly index 1f1c90e041..4b960a8acd 100644 --- a/mutopia/Coriolan/viola-2.ly +++ b/mutopia/Coriolan/viola-2.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; viola2 = \notes \relative c { % starts on (actualy, most part is on) same staff as viola1 diff --git a/mutopia/Coriolan/viola-part.ly b/mutopia/Coriolan/viola-part.ly index f6ac9f640a..451392a491 100644 --- a/mutopia/Coriolan/viola-part.ly +++ b/mutopia/Coriolan/viola-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "viola-1.ly" diff --git a/mutopia/Coriolan/violino-1-part.ly b/mutopia/Coriolan/violino-1-part.ly index e5641f9fd1..29287a6c9a 100644 --- a/mutopia/Coriolan/violino-1-part.ly +++ b/mutopia/Coriolan/violino-1-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "violino-1.ly" diff --git a/mutopia/Coriolan/violino-1.ly b/mutopia/Coriolan/violino-1.ly index b77cd240aa..8579677fe8 100644 --- a/mutopia/Coriolan/violino-1.ly +++ b/mutopia/Coriolan/violino-1.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; violino1 = \notes \relative c { c'1\ff ~ | c | r r2 | R1 | diff --git a/mutopia/Coriolan/violino-2-part.ly b/mutopia/Coriolan/violino-2-part.ly index 89cc9cb00d..7cb9b83583 100644 --- a/mutopia/Coriolan/violino-2-part.ly +++ b/mutopia/Coriolan/violino-2-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "violino-2.ly" diff --git a/mutopia/Coriolan/violino-2.ly b/mutopia/Coriolan/violino-2.ly index d9e906c74e..a0583cd203 100644 --- a/mutopia/Coriolan/violino-2.ly +++ b/mutopia/Coriolan/violino-2.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; violino2 = \notes \relative c { c'1\ff ~ | c | r r2 | R1 | diff --git a/mutopia/Coriolan/violoncello-part.ly b/mutopia/Coriolan/violoncello-part.ly index 34f48f6a20..0fa1446a1a 100644 --- a/mutopia/Coriolan/violoncello-part.ly +++ b/mutopia/Coriolan/violoncello-part.ly @@ -7,7 +7,7 @@ enteredby = "JCN"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "violoncello.ly" diff --git a/mutopia/Coriolan/violoncello.ly b/mutopia/Coriolan/violoncello.ly index 28ffd4c402..2ea3f661e9 100644 --- a/mutopia/Coriolan/violoncello.ly +++ b/mutopia/Coriolan/violoncello.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; violoncello = \notes \relative c { c1\ff ~ | c | f,4-. r r2 | r1 | c'1\ff ~ | c | f,4-. r r2 | diff --git a/mutopia/D.Scarlatti/progress.ly b/mutopia/D.Scarlatti/progress.ly index 95aecf997d..b3e4d878f7 100644 --- a/mutopia/D.Scarlatti/progress.ly +++ b/mutopia/D.Scarlatti/progress.ly @@ -807,4 +807,4 @@ Bar_number_engraver;}} ---------------------------------------------------- -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/D.Scarlatti/sonata-k1-l366.ly b/mutopia/D.Scarlatti/sonata-k1-l366.ly index 18b3e31933..226e353c76 100644 --- a/mutopia/D.Scarlatti/sonata-k1-l366.ly +++ b/mutopia/D.Scarlatti/sonata-k1-l366.ly @@ -266,4 +266,4 @@ s1 \paper{barsize=50.0; \translator {\StaffContext \consists Bar_number_engraver;}} } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/D.Scarlatti/sonata-k2-l388.ly b/mutopia/D.Scarlatti/sonata-k2-l388.ly index 27fa3e2c83..6e3d0dec97 100644 --- a/mutopia/D.Scarlatti/sonata-k2-l388.ly +++ b/mutopia/D.Scarlatti/sonata-k2-l388.ly @@ -336,4 +336,4 @@ g,4. | Bar_number_engraver;}} } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/D.Scarlatti/sonata-k3-l378.ly b/mutopia/D.Scarlatti/sonata-k3-l378.ly index fcd51d8fae..93da8cb3ff 100644 --- a/mutopia/D.Scarlatti/sonata-k3-l378.ly +++ b/mutopia/D.Scarlatti/sonata-k3-l378.ly @@ -251,4 +251,4 @@ LHtoL = { \tolower \stemdown } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/D.Scarlatti/sonata-k4-l390.ly b/mutopia/D.Scarlatti/sonata-k4-l390.ly index e4fe831087..d40371b61b 100644 --- a/mutopia/D.Scarlatti/sonata-k4-l390.ly +++ b/mutopia/D.Scarlatti/sonata-k4-l390.ly @@ -311,4 +311,4 @@ s8 [c''16 g'8 fis'16] [bes'' g' f' ees'] | \paper{barsize=50.0; \translator {\StaffContext \consists Bar_number_engraver;}} } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/D.Zipoli/verso_2.ly b/mutopia/D.Zipoli/verso_2.ly index 90984120b2..3a88cee648 100644 --- a/mutopia/D.Zipoli/verso_2.ly +++ b/mutopia/D.Zipoli/verso_2.ly @@ -17,7 +17,7 @@ title = "Verso II"; under the Gnu Public Licence. %} -\version "1.0.21"; +\version "1.1.52"; $voice_one = \notes \relative c' { a'2 bes4. [c16 bes] | a4 d ~ d c ~ | c b ~ [b8 a] a4 ~| diff --git a/mutopia/E.Satie/gnossienne-4.ly b/mutopia/E.Satie/gnossienne-4.ly index 26fbb528fb..ca23359ef7 100644 --- a/mutopia/E.Satie/gnossienne-4.ly +++ b/mutopia/E.Satie/gnossienne-4.ly @@ -12,7 +12,7 @@ Tested Features: cross staff auto beams and slurs, grace notes, no bars %} -\version "1.0.20"; +\version "1.1.52"; \include "nederlands.ly" @@ -23,18 +23,18 @@ global = \notes { \bar ".|"; } -upper = \context Staff=treble \notes\relative c''{ +melody = \notes\relative c''{ \clef violin; \property Voice.verticalDirection = 1 r2 r r r2 r r r4 a'8--(\< a-- a-- a-- c-- \!b-- a--\> gis f \!e - es8 \grace b({ ))c r4 r2 r + es8 \grace b( ))c r4 r2 r r2 r r r4 a'8--(\< a-- a-- a-- c-- \!b-- a--\> gis f \!e - es8 } \grace b({ ))c r4 r2 r + es8 \grace b( ))c r4 r2 r r4 g16( a bes a g a bes a g a bes a g a bes a g fis es fis - )d4 } \grace fis8()gis4 ~ gis8 r r4 r2 + )d4 \grace fis8()gis4 ~ gis8 r r4 r2 r4 g16( a bes a g a bes a g a bes a g a bes a g fis es fis )d4 \grace fis8()gis4 ~ gis8 r r4 r2 \grace a8()f4 ~ f8 r r2 r @@ -60,14 +60,11 @@ upper = \context Staff=treble \notes\relative c''{ } basloopje = \notes\relative c{ -% d,8( a' d f a d f d a f d )a - d,8( a' d f a \translator Staff=treble d f d \translator Staff=bass a f d )a +% d,8( a' d f a \translator Staff=treble d f d \translator Staff=bass a f d )a + d,8( a' d f a d f d a f d )a } -lower = \context Voice=two \notes \relative c{ - \stemdown - \property Staff.slurVerticalDirection = 1 - +accompany = \notes \relative c{ % snapnie, hoevaak relative c heeft ze nodig? \notes\relative c \basloopje \notes\relative c \basloopje @@ -105,19 +102,20 @@ lower = \context Voice=two \notes \relative c{ < e1 b' e> ~ < e b' e> } -\score { - \context PianoStaff < - \context Staff = treble < - \global - \upper - > - \context Staff = bass < - \global - \clef bass; - \lower - > - > +\score{ + \notes{ + \context AutoSwitchGrandStaff \relative c < + \global + \context Staff=upper { + \context Voice=foo + \property Voice.verticalDirection = 1 + \property Voice.scriptVerticalDirection = 1 + \melody + } + \context AutoSwitchContext \accompany + > + } \paper { gourlay_maxmeasures = 4.; indent = 8.\mm; @@ -126,10 +124,6 @@ lower = \context Voice=two \notes \relative c{ % no slur damping slur_slope_damping = 100.0; - \translator{ - \VoiceContext - beamAutoEnd = "1/2"; - } \translator{ \StaffContext % don't auto-generate bars: not a good idea: -> no breakpoints @@ -138,9 +132,40 @@ lower = \context Voice=two \notes \relative c{ defaultBarType = "empty"; \remove "Time_signature_engraver"; } + \translator{ + \GraceContext + \remove "Local_key_engraver"; + } + \translator { + \ScoreContext + \accepts AutoSwitchGrandStaff; + } + \translator{ + \type "Engraver_group_engraver"; + \name AutoSwitchGrandStaff; + \consists "Span_bar_engraver"; + \consists "Vertical_align_engraver"; + \consists "Piano_bar_engraver"; + \consistsend "Axis_group_engraver"; + minVerticalAlign = 2.*\staffheight; + maxVerticalAlign = 2.*\staffheight; + switcherName = "Voice"; + acceptorName = "Thread"; + staffContextName = "Staff"; + + \accepts "AutoSwitchContext"; + \accepts "Staff"; + slurVerticalDirection = 1; + verticalDirection = -1; + beamAutoEnd = "1/2"; + } + \translator { + \type "Engraver_group_engraver"; + \name "AutoSwitchContext"; + \consists "Staff_switching_translator"; + } + } + \midi { + \tempo 4 = 54; } -% broken 1.1.51.hwn2 -% \midi { -% \tempo 4 = 54; -% } } diff --git a/mutopia/E.Satie/petite-ouverture-a-danser.ly b/mutopia/E.Satie/petite-ouverture-a-danser.ly index 397be40bb6..e77a6da234 100644 --- a/mutopia/E.Satie/petite-ouverture-a-danser.ly +++ b/mutopia/E.Satie/petite-ouverture-a-danser.ly @@ -12,7 +12,7 @@ Tested Features: %} -\version "1.0.21"; +\version "1.1.52"; \include "nederlands.ly" diff --git a/mutopia/F.Schubert/AnSylvia.ly b/mutopia/F.Schubert/AnSylvia.ly index e20b01ace9..f2b0d496cc 100644 --- a/mutopia/F.Schubert/AnSylvia.ly +++ b/mutopia/F.Schubert/AnSylvia.ly @@ -10,7 +10,7 @@ title = "An Sylvia"; } -\version "1.0.20"; +\version "1.1.52"; \include "paper16.ly"; \include "paper13.ly"; @@ -259,13 +259,13 @@ tune=\notes \relative c'' { r1 \bar "|."; } -fourbars=\lyrics { _1 | _1 | _1 | _1 | } +fourbars=\lyrics { "_"1*5 } verseOne=\lyrics { Who2. is4 | Syl- via, _2 | - What2. is4 | she, _ _ That | + What2. is4 | she,2 That4 | all our swains com- | - mend2 her?4 _ | - _1 | + mend2 her?4 " " | + " "1 | Ho-4 - - ly, | fair,2 _4 and | wise2. is4 | diff --git a/mutopia/F.Schubert/standchen-16.ly b/mutopia/F.Schubert/standchen-16.ly index d38c8cce4d..3564426fa3 100644 --- a/mutopia/F.Schubert/standchen-16.ly +++ b/mutopia/F.Schubert/standchen-16.ly @@ -9,6 +9,6 @@ description = "A schubert song in 16 pt"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; \include "standchen.ly" diff --git a/mutopia/F.Schubert/standchen-20.ly b/mutopia/F.Schubert/standchen-20.ly index 9ae5a8c5d8..d5dbd8c30e 100644 --- a/mutopia/F.Schubert/standchen-20.ly +++ b/mutopia/F.Schubert/standchen-20.ly @@ -1,15 +1,16 @@ \header{ filename = "standchen.ly"; -title = "St\"andchen (Serenade) Leise flehen meine Lieder\""; +title = "St\\\"andchen"; +subtitle = "(Serenade)\\\\``Leise flehen meine Lieder''"; opus = "D. 957 No. 4"; -composer = "Franz Schubert (1797-1828)" - "Text by Ludwig Rellstab (1799-1860)"; +date = "August 1828"; +composer = "Franz Schubert (1797-1828)"; +poet= "Text by Ludwig Rellstab (1799-1860)"; enteredby = "JCN"; copyright = "public domain"; -description = "A schubert song in 20 pt"; } -\version "1.0.21"; +\version "1.1.52"; % fool make-website % \include "standchen.ly"; diff --git a/mutopia/F.Schubert/standchen.ly b/mutopia/F.Schubert/standchen.ly index cca14da911..c124113668 100644 --- a/mutopia/F.Schubert/standchen.ly +++ b/mutopia/F.Schubert/standchen.ly @@ -16,10 +16,10 @@ multiple \paper{}s in one \score Note: Original key F. %} -\version "1.0.21"; +\version "1.1.52"; vocalVerse = \notes\relative c''{ - \property Voice.dynamicdir=1 + \property Voice.dynamicDir=1 \times 2/3 { [ g8( )as] g } c4. g8 | \times 2/3 { [ f8( )g] f } c'4 f,8 r | g4.-> f8 \times 2/3 { [ f( )es] d } | @@ -35,18 +35,14 @@ vocalVerse = \notes\relative c''{ g8. b16 es4. d8 | c8. g16 es4. c8 | % \times 2/3 { [ as\grace( bes ] ) -% \tiny [as'16*1/16 bes16*1/16 ] -% \normalsize \times 2/3 { [as8 g8] as8 } c4. as8 | - \times 2/3 { [ as'8( )g] as } c4. as8 | + \grace { as'16 bes } \times 2/3 { [ )as8( )g] as } c4. as8 | g2. | - %\times 2/3 { [ f\grace( g] ) - \times 2/3 { [ f8( )e] f } as4. f8 | - %\tiny \times 2/3 { [f`16*1/16 g16*1/16] \normalsize + \grace { f16( g } \times 2/3 { [ )f8( )e] f } as4. f8 | + es!2. | g8. b16 es4. d8 | c8. g16 e4. c8 | - % \times 2/3 { [ a\grace( b] ) - \times 2/3 { [ a'!8( ) gis] a } c4. a8 | + \grace { a'16( b } \times 2/3 { [ )a!8( ) gis] a } c4. a8 | g!2. | % \times 2/3 { [ a\grace( b] ) \times 2/3 { [ d'8\f cis] d } f4. b,8 | @@ -54,7 +50,7 @@ vocalVerse = \notes\relative c''{ } vocalThrough = \notes\relative c{ - \property Voice.dynamicdir=1 + \property Voice.dynamicDir=1 g''8. g16 b8. b16 d8. d16 | c4 b r | g4. b8 d8. c16 | @@ -63,11 +59,8 @@ vocalThrough = \notes\relative c{ a8. b16 c4-> a8 r | R2. | R2. | - % 4 bars copied from end verse 1 - % \times 2/3 { [ a\grace( b] ) - \times 2/3 { [ a!8( ) gis] a } c4. a8 | + \grace { a16( b } \times 2/3 { [ )a!8( ) gis] a } c4. a8 | g!2. | - % \times 2/3 { [ a\grace( b] ) \times 2/3 { [ d'8\f cis] d } f4. b,8 | c!2. ~ | c4 r c | @@ -82,15 +75,17 @@ lyricVerse1 = \lyrics{ \times 2/3 { mei-4 ne8 } Lie-4 der8 " "8 | Durch4. die8 \times 2/3 { Nacht4 zu8 } | dir;2 " "4 | - " "4 " " " " | - " " " " " " | + " "2.*2 +%{ " "4 " " " " | + " " " " " " |%} % 11 \times 2/3 { In4 den8 } stil-4. len8 | \times 2/3 { Hain4 her-8 } nie-4. der8 | Lieb-4. chen,8 \times 2/3 { komm4 zu8 } | mir!2 " "4 | - " "4 " " " " | - " " " " " " | + " "2.*2 +%{ " "4 " " " " | + " " " " " " |%} % 17 Fl\"us-8. ternd16 schlan-4. ke8 | Wip-8. fel16 rau-4. schen8 | @@ -113,17 +108,19 @@ lyricVerse2 = \lyrics{ \times 2/3 { gal-4 len8 } schla-4 gen?8 " "8 ach!4. sie8 \times 2/3 { fleh-4 en8 } dich,2 " "4 - " "4 " " " " + " "2.*2 +%{ " "4 " " " " " "4" " " " - +%} % 11 \times 2/3 { Mit4 der8 } T\"o-4. ne8 \times 2/3 { s\"u-4 "\ss en"8 } Kla-4. gen8 Fleh-4. en8 \times 2/3 { sie4 f\"ur8 } mich2 " "4 - " "4" " " " + " "2.*2 +%{ " "4" " " " " "4" " " " - +%} % 17 Sie-8. ver-16 stehn4. des8 Bus-8. ens16 Seh-4. nen8 @@ -162,65 +159,64 @@ lyricThrough = \lyrics{ } trebleIntro = \notes\relative c{ - \clef violin; - % ugh: id like to type this! - r8^"\bf m\\\"assig"\pp [ ] | - r8 [ ] | - r8 [ ] | - r8 [ ] | + r8^"\bf m\\\"a\\\ss ig"\pp | + r8 | + r8 | + r8 | \break } trebleVerse1 = \notes\relative c{ %5 - r8 [ ] | - r8 [ ] | - r8 [ ] | - r8 [ ] | + r8 | + r8 | + r8 | + r8 | <)f8 d> - \times 2/3 { < [ f( d> <)d b] > } | + \times 2/3 { < [ f( d> <)d b] > } | %10 | - r8 [ ] | - r8 [ ] | - r8 [ ] | - r8 [ ] + r8 | + r8 | + r8 | + r8 <{ es'( ) d4.() f8}{ c' | bes4. as8 } > - \times 2/3 { < [f( as> <)d f] > } | + \times 2/3 { < [f( as> <)d f] > } | %16 | - r8 [ ] | - r8 [ ] | - r8\pp [ ] | + r8 | + r8 | + r8\pp | %20 - r8 [ ] | - % \times 2/3 { [ as\grace( bes ) - \times 2/3 { [ as'8( g as] } c4.-> ) as8 | + r8 | + \grace { as'16( bes } \times 2/3 { [ )as8( g as] } c4.-> ) as8 | g2. | - r8 [ ] | - r8 [ ] | - r8 [ ] | - r8 [ ] | + r8 | + r8 | + r8 | + r8 | \times 2/3 < { [ f'8\f( e f] } { f' e f } > - < {a4.- > )f8} { a4. f8 } > | + < {a4.- > )f8} { a'4. f8 } > | } trebleEentje = \notes \relative c'{ + \context Voice=one \property Voice.verticalDirection = 0 | - [( c> <)f16 )as>] | - [ ] | - [ ] | + ( c> <)f16 )as> | + | + | | - [ ] | - [ ] | - [ ] | + | + | + | %60 | } trebleThrough = \notes \relative c'{ + \context Voice=one \property Voice.verticalDirection = 0 | %61 R2. | @@ -232,23 +228,24 @@ trebleThrough = \notes \relative c'{ < { d,2.\f a'2} { e2. ~ e2 } { b'2. c,2 }> r4 | \context Staff < { - \voiceone - [a8. b16] c4-> () a8 r | - [a8. b16] c4-> () a8 r | + \context Voice=one \property Voice.verticalDirection = 1 + a8. b16 c4-> () a8 r | + a8. b16 c4-> () a8 r | } { - \voicetwo + \context Voice=two \property Voice.verticalDirection = -1 | | } > + \context Voice=one \property Voice.verticalDirection = 0 % 4 bars copied from end verse1 - r8 [ ] | + r8 | %70 - r8 [ ] | + r8 | \times 2/3 < { [ f'8\f( e f] } { f' e f }> - < { a4.-> )f8 } { a4. f8 } > | + < { a4.-> )f8 } { a'4. f8 } > | r4 | r4 | \property Voice . textStyle = "italic" @@ -258,9 +255,9 @@ trebleThrough = \notes \relative c'{ | % four copied from begin eentje - [ c> ] | - [ ] | - [ ] | + c> | + | + | %80 \property Voice . textStyle = "italic" | @@ -269,8 +266,7 @@ trebleThrough = \notes \relative c'{ } bassIntro = \notes\relative c{ - \clef bass; - \property Voice.dynamicdir=1 + \property Voice.dynamicDir=1 %1 r4 | r4 | @@ -280,7 +276,7 @@ bassIntro = \notes\relative c{ bassVerse1 = \notes\relative c{ % \clef bass; - \property Voice.dynamicdir=1 + \property Voice.dynamicDir=1 %5 r4 | r4 | @@ -311,7 +307,7 @@ bassVerse1 = \notes\relative c{ } bassEentje = \notes\relative c{ - \property Voice.dynamicdir=1 + \property Voice.dynamicDir=1 [ ] | c,8 [ ] | [ ] | @@ -323,7 +319,7 @@ bassEentje = \notes\relative c{ } bassThrough = \notes\relative c{ - \property Voice.dynamicdir=1 + \property Voice.dynamicDir=1 %61 [ b-> d->> ] | [ b-> d->> ] | @@ -366,11 +362,12 @@ global = \notes{ } -lyricFour = \lyrics{ - " "4 " " " " - " " " " " " +lyricFour = \lyrics{ + " "2.*4 +%{ " "4 " " " " " " " " " " " " " " " " + " " " " " "%} } allLyrics = { @@ -391,7 +388,11 @@ lyricStaff = \context Lyrics = lyric< vocals = \notes{ \clef treble; - \property Voice.dynamicdir=UP + % certainly no auto-beaming for vocals + \property Voice.beamAuto=0 + + + \property Voice.dynamicDir = \up \skip 4 * 12; \vocalVerse \skip 4 * 24; @@ -406,6 +407,8 @@ vocalStaff = \context Staff = vocal< > treble = { + \clef treble; + \property Voice.beamAutoBegin=0 \trebleIntro \trebleVerse1 \trebleEentje @@ -419,6 +422,7 @@ trebleStaff = \context Staff = treble< > bass = { + \clef bass; \bassIntro \bassVerse1 \bassEentje @@ -431,7 +435,7 @@ bassStaff = \context Staff = bass< \bass > -grandStaff = \context GrandStaff< +grandStaff = \context PianoStaff < \trebleStaff \bassStaff > @@ -455,7 +459,8 @@ grandStaff = \context GrandStaff< % \translator { \OrchestralPartStaffContext } \translator { \HaraKiriStaffContext } } - \midi{ - \tempo 4 = 54; - } +%broken 1.1.51 +% \midi{ +% \tempo 4 = 54; +% } } diff --git a/mutopia/Hymns/diademata.ly b/mutopia/Hymns/diademata.ly index 99e3b59d1d..5a6a838bc5 100644 --- a/mutopia/Hymns/diademata.ly +++ b/mutopia/Hymns/diademata.ly @@ -6,7 +6,7 @@ date = "1868"; title = "Diademata"; metre = "6 6. 8 6. D"; } -\version "1.0.21"; +\version "1.1.52"; sop=\notes \transpose c''{ ees2 | ees4 ees4 g2 g2 | c'1. \bar "||"; diff --git a/mutopia/Hymns/laudatedom.ly b/mutopia/Hymns/laudatedom.ly index 5078d01f70..ffdcd6f23e 100644 --- a/mutopia/Hymns/laudatedom.ly +++ b/mutopia/Hymns/laudatedom.ly @@ -4,7 +4,7 @@ composer = "Parry"; metre = "10 10 . 11 11"; } -\version "1.0.21"; +\version "1.1.52"; sop = \notes \transpose c''{ f4 | d' bes c' | f2 \bar "||"; diff --git a/mutopia/Hymns/maccabaeus.ly b/mutopia/Hymns/maccabaeus.ly index 6a7ba8e9b7..1ad5091acb 100644 --- a/mutopia/Hymns/maccabaeus.ly +++ b/mutopia/Hymns/maccabaeus.ly @@ -7,7 +7,7 @@ title = "Maccabaeus"; metre = "10 11. 11 11. and refrain"; } -\version "1.0.21"; +\version "1.1.52"; sop=\notes \relative c'' { b2 gis4. a8 |b2 e,2 | diff --git a/mutopia/Hymns/ode.ly b/mutopia/Hymns/ode.ly index 9026a41041..aef853723d 100644 --- a/mutopia/Hymns/ode.ly +++ b/mutopia/Hymns/ode.ly @@ -7,7 +7,7 @@ title = "Ode to Joy"; metre = "8 7 8 7 D"; } -\version "1.0.21"; +\version "1.1.52"; sop=\notes \relative c'' { b4 b c d | d c b a | g g a b | b4. a8 a2 \bar "||"; diff --git a/mutopia/Hymns/stille.ly b/mutopia/Hymns/stille.ly index 3c3a619e04..a2d5573c88 100644 --- a/mutopia/Hymns/stille.ly +++ b/mutopia/Hymns/stille.ly @@ -8,7 +8,7 @@ poet = "Joseph Mohr"; } -\version "1.0.21"; +\version "1.1.52"; global=\notes { \time 6/4; diff --git a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly index f2b28b3581..e1136e13da 100644 --- a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly +++ b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly @@ -4,7 +4,7 @@ piece = "Allemande"; } -\version "1.0.21"; +\version "1.1.52"; global = \notes{ \time 4/4; diff --git a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly index 5469e6bf52..4843135792 100644 --- a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly +++ b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly @@ -10,7 +10,7 @@ %% %% Noe liknende skjer også i mellom andre og tredje stemme i takt 28 -\version "1.0.21"; +\version "1.1.52"; global = \notes{ \time 2/4; diff --git a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly index 1a4ec05b46..4ec2a3428f 100644 --- a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly +++ b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly @@ -10,7 +10,7 @@ copyright = "Public Domain"; } -\version "1.0.21"; +\version "1.1.52"; global = \notes { \time 4/4; diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-1.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-1.ly index ecb7306334..586ab4e11f 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-1.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-1.ly @@ -12,7 +12,7 @@ enteredby = "jcn"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; % upper = \context Staff \notes\relative c { upper = \context Staff=upper \notes\relative c { diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-2.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-2.ly index d77cc32d9e..24fcc6d71e 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-2.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-2.ly @@ -10,7 +10,7 @@ enteredby = "jcn"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; upper = \context Staff \notes\relative c{ \context Voice=i \property Voice . textStyle = "italic" diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly index e40697f63e..71139a0aa6 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly @@ -8,7 +8,7 @@ composer = "Johann Sebastian Bach (1685-1750)"; enteredby = "jcn"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; one = \context Staff \notes\relative c { \context Voice=i diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-5.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-5.ly index 420a85766d..9f0fde9241 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-5.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-5.ly @@ -8,7 +8,7 @@ composer = "Johann Sebastian Bach (1685-1750)"; enteredby = "jcn"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; upper = \context Staff \notes\relative c{ diff --git a/mutopia/J.S.Bach/Petites-Preludes/preludes-6.ly b/mutopia/J.S.Bach/Petites-Preludes/preludes-6.ly index f0259058a3..a3568d5bbb 100644 --- a/mutopia/J.S.Bach/Petites-Preludes/preludes-6.ly +++ b/mutopia/J.S.Bach/Petites-Preludes/preludes-6.ly @@ -8,7 +8,7 @@ composer = "Johann Sebastian Bach (1685-1750)"; enteredby = "jcn"; copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; one = \context Staff \notes\relative c{ diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-cello.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-cello.ly index 632aad0510..937ec2cd03 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-cello.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-cello.ly @@ -15,7 +15,7 @@ copyright = "public domain"; dotted slurs %} -\version "1.0.21"; +\version "1.1.52"; \include "allemande-urtext.ly"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-urtext.ly index 3b4fda0013..fdfdf76f8b 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-urtext.ly @@ -106,4 +106,4 @@ allemande = \context Staff \notes< > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/courante-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/courante-urtext.ly index f2797a3ca2..65793d7931 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/courante-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/courante-urtext.ly @@ -91,4 +91,4 @@ courante = \context Staff \notes< \$courante_b > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/gigue-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/gigue-urtext.ly index fe92ef610c..2ea545bd7b 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/gigue-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/gigue-urtext.ly @@ -106,4 +106,4 @@ gigue = \notes< \$gigue_b > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-cello.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-cello.ly index 0890faa692..80dc4bb656 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-cello.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-cello.ly @@ -16,7 +16,7 @@ copyright = "public domain"; dotted slurs %} -\version "1.0.21"; +\version "1.1.52"; \include "menuetto-urtext.ly"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-urtext.ly index fb729e383e..f74c407aa5 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-urtext.ly @@ -156,4 +156,4 @@ menuetto_ii = \context Staff\notes \relative c { d2. } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-cello.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-cello.ly index 7b56811271..158b401ac0 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-cello.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-cello.ly @@ -15,7 +15,7 @@ copyright = "public domain"; dotted slurs %} -\version "1.0.21"; +\version "1.1.52"; \include "prelude-urtext.ly"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-urtext.ly index 7445345cd2..7e8847975b 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-urtext.ly @@ -280,4 +280,4 @@ prelude = \context Staff \notes< \$prelude_b > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-viola.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-viola.ly index 36defc8198..1da2d1d072 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-viola.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/prelude-viola.ly @@ -15,7 +15,7 @@ copyright = "public domain"; dotted slurs %} -\version "1.0.21"; +\version "1.1.52"; \include "prelude-urtext.ly"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/sarabande-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/sarabande-urtext.ly index dba20e9cbc..ead13666a5 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/sarabande-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/sarabande-urtext.ly @@ -92,4 +92,4 @@ sarabande = \context Staff \notes< \$sarabande_b > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/viola-i.ly b/mutopia/J.S.Bach/viola-i.ly index 61e33e7e0d..c239761d3e 100644 --- a/mutopia/J.S.Bach/viola-i.ly +++ b/mutopia/J.S.Bach/viola-i.ly @@ -16,4 +16,4 @@ $viola_i_staff = \context Staff = viola < \clef alto; \$global_i > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/violino-i.ly b/mutopia/J.S.Bach/violino-i.ly index 940f740103..1c4a2d1618 100644 --- a/mutopia/J.S.Bach/violino-i.ly +++ b/mutopia/J.S.Bach/violino-i.ly @@ -37,4 +37,4 @@ $violino_i_staff = \context Staff = violino < > \$global_i > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/violino-viola.ly b/mutopia/J.S.Bach/violino-viola.ly index 7295ee78d0..e79ff409c0 100644 --- a/mutopia/J.S.Bach/violino-viola.ly +++ b/mutopia/J.S.Bach/violino-viola.ly @@ -30,4 +30,4 @@ copyright = "Public Domain"; } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/violino-violoncello.ly b/mutopia/J.S.Bach/violino-violoncello.ly index 315135b5b1..d7431f1dc9 100644 --- a/mutopia/J.S.Bach/violino-violoncello.ly +++ b/mutopia/J.S.Bach/violino-violoncello.ly @@ -30,4 +30,4 @@ copyright = "Public Domain"; } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/violoncello-i.ly b/mutopia/J.S.Bach/violoncello-i.ly index 18900b1617..bae5e6dab9 100644 --- a/mutopia/J.S.Bach/violoncello-i.ly +++ b/mutopia/J.S.Bach/violoncello-i.ly @@ -28,4 +28,4 @@ $violoncello_i_staff = \context Staff = violoncello < \clef bass; \$global_i > -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/J.S.Bach/wtk1-fugue1.ly b/mutopia/J.S.Bach/wtk1-fugue1.ly index b00149f495..5d029b0bcb 100644 --- a/mutopia/J.S.Bach/wtk1-fugue1.ly +++ b/mutopia/J.S.Bach/wtk1-fugue1.ly @@ -11,7 +11,7 @@ copyright = "Public Domain"; %{ %} -\version "1.0.21"; +\version "1.1.52"; global = @@ -20,14 +20,13 @@ global = } -beamkludge = \property Voice. stemLeftBeamCount = "1" tenor = \notes \relative c' { \clef "violin"; \stemdown - r8 [c8 d e] [f. \beamkludge g32 f] [e8 a] | + r8 [c8 d e] [f. g32 f] [e8 a] | [d, g] ~ [g16 a g f] [e f e d] [c d c b ] | [a 8 fis'] g4 ~ [g8 fis16 e] [f8 d] | [g f! e d] c r r g' ~ | @@ -36,20 +35,20 @@ tenor = [c8 f] r16 [g f e] [f8 d] g4 ~ | g4 r4 r2 | r1 | - r8 [g8 a b] [c . \beamkludge d 32 c ] [b8 e ] + r8 [g8 a b] [c . d 32 c ] [b8 e ] %% 10 [a, d ] ~ [d 16 e d c ] b8 r8 r d, | - [e fis] [g. \beamkludge a32 g] [fis8 b e, a] ~ | + [e fis] [g. a32 g] [fis8 b e, a] ~ | [a16 b a gis] [fis8 f!] [e d] ~ [d16 e fis gis] | [a gis a b] [gis fis gis a] b8 r8 r4 | - r8 [c,8 d e] \stemup [f. \beamkludge g32 f] [e8 a] | + r8 [c,8 d e] \stemup [f. g32 f] [e8 a] | %% 15 [d, g] ~ [g16 a g f] e8 \stemdown [e fis g] ~ | [g8 fis] [gis8 a] ~ [a g! a b] | \stemboth - [c . \beamkludge d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] | + [c . d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] | [b8 g' cis, d ] [e cis d e ] | - \stemdown a,8 r8 r e [fis g] \stemboth [a. \beamkludge b32 a] | + \stemdown a,8 r8 r e [fis g] \stemboth [a. b32 a] | %% 20 [g8 c fis, b] ~ [b16 c b a] \stemdown [g fis e d] \stemboth | e4 \stemdown d ~ [d16 a' g f!] [e g f! a] | @@ -57,7 +56,7 @@ tenor = \stemboth g4. f8 ~ [f e] d4 | \stemdown e8 a4 g8 ~ [g8 f g a] | %% 25 - [bes8. \beamkludge c32 b] [a8 d ] [g, c ] ~ [c 16 d c bes] | + [bes8. c32 b] [a8 d ] [g, c ] ~ [c 16 d c bes] | [a bes a g] [f g f e] d4 ~ [d8. g16] | a4 r16 [f' 16 d 8] e 2 | } @@ -69,12 +68,12 @@ soprane = \stemup r1 | r2 r8 [g'8 a b] | - [c . \beamkludge d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] | + [c . d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] | [b g a b] [c b c d ] [e d e fis ] [g 8 b,] | %% 5 [c a] [d 16 c b a] [g8. g16] [f e f g] | [a g a b] c 2 b4 | - r8 [c8 d e] [f. \beamkludge g32 f] [e8 a] | + r8 [c8 d e] [f. g32 f] [e8 a] | [d, g] ~ [g16 a g f] [e8 a] ~ [a16 b a g] | f2 [e8. fis16] g4 ~ %% 10 @@ -85,13 +84,13 @@ soprane = a 4 r4 r2 | %% 15 r2 r8 [g 8 a b ] | - [c8. \beamkludge d32 c] [b 8 c] [d e] [f!. \beamkludge g32 f!] | + [c8. d32 c] [b 8 c] [d e] [f!. g32 f!] | [e8 a d, g] ~ [g16 a g f] [e8 a] | - [d,8 bes'] [a g16 f] [g f g e] [f g g \beamkludge f32 g] | + [d,8 bes'] [a g16 f] [g f g e] [f g g f32 g] | [a16 cis, d g] [e8. d16] d8 r8 r4 | %% 20 r2 r4 r8 g, | - [a b ] [c. \beamkludge d32 c] [b 8 e a, d] ~ | + [a b ] [c. d32 c] [b 8 e a, d] ~ | [e16 e d c] [b c d e] [f g a g] [f e d c] | b 4 [c,8 d] g c4 b 8 | c4 [b 8 bes 8] a d4 c8 | @@ -110,31 +109,31 @@ alt = r1 | r | r | - r8 [g'8 a b] [c . \beamkludge d32 c ] [b8 e ] | + r8 [g'8 a b] [c . d32 c ] [b8 e ] | %% 5 [a, d ] ~ [d 16 e d c ] [b8 c ~ c bes8] | [a d g, c ] r16 [a16 b c ] d 4 | - g,4 r8 g8 [a b] [c . \beamkludge d32 c ] | + g,4 r8 g8 [a b] [c . d32 c ] | [b8 e a, d ] ~ [d 16 e d c !] [b!8 e ] ~ | e 4 d 4 [c 16 b c a] [e' d c b] | %% 10 [c 16 a b c ] [d c b a] g4 r4 | r1 | - r8 [e8 fis gis] [a. \beamkludge b32 a] [gis8 c ] | + r8 [e8 fis gis] [a. b32 a] [gis8 c ] | [fis, b] ~ [b16 c b a] gis8 a4 gis8 | a4 r8 g8 [a b] c . [d32 c ] | %% 15 [b8 e a, d ] ~ [d' g,] d 4 | [c 8 a] e' 4 d 8 r8 r4 | - r8 [a8 b cis ] [d . \beamkludge e32 d ] [c !8 f ] | + r8 [a8 b cis ] [d . e32 d ] [c !8 f ] | [b,8 e ] ~ [e 16 f e d ] cis 8 r8 r4 | - r8 [a8 b cis ] [d . \beamkludge e32 d ] [c !8 fis ] | + r8 [a8 b cis ] [d . e32 d ] [c !8 fis ] | %% 20 [b, e ] ~ [e 16 fis e d ] c 2 ~ | [c 16 d c b] [a g a fis] [g8 b c d ] | - [e . \beamkludge f32 e ] [d 8 g ] [c, f ] ~ [f 16 g f e ] | + [e . f32 e ] [d 8 g ] [c, f ] ~ [f 16 g f e ] | d 4 [e 8 d ] ~ [d g,] g4 ~ - [g8 c, d e] [f. \beamkludge g32 f] [e8 a] | + [g8 c, d e] [f. g32 f] [e8 a] | %% 25 [d, g] ~ [g16 a g f] [e d e f] [g a bes g] | [a e f g] [a b c a] b2 | @@ -153,21 +152,21 @@ bass = r | %% 5 r2 r8 [c8 d e] | - [f. \beamkludge g32 f] [e8 a] [d, g] ~ [g16 a g f] | + [f. g32 f] [e8 a] [d, g] ~ [g16 a g f] | [e f e d] [c d c b ] [a' 8 d a fis] | [g16 a bes g] [cis,8 d] a'4 e4 | [a16 b c d ] [c b a g] c 8 r8 r4 | %% 10 r2 r8 [g, 8 a b ] | - [c. \beamkludge d32 c] [b 8 e] [a, d] ~ [d16 e d c] | + [c. d32 c] [b 8 e] [a, d] ~ [d16 e d c] | b 8 e4 d8 c f!4 e8 ~ | e d4 e8 [f! e16 d] e4 | a, 4 r4 r2 | %% 15 - r8 [g 8 a b ] [c. \beamkludge d32 c] [b 8 e] | + r8 [g 8 a b ] [c. d32 c] [b 8 e] | [a, 8 d] ~ [d16 e d c] [b 8 bes a g'' ] | [a,, 8 fis' g e] d4 [e8 f!] | - [g8. \beamkludge a32 g] [f8 bes] [e, a] ~ [a16 bes a g] | + [g8. a32 g] [f8 bes] [e, a] ~ [a16 bes a g] | [f e f d] [g8 a] d,2 ~ | %% 20 [d16 e d c] [b a g fis ] [e' 8 e fis g] ~ | diff --git a/mutopia/J.S.Bach/wtk1-fugue2.ly b/mutopia/J.S.Bach/wtk1-fugue2.ly index e8e00e53f5..8e76f0d347 100644 --- a/mutopia/J.S.Bach/wtk1-fugue2.ly +++ b/mutopia/J.S.Bach/wtk1-fugue2.ly @@ -19,7 +19,7 @@ * auto beaming %} -\version "1.0.21"; +\version "1.1.52"; \include "nederlands.ly" % for correct parsing of note names diff --git a/mutopia/J.S.Bach/wtk1-prelude1.ly b/mutopia/J.S.Bach/wtk1-prelude1.ly index e0d8f711f7..df8501f268 100644 --- a/mutopia/J.S.Bach/wtk1-prelude1.ly +++ b/mutopia/J.S.Bach/wtk1-prelude1.ly @@ -8,7 +8,7 @@ enteredby = "Shay Rojansky"; copyright = "Public Domain"; } -\version "1.0.21"; +\version "1.1.52"; global = \notes { diff --git a/mutopia/L.Mozart/sinfonia.ly b/mutopia/L.Mozart/sinfonia.ly index 7d78a101be..ac73c392b1 100644 --- a/mutopia/L.Mozart/sinfonia.ly +++ b/mutopia/L.Mozart/sinfonia.ly @@ -383,4 +383,4 @@ bassocontinuo = \notes \relative c'{ \midi{ \tempo 4 = 100; } } -\version "1.0.21"; +\version "1.1.52"; diff --git a/mutopia/N.W.Gade/brass.ly b/mutopia/N.W.Gade/brass.ly index f29cfb8334..7a9930b7cc 100644 --- a/mutopia/N.W.Gade/brass.ly +++ b/mutopia/N.W.Gade/brass.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; corI=\notes\relative c'' { \key c; diff --git a/mutopia/N.W.Gade/parts.ly b/mutopia/N.W.Gade/parts.ly index beb95deccd..4a4ecd6446 100644 --- a/mutopia/N.W.Gade/parts.ly +++ b/mutopia/N.W.Gade/parts.ly @@ -11,7 +11,7 @@ copyright = "Mats Bengtsson, 1999. Free circulation permitted and " + % Process with 'ly2dvi -s parts.ly' to get the separate parts. -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "wood.ly" diff --git a/mutopia/N.W.Gade/score.ly b/mutopia/N.W.Gade/score.ly index 878267faea..181725d825 100644 --- a/mutopia/N.W.Gade/score.ly +++ b/mutopia/N.W.Gade/score.ly @@ -8,7 +8,7 @@ copyright = "Mats Bengtsson, 1999. Free circulation permitted and " + "Statens Musikbibliotek, Stockholm, Sweden"; } -\version "1.0.21"; +\version "1.1.52"; \include "global.ly" \include "wood.ly" diff --git a/mutopia/N.W.Gade/strings.ly b/mutopia/N.W.Gade/strings.ly index 0944ec0802..e19eb2518c 100644 --- a/mutopia/N.W.Gade/strings.ly +++ b/mutopia/N.W.Gade/strings.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; viI=\notes\relative c'' { diff --git a/mutopia/N.W.Gade/wood.ly b/mutopia/N.W.Gade/wood.ly index b3001a9a34..99230fd85b 100644 --- a/mutopia/N.W.Gade/wood.ly +++ b/mutopia/N.W.Gade/wood.ly @@ -1,4 +1,4 @@ -\version "1.0.21"; +\version "1.1.52"; oboe=\notes\relative c'' { \clef "treble"; diff --git a/mutopia/W.A.Mozart/cadenza.ly b/mutopia/W.A.Mozart/cadenza.ly index 6b4c9079e6..4187780dc0 100644 --- a/mutopia/W.A.Mozart/cadenza.ly +++ b/mutopia/W.A.Mozart/cadenza.ly @@ -11,14 +11,14 @@ copyright = "public domain"; Tested Features: cadenza mode %} -\version "1.0.21"; +\version "1.1.52"; cad = \notes \relative c' { \property Score.instrument = "french horn" \context Staff { \cadenza 1; - \grouping 1*4; + \clef "violin"; c'4.\mf g8 diff --git a/mutopia/W.A.Mozart/horn-concerto-3.ly b/mutopia/W.A.Mozart/horn-concerto-3.ly index dda8a525ee..a11757c35e 100644 --- a/mutopia/W.A.Mozart/horn-concerto-3.ly +++ b/mutopia/W.A.Mozart/horn-concerto-3.ly @@ -9,7 +9,7 @@ copyright = "public domain"; } -\version "1.0.21"; +\version "1.1.52"; allegro = \notes @@ -237,7 +237,7 @@ rondo = \notes \relative c' \partial 8; g'8 | \time 6/8; - \grouping 8*3 8*3; + \rondotheme R2.*13 | diff --git a/mutopia/gallina.ly b/mutopia/gallina.ly index e8b434fe69..047efd54f0 100644 --- a/mutopia/gallina.ly +++ b/mutopia/gallina.ly @@ -45,7 +45,7 @@ Voice engraver by uncommenting the lines in the paper definition below. --MB %} -\version "1.0.21"; +\version "1.1.52"; global = \notes { \property StaffGroup.timeSignatureStyle = "old" diff --git a/mutopia/los-toros-oboe.ly b/mutopia/los-toros-oboe.ly index 0c89debf8b..6152042ead 100644 --- a/mutopia/los-toros-oboe.ly +++ b/mutopia/los-toros-oboe.ly @@ -8,7 +8,7 @@ enteredby = "jcn"; copyright = "public domain"; latexheaders= "headers"; } -\version "1.0.21"; +\version "1.1.52"; diff --git a/scm/script.scm b/scm/script.scm index 3ab041ac90..fbeeae8615 100644 --- a/scm/script.scm +++ b/scm/script.scm @@ -33,7 +33,9 @@ ("prallprall" . ((feta . ("prallprall" . "prallprall")) #f 0 1 0)) ("prallmordent" . ((feta . ("prallmordent" . "prallmordent")) #f 0 1 0)) ("upprall" . ((feta . ("upprall" . "upprall")) #f 0 1 0)) - ("downprall" . ((feta . ("downprall" . "downprall")) #f 0 1 0))) + ("downprall" . ((feta . ("downprall" . "downprall")) #f 0 1 0)) + ("segno" . ((feta . ("segno" . "segno")) #f 0 1 0)) + ("wheel" . ((feta . ("wheel" . "wheel")) #f 0 1 0))) script-alist) ) diff --git a/scripts/convert-mudela.py b/scripts/convert-mudela.py index 4909d29dc7..f7a68585e1 100644 --- a/scripts/convert-mudela.py +++ b/scripts/convert-mudela.py @@ -350,6 +350,18 @@ if 1: 'hshift -> horizontalNoteShift') +if 1: + def conv(lines): + newlines =[] + for x in lines: + x = re.sub ('\\\\grouping[^;]*;','', x) + newlines.append (x) + return newlines + + conversions.append ((1,1,52), conv, + 'deprecate \\grouping') + + ############################ diff --git a/stepmake/bin/tar-docxx.sh b/stepmake/bin/tar-docxx.sh index 9d20383a20..c1ba5322f3 100644 --- a/stepmake/bin/tar-docxx.sh +++ b/stepmake/bin/tar-docxx.sh @@ -30,7 +30,7 @@ TAROUTDIR=/tmp/tar-docxx rm -rf $TAROUTDIR mkdir -p $TAROUTDIR echo untarring ... -tar -C $TAROUTDIR -zxf $TARBALL '*cc' '*.c' '*.hh' '*.h' +tar -C $TAROUTDIR -zxf $TARBALL '*.hh' '*.h' cd $TAROUTDIR DATE=`date` diff --git a/stepmake/stepmake/yodl-rules.make b/stepmake/stepmake/yodl-rules.make index 30b4468f8f..78811f5d1f 100644 --- a/stepmake/stepmake/yodl-rules.make +++ b/stepmake/stepmake/yodl-rules.make @@ -22,7 +22,7 @@ $(outdir)/%.texinfo: %.yo $(YODL2TEXINFO) -doutdir=$(outdir) --live-data=3 -o $@ $< $(outdir)/%.txt: %.yo -# $(YODL2TXT) -doutdir=$(outdir) --live-data=3 -o $@ $< - $(YODL2MSLESS) -doutdir=$(outdir) --live-data=3 $< > $@ - rm -f $(basename $<).ms + $(YODL2TXT) -doutdir=$(outdir) --live-data=3 -o $@ $< +# $(YODL2MSLESS) -doutdir=$(outdir) --live-data=3 $< > $@ +# rm -f $(basename $<).ms -- 2.39.5