From 1ac137fdab1f1be8a5621599664008107b5a9a6a Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 13 Feb 2000 18:30:20 +0100 Subject: [PATCH] release: 1.3.24 ========== * Added a ROADMAP file explaining the source directory layout. * Minor tweak in the feta 6 and 9 numeral * Moved files from lib/ to flower/ * Removed Note_head_side class. * Updated the webpage to be a little more chatty. * Small Local_key_engraver optimization: only lookup timing engraver once. * Fixed dashed slurs * Rewrite of Slur code. Be much more picky about slur shapes. We try to offset the slur instead of bending it too much * Look at stem directions for tie direction. * Compound multimeasure rests. Put measures_i_ variable in an element property. Made the symbol a lot wider. * Time signature small cleanups. 1.3.22.h --- CHANGES | 41 ++++- Documentation/faq.texi | 32 ++-- Documentation/index.texi | 6 - Documentation/links.texi | 51 ------ Documentation/mail.texi | 47 +----- Documentation/topdocs/INSTALL.texi | 7 +- Documentation/topdocs/index.tely | 123 ++++++++++---- INSTALL.txt | 12 +- ROADMAP | 42 +++++ TODO | 18 +- VERSION | 4 +- {lib => flower}/include/file-storage.hh | 0 {lib => flower}/include/input.hh | 0 .../include/mapped-file-storage.hh | 0 {lib => flower}/include/proto.hh | 0 .../include/simple-file-storage.hh | 0 {lib => flower}/include/warn.hh | 0 {lib => flower}/input.cc | 0 {lib => flower}/mapped-file-storage.cc | 0 {lib => flower}/simple-file-storage.cc | 0 {lib => flower}/source.cc | 0 {lib => flower}/warn.cc | 0 input/test/diverse-spacing.ly | 14 ++ input/test/mm-rests2.ly | 2 +- input/test/multi-measure-rest.ly | 3 +- input/test/slur-dash.ly | 2 +- lib/GNUmakefile | 16 -- lib/include/GNUmakefile | 9 - lily/GNUmakefile | 4 +- lily/align-note-column-engraver.cc | 3 + lily/bar-script-engraver.cc | 10 +- lily/beam.cc | 1 - lily/bezier-bow.cc | 33 +++- lily/dot-column-engraver.cc | 3 + lily/dot-column.cc | 4 +- lily/grace-align-item.cc | 2 - lily/grace-position-engraver.cc | 8 +- lily/include/bezier-bow.hh | 16 +- lily/include/dot-column.hh | 4 +- lily/include/grace-align-item.hh | 4 +- lily/include/local-key-engraver.hh | 32 ---- lily/include/local-key-item.hh | 6 +- lily/include/lookup.hh | 1 - lily/include/multi-measure-rest.hh | 4 +- lily/include/note-head-side.hh | 29 +--- lily/include/paper-def.hh | 7 - lily/include/spacing-spanner.hh | 3 +- lily/include/time-signature.hh | 6 +- lily/local-key-engraver.cc | 151 ++++++++++------- lily/local-key-item.cc | 11 +- lily/lookup.cc | 71 +------- lily/multi-measure-rest-engraver.cc | 5 +- lily/multi-measure-rest.cc | 77 ++++++--- lily/note-head-side.cc | 34 ---- lily/paper-column.cc | 2 +- lily/paper-def.cc | 33 +--- lily/score-engraver.cc | 10 +- lily/script-column-engraver.cc | 11 +- lily/slur.cc | 154 ++++++++---------- lily/spacing-engraver.cc | 12 +- lily/spacing-spanner.cc | 45 ++++- lily/tie.cc | 17 +- lily/time-signature-engraver.cc | 8 +- lily/time-signature.cc | 59 ++++++- lily/tuplet-spanner.cc | 20 ++- ly/params.ly | 12 +- ly/textscripts.ly | 3 + make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 4 +- make/toplevel.make.in | 4 +- mf/feta-eindelijk.mf | 18 +- mf/feta-generic.mf | 4 +- mf/feta-nummer.mf | 3 +- mf/feta-test11.mf | 21 --- mf/slur.mf | 31 ++++ midi2ly/GNUmakefile | 2 +- scm/lily.scm | 20 ++- 77 files changed, 731 insertions(+), 728 deletions(-) delete mode 100644 Documentation/links.texi create mode 100644 ROADMAP rename {lib => flower}/include/file-storage.hh (100%) rename {lib => flower}/include/input.hh (100%) rename {lib => flower}/include/mapped-file-storage.hh (100%) rename {lib => flower}/include/proto.hh (100%) rename {lib => flower}/include/simple-file-storage.hh (100%) rename {lib => flower}/include/warn.hh (100%) rename {lib => flower}/input.cc (100%) rename {lib => flower}/mapped-file-storage.cc (100%) rename {lib => flower}/simple-file-storage.cc (100%) rename {lib => flower}/source.cc (100%) rename {lib => flower}/warn.cc (100%) create mode 100644 input/test/diverse-spacing.ly delete mode 100644 lib/GNUmakefile delete mode 100644 lib/include/GNUmakefile delete mode 100644 lily/note-head-side.cc delete mode 100644 mf/feta-test11.mf create mode 100644 mf/slur.mf diff --git a/CHANGES b/CHANGES index da40977b30..0951aa432f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,16 +1,35 @@ -1.3.23.jcn1 -=========== +1.3.23.uu1 +========== + +* Added a ROADMAP file explaining the source directory layout. + +* Minor tweak in the feta 6 and 9 numeral + +* Moved files from lib/ to flower/ + +* Removed Note_head_side class. + +* Updated the webpage to be a little more chatty. -* Made quanting lists in scm/paper.scm comply with actual quantise_iv - algorithm: period = quants.top () - quants[0]. This fixes beam - vertical quanting problems. Beam quanting should now actually be - better than 1.2.17, which has a symmetry problem as revealed by the - new input/test/beam-pos.ly. +* Small Local_key_engraver optimization: only lookup timing engraver once. + +* Fixed dashed slurs + +* Rewrite of Slur code. Be much more picky about slur shapes. We try +to offset the slur instead of bending it too much + +* Look at stem directions for tie direction. + +* Compound multimeasure rests. Put measures_i_ variable in an element +property. Made the symbol a lot wider. + +* Time signature small cleanups. 1.3.22.hwn2 =========== -* Symbols opposite to stem (eg marcato) now get the proper glyph. +* Symbols opposite to stem (eg marcato) now get the proper glyph in up +version. * Breathing marks now have a direction by default. @@ -36,7 +55,11 @@ definitions. Very handy when entering complicated scores. * Rewrote multi measure rest support: now they are entered as spanners (\commandspanrequest \start "rest"). RXXXX is an abbreviation for -\commandspanrequest \start "rest" SXXXX \commandspanrequest \stop "rest". + + { \commandspanrequest \start "rest" + SXXXX + \commandspanrequest \stop "rest" + } * Removed support of percent style repetitions. diff --git a/Documentation/faq.texi b/Documentation/faq.texi index a06e8c0665..02bd7b5994 100644 --- a/Documentation/faq.texi +++ b/Documentation/faq.texi @@ -120,14 +120,11 @@ be used by LilyPond, not by any other programs. @node Documentation, Language- mudela, Installing, FAQ - GNU LilyPond FAQs @section Documentation -@subsubsection Why is the documentation/website/etc. so lousy? +@subsubsection What a sober website/manual you have there! LilyPond development is moving quite fast, documentation will often lag -a bit behind. We must always make a choice between writing more -documentation, writing HTML, writing more code and answering email. - -If you think you can make a correction, or devised a solution that -should be documented, please write it up, and us a diff. +a bit behind. But don't hesitate to point out inaccuracies. Whip up +your mail reader and write to the mailing list. @node Language- mudela, Do you support -, Documentation, FAQ - GNU LilyPond FAQs @section Language: mudela @@ -177,7 +174,7 @@ of (x,y) positions and symbols. You can only sensibly do TeX stuff in the symbol string. You can access the symbol string easily for some symbols (notably lyrics and @code{^"text"} commands). -@node Do you support -, How do I -, Language- mudela, FAQ - GNU LilyPond FAQs +@node Do you support -, How do I -, Language- mudela, FAQ - GNU LilyPond FAQs @section Do you support ... @subsubsection Do you support pop songs (chords, single staff, lyrics)? @@ -186,20 +183,18 @@ Yes, see the @file{twinkle-pop} example. @subsubsection Do you support guitar chord diagrams? -No. Go ahead and send a patch. - -We ourselves don't play guitar, and don't know the fine points of this -notation. We would welcome anyone who could give this a try. +No. We ourselves don't play guitar, and don't know the fine points of +this notation. We would welcome anyone who could give this a try. @subsubsection Do you support TAB notation? -No. The same as for the previous subsubsection goes. +No. The same as for the previous question goes. @subsubsection Do you support multiple staff-sizes? Yes. At this time you can choose between 11, 13, 16, 19, 20, 23 and 20 -pt staff-size. Use the @code{staffLineLeading} property for setting the +pt staff-size. Use the @code{staffSpace} property for setting the size of the staff, and @code{fontSize} for setting the size of the glyphs. @@ -210,7 +205,7 @@ No. @subsubsection Do you support grace notes? -Yes. See @file{input/test/grace.ly} +Yes. See @file{input/test/grace.ly}. @node How do I -, Development, Do you support -, FAQ - GNU LilyPond FAQs @section How do I .... @@ -225,8 +220,7 @@ You change the order lyrics and staves. You have to name all staves (lyric and melodic), otherwise they will end up in the same staff/lyricline @example - -4 \score @{ + \score @{ < \melodic \type Staff = "treble" \trebleMelody \lyric \type Lyrics = "tlyrics" \trebtext \type Staff = "bass" \melodic \bassMelody @@ -300,17 +294,15 @@ There are several examples in the @file{mutopia} directory. See @file{input/test/bar-scripts.ly}. -@subsubsection How do I change the tagline 'Lily was here' +@subsubsection How do I change the tagline 'Lily was here'? -In the @code{\header} field, add a @code{tagline} entry, eg +In the @code{\header} field, add a @code{tagline} entry, e.g. @example tagline="Typeset by GNU LilyPond" @end example -to get a bit less frivolous tagging. - @node Development, Running, How do I -, FAQ - GNU LilyPond FAQs @section Development diff --git a/Documentation/index.texi b/Documentation/index.texi index c01dbf6857..2e0450d1b5 100644 --- a/Documentation/index.texi +++ b/Documentation/index.texi @@ -35,12 +35,6 @@ @end itemize -@unnumberedsubsec Links - -@itemize @bullet -@item @uref{links.html, interesting links} -@end itemize - @unnumberedsubsec Logo: @itemize @bullet @item @uref{../pictures/out-www/lelieblond.png, logo} in large size diff --git a/Documentation/links.texi b/Documentation/links.texi deleted file mode 100644 index 233bedb10e..0000000000 --- a/Documentation/links.texi +++ /dev/null @@ -1,51 +0,0 @@ -\input texinfo @c -*-texinfo-*- -@setfilename links.info -@settitle links - Links to other related websites - -@node Top, , , (dir) -@top - -This page contains links to sites which may be of interest to LilyPond -users. - -@unnumberedsubsec Music - -@itemize @bullet -@item @uref{http://www.geocities.com/Vienna/Studio/1714/} and -@uref{http://johnsankey.webjump.com/} - John Sankey has taken up the task of recording classical - music, and distributing the results at no cost. -@item @uref{http://sca.uwaterloo.ca/Mutopia/} - Mutopia project (under construction). -@item @uref{http://www4.smart.net/~jcovey/scores/} - Jeff Covey's guitar music. -@item @uref{http://www.pbm.com/~lindahl/ravenscroft/modern} - Transcriptions of the music of Thomas Ravenscroft, partly using - LilyPond -@end itemize - -@unnumberedsubsec Software - -@itemize @bullet -@item @uref{http://www.zib.de/Visual/software/doc++/index.html} - A documentation system for C++ sources, which is used for the - LilyPond sources. -@item @uref{ http://sound.condorow.net} - Dave Philips' Linux sound applications page -@item @uref{http://www.home.fh-karlsruhe.de/~rost0001/web/musik/musik.html} - Stochastic composing using LilyPond -@end itemize - -@unnumberedsubsec Philosophy - -@itemize @bullet -@item @uref{http://www.gnu.org/} - LilyPond is part of the GNU Project. The GNU project is the name - of Richard Stallman's effort to create a freely available - system of software. -@item @uref{http://www.ram.org/ramblings/philosophy/fmp.html} - Musings on free music, plus hints how to record your own (free) music. -@end itemize - - -@bye diff --git a/Documentation/mail.texi b/Documentation/mail.texi index 7a6629630f..bd39936d83 100644 --- a/Documentation/mail.texi +++ b/Documentation/mail.texi @@ -6,51 +6,6 @@ @top - -For programs which are part of the GNU music project, the following -mailing list have been setup: - -@table @samp -@item info-gnu-music@@gnu.org - A moderated list for information on the GNU Music project, to - subscribe: send mail with subject "subscribe" to - info-gnu-music-request@@gnu.org. - - As this list is moderated, normal people should ask to - @email{drl@@gnu.org, David R. Linn} or - @email{hanwen@@cs.uu.nl, Han-Wen} to forward announces instead of - sending it to info-gnu-music@@gnu.org - -Since the GNU Music project currently only has LilyPond, this list is -mainly for announcing new versions of LilyPond. - -@uref{http://www.mail-archive.com/info-gnu-music@@gnu.org} - -@item help-gnu-music@@gnu.org - For help with programs from the GNU music project. To subscribe: send - mail with subject "subscribe" to - @email{help-gnu-music-request@@gnu.org} - - Since the GNU Music project currently only has LilyPond, this list is mainly about using and extending LilyPond. - - @uref{http://www.mail-archive.com/help-gnu-music@@gnu.org} - -@item bug-gnu-music@@gnu.org - If you have bugreports, you should send them to this list. If you want - to read all bugreports, you should subscribe to this list. To - subscribe: send mail with subject "subscribe" to - @email{bug-gnu-music-request@@gnu.org} - @uref{http://www.mail-archive.com/bug-gnu-music@@gnu.org} -@item gnu-music-discuss@@gnu.org, - For discussions concerning the GNU Music project, to subscribe: send - mail with subject "subscribe" to - @email{gnu-music-discuss-request@@gnu.org} - This list is archived at - @uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org} -@end table - -Announces of new versions will be sent to info-gnu-music and -gnu-music-discuss. - +The following mailing list have been setup for LilyPond. @bye diff --git a/Documentation/topdocs/INSTALL.texi b/Documentation/topdocs/INSTALL.texi index 05c7cb45b1..b0a5d56567 100644 --- a/Documentation/topdocs/INSTALL.texi +++ b/Documentation/topdocs/INSTALL.texi @@ -165,15 +165,16 @@ problem. You can then install the new pnmtopng into @file{/usr/local/bin/} -@item Bib2html @uref{http://pertsserver.cs.uiuc.edu/~hull/bib2html.,http://pertsserver.cs.uiuc.edu/~hull/bib2html.} +@item @uref{http://pertsserver.cs.uiuc.edu/~hull/bib2html,Bib2html}. Which, in turn depends on man2html for proper installation. man2html can be had from @uref{http://askdonald.ask.uni-karlsruhe.de/hppd/hpux/Networking/WWW/Man2html-1.05,http://askdonald.ask.uni-karlsruhe.de/hppd/hpux/Networking/WWW/Man2html-1.05}. The website will build without this utility, but you will not see our hypertextified bibliography. -@item Doc++ (optional) to read the source code. - +@item @uref{http://www.zib.de/Visual/software/doc++/index.html,DOC++} + A documentation system for C++ sources, which is used for the + LilyPond sources. @end itemize @section Configuring and compiling diff --git a/Documentation/topdocs/index.tely b/Documentation/topdocs/index.tely index b283504ec4..d6332d445a 100644 --- a/Documentation/topdocs/index.tely +++ b/Documentation/topdocs/index.tely @@ -15,16 +15,18 @@ @c something breaks on 3.12 f +LilyPond is a music typesetter. It produces beautiful sheet music using +a high level description file as input. It excels at typesetting +classical music, but you can also print pop-songs. With LilyPond we +hope to make music publication software available to anyone on the +internet. +The program also has limited MIDI functionality: you can write MIDI +files with lilypond, and we have a simple MIDI to lilypond conversion +tool, @file{midi2ly}. -LilyPond is a music typesetter. It produces beautiful sheet music -using a high level description file as input. LilyPond is part of -the GNU Project. - - - -@unnumberedsec Sheet music - +LilyPond is free software. It is licensed under GNU General Public +License, and it is part of the @uref{http://www.gnu.org/,GNU Project}. @quotation @@ -33,48 +35,103 @@ the GNU Project. @end mudela @end quotation -@itemize @bullet + -@item @uref{./input/out-www/index.html,Examples}: +The version numbers are in Linux-kernel style: even unnumbered versions +are `stable'. The webpages for the stable version reside at GNU, here: + @uref{http://www.gnu.org/software/lilypond}. Big enhancements go +into the odd numbered versions, whose webpages are on + @uref{http://www.cs.uu.nl/~hanwen/lilypond/,Han-Wen's site}. -simple pieces, tests and bugs. MIDI, PNG, PostScript, and Source. +If want more information, you can browse the +@uref{Documentation/user/out-www/lilypond.html, manual} or other +@uref{Documentation/out-www/index.html, documentation}. -@item @uref{./mutopia/out-www/index.html,Music in Mutopia}: -LilyPond handling real music. MIDI, view PNG, PostScript, and Source. -@end itemize +@unnumberedsec Mailing list -@unnumberedsec More information - +If you have questions do write to the mailing lists + (but don't forget to read the @uref{Documentation/out-www/faq.html, +Frequently Asked Questions} first: -@itemize @bullet -@item @uref{Documentation/out-www/index.html, Documentation} -@item @uref{Documentation/out-www/mail.html,Mailing Lists} -@item @uref{./docxx/index.html,Source code documentation} -@end itemize -@unnumberedsec Sites - +@table @samp +@item info-gnu-music@@gnu.org + is a moderated list for information on the GNU Music project, to + subscribe: send mail with subject "subscribe" to + info-gnu-music-request@@gnu.org. + + As this list is moderated, normal people should ask to + @email{drl@@gnu.org, David R. Linn} or + @email{hanwen@@cs.uu.nl, Han-Wen} to forward announces instead of + sending it to info-gnu-music@@gnu.org + + This list is archived at + @uref{http://www.mail-archive.com/info-gnu-music@@gnu.org} + +@item help-gnu-music@@gnu.org + For help with LilyPond music project. To subscribe: send + mail with subject "subscribe" to + @email{help-gnu-music-request@@gnu.org} The archive is at + @uref{http://www.mail-archive.com/help-gnu-music@@gnu.org}. + +@item bug-gnu-music@@gnu.org + If you have bugreports, you should send them to this list. If you +want to know about bugs, subscribe: send mail with subject "subscribe" to + @email{bug-gnu-music-request@@gnu.org}. The archive is at +@uref{http://www.mail-archive.com/bug-gnu-music@@gnu.org} +@item gnu-music-discuss@@gnu.org, + For discussions concerning LilyPond, to subscribe: send + mail with subject "subscribe" to + @email{gnu-music-discuss-request@@gnu.org} + The archive is at + @uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org} +@end table + +@unnumberedsec News + +For the latest and greatest features, check out the +@uref{Documentation/out-www/CHANGES.txt, Change Log}. + +@unnumberedsec Sheet music + + +If you are interested in sheet music typeset by LilyPond, have a look at +the examples included. We have @uref{./input/out-www/index.html,short +examples} and @uref{./mutopia/out-www/index.html,longer examples}. The +examples include sound bites in MIDI, pictures in PNG, printable scores +in PostScript, and LilyPond input. + +Other use LilyPond too. +@uref{http://www.geocities.com/Vienna/Studio/1714/harpsichord.html,John +Sankey}, harpsichordist to the internet, is typesetting the complete +@uref{http://www.geocities.com/Vienna/Studio/1714/scarlattidwn.html/,sonatas +by Scarlatti}. Jeff Covey, guitar player and overall nice guy, is +putting @uref{http://www4.smart.net/~jcovey/scores/,guitar music} on the +net. The @uref{http://sca.uwaterloo.ca/Mutopia/,Mutopia project} is a +large archive of public domain sheet music under construction. -@itemize @bullet -@item @uref{http://www.gnu.org/software/lilypond} LilyPond is part of the GNU -project. The webpages for the stable version reside at GNU. -@item @uref{http://www.cs.uu.nl/~hanwen/lilypond/} Han-Wen's site -has the development pages. -@end itemize @unnumberedsec Download +If you want to compile LilyPond from sources, download them here: @itemize @bullet -@item - Download development releases at +@item Download stable releases at +@uref{ftp://ftp.gnu.org/gnu/lilypond/} +@item Download development releases at @uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/development/} - @item Canadian mirror @uref{http://sca.uwaterloo.ca/lilypond/} and @uref{ftp://sca.uwaterloo.ca/pub/} +@item Another site in Europe +@uref{ftp://ftp.lilypond.org/pub/LilyPond/} +@end itemize + +Installing and compiling requires many additional packages, which are +listed in the @uref{Documentation/topdocs/out-www/INSTALL.html, installation instructions}. -@item Another site in Europe @uref{ftp://ftp.lilypond.org/pub/LilyPond/} +There are binaries available, but alas they are not updated for every version released. +@itemize @bullet @item RedHat i386 binary RPMs: @uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/RPMS/} diff --git a/INSTALL.txt b/INSTALL.txt index 847984f75a..9f8ab35a43 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -153,18 +153,18 @@ additional conversion tools. You can then install the new pnmtopng into `/usr/local/bin/' - * Bib2html http://pertsserver.cs.uiuc.edu/~hull/bib2html. - (http://pertsserver.cs.uiuc.edu/~hull/bib2html.) Which, in - turn depends on man2html for proper installation. man2html can be - had from + * Bib2html (http://pertsserver.cs.uiuc.edu/~hull/bib2html). + Which, in turn depends on man2html for proper installation. + man2html can be had from http://askdonald.ask.uni-karlsruhe.de/hppd/hpux/Networking/WWW/Man2html-1.05 (http://askdonald.ask.uni-karlsruhe.de/hppd/hpux/Networking/WWW/Man2html-1.05). The website will build without this utility, but you will not see our hypertextified bibliography. - * Doc++ (optional) to read the source code. - + * DOC++ (http://www.zib.de/Visual/software/doc++/index.html) A + documentation system for C++ sources, which is used for the + LilyPond sources. Configuring and compiling ========================= diff --git a/ROADMAP b/ROADMAP new file mode 100644 index 0000000000..3894dd5d9e --- /dev/null +++ b/ROADMAP @@ -0,0 +1,42 @@ + +Here is an attempt at a simple explanation of the directory layout for +LilyPond's source files. + + Documentation/ + bibliography/ .bib files with references to books and articles + ntweb/ building on NT + pictures/ .xpms of the logo + programmer/ programmers documentation, including a test document + topdocs/ sources for the toplevel files (README.txt, INSTALL.txt, etc.) + user/ User manuals + buildscripts/ Scripts used during the build process + debian/ Files for building .deb packages. + flower/ A generic library. + include/ + input/ Various input files + test/ Test features: one file per feature + bugs/ Show bugs + tutorial/ Examples from the tutorial + lily/ Source code for LilyPond + include/ + ly/ Standard include files. + make/ LilyPond specific Make subroutine files + mf/ MetaFont sources for the feta font + midi2ly/ midi2ly source code + include/ + mutopia/ Larger examples with full music pieces. + Coriolan/ + D.Zipoli/ + E.Satie/ + F.Schubert/ + Hymns/ + J.S.Bach/ + L.Mozart/ + N.W.Gade/ + W.A.Mozart/ + intl/ library for gettext + po/ translations + ps/ postscript library files + tex/ TeX library files + scripts/ User scripts + stepmake/ Generic make subroutine files diff --git a/TODO b/TODO index 04eebc905c..9d00e7270c 100644 --- a/TODO +++ b/TODO @@ -24,6 +24,7 @@ Grep -i for TODO, FIXME and ugh/ugr/urg. . * interstaff stems . * junk dstream output. . * Change website to be index to documentation. +. * \grace { c d } c1 in midi . * \prop slurdir in grace notes . * \eltproperty "=Context" "Elt_name" "prop-name" #value . * script columns @@ -36,6 +37,7 @@ verse=\lyrics { . * \accepts -> \acceptedby . * context in embedded SCM errors. . * acc at tied note after linebreak. +. * fontSize for time sigs and beams. . * fix font-naming and selecting . * add context information to warnings Paper: @@ -147,18 +149,6 @@ of the grace notes and extend to the note after the grace notes. . * don't shorten stems/staffs closer to each other. . * to space the staffs/staffgroups contained in the score. . * heavier beams? - -. * tuplets that are written as "number : note", for example - "3 : [image of a half note here]". possible? -. * a note with a circle after it, meaning: - - note + circle = note + 1/4 of its length - - the circle is like a dot that's not filled in. for example, on - page three, the c-sharp on the second line should be a quarter with - a circle, not a quarter tied to a sixteenth. is this at all - possible with lily? -. * deprecate hangOnClef. . * Abstraction for engravers: . * make "in-between" engraver (Tie) . * make wide_spanner_engraver (line_group_spanner, staff_symbol) @@ -415,10 +405,6 @@ languages: . * Glissando . * trill -. * Collisions -. * left/right note balls should be handled by Collision: - < \multi 2; { \stem 1; } { } > - . * Keys: . * merge key{item} & localkey{item}? . * spacing diff --git a/VERSION b/VERSION index 36db9aa7b4..3be69d6a1b 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=23 -MY_PATCH_LEVEL=jcn1 +PATCH_LEVEL=24 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/lib/include/file-storage.hh b/flower/include/file-storage.hh similarity index 100% rename from lib/include/file-storage.hh rename to flower/include/file-storage.hh diff --git a/lib/include/input.hh b/flower/include/input.hh similarity index 100% rename from lib/include/input.hh rename to flower/include/input.hh diff --git a/lib/include/mapped-file-storage.hh b/flower/include/mapped-file-storage.hh similarity index 100% rename from lib/include/mapped-file-storage.hh rename to flower/include/mapped-file-storage.hh diff --git a/lib/include/proto.hh b/flower/include/proto.hh similarity index 100% rename from lib/include/proto.hh rename to flower/include/proto.hh diff --git a/lib/include/simple-file-storage.hh b/flower/include/simple-file-storage.hh similarity index 100% rename from lib/include/simple-file-storage.hh rename to flower/include/simple-file-storage.hh diff --git a/lib/include/warn.hh b/flower/include/warn.hh similarity index 100% rename from lib/include/warn.hh rename to flower/include/warn.hh diff --git a/lib/input.cc b/flower/input.cc similarity index 100% rename from lib/input.cc rename to flower/input.cc diff --git a/lib/mapped-file-storage.cc b/flower/mapped-file-storage.cc similarity index 100% rename from lib/mapped-file-storage.cc rename to flower/mapped-file-storage.cc diff --git a/lib/simple-file-storage.cc b/flower/simple-file-storage.cc similarity index 100% rename from lib/simple-file-storage.cc rename to flower/simple-file-storage.cc diff --git a/lib/source.cc b/flower/source.cc similarity index 100% rename from lib/source.cc rename to flower/source.cc diff --git a/lib/warn.cc b/flower/warn.cc similarity index 100% rename from lib/warn.cc rename to flower/warn.cc diff --git a/input/test/diverse-spacing.ly b/input/test/diverse-spacing.ly new file mode 100644 index 0000000000..6aa560976c --- /dev/null +++ b/input/test/diverse-spacing.ly @@ -0,0 +1,14 @@ + +% a few 32nds shouldn't stretch spacing enormously. +\score { +\notes { \time 3/4; +\relative c'{ + g'8. c16 es8. d16 c8. bes32 as g8. c,16 + es4 r8 es | + [d es f g as c ] + b4 g r +} + +} +\paper { linewidth = -1.0; } +} diff --git a/input/test/mm-rests2.ly b/input/test/mm-rests2.ly index dc5adffbed..eb90cbd8b1 100644 --- a/input/test/mm-rests2.ly +++ b/input/test/mm-rests2.ly @@ -16,6 +16,6 @@ R1*11 | } \score { < \context Staff \thenotes - \context NoteNames \thenotes + > } diff --git a/input/test/multi-measure-rest.ly b/input/test/multi-measure-rest.ly index 57b51f116a..c0e477979c 100644 --- a/input/test/multi-measure-rest.ly +++ b/input/test/multi-measure-rest.ly @@ -1,5 +1,6 @@ -\score { \notes { \time 3/4; \key cis; R2.*5 R2. R2.*5 } +\score { \notes { \time 3/4; \key cis; + R2.*15 R2. R2.*7 } \paper { \translator { \ScoreContext diff --git a/input/test/slur-dash.ly b/input/test/slur-dash.ly index d6e63b23d0..45fc046019 100644 --- a/input/test/slur-dash.ly +++ b/input/test/slur-dash.ly @@ -7,7 +7,7 @@ c( d e )c | \slurnormal c( d e )c | - \property Voice.slurDash = 3 + \property Voice.slurDash = #0.0 c( d e )c | \slurnormal c( d e )c | diff --git a/lib/GNUmakefile b/lib/GNUmakefile deleted file mode 100644 index d9e0c99203..0000000000 --- a/lib/GNUmakefile +++ /dev/null @@ -1,16 +0,0 @@ -# lib/Makefile - -depth = .. - -NAME = lily -SUBDIRS = include -# MODULE_LIBS= $(depth)/flower -MODULE_CXXFLAGS += -D_REENTRANT -STEPMAKE_TEMPLATES=library c++ po - -include $(depth)/make/stepmake.make - - -bla: - echo $(ALL_C_SOURCES) - echo $(ALL_C_SOURCES) diff --git a/lib/include/GNUmakefile b/lib/include/GNUmakefile deleted file mode 100644 index 7dccdbc530..0000000000 --- a/lib/include/GNUmakefile +++ /dev/null @@ -1,9 +0,0 @@ -# lib/include/Makefile - -depth = ../.. -STEPMAKE_TEMPLATES=c++ - -include $(depth)/make/stepmake.make - - - diff --git a/lily/GNUmakefile b/lily/GNUmakefile index 29df520062..37456760c9 100644 --- a/lily/GNUmakefile +++ b/lily/GNUmakefile @@ -6,8 +6,8 @@ depth = .. NAME = lilypond SUBDIRS = include -MODULE_LIBS=$(depth)/lib $(depth)/flower -MODULE_INCLUDES=$(depth)/lib/include $(depth)/flower/include +MODULE_LIBS=$(depth)/flower +MODULE_INCLUDES= $(depth)/flower/include MODULE_CXXFLAGS= HELP2MAN_EXECS = lilypond diff --git a/lily/align-note-column-engraver.cc b/lily/align-note-column-engraver.cc index a5e3c57bb8..f1ce54bfc8 100644 --- a/lily/align-note-column-engraver.cc +++ b/lily/align-note-column-engraver.cc @@ -13,6 +13,7 @@ #include "local-key-item.hh" #include "warn.hh" #include "directional-element-interface.hh" +#include "side-position-interface.hh" /** Catch notes, and put them in a row. Used for aligning grace notes. @@ -44,6 +45,8 @@ void Align_note_column_engraver::do_creation_processing () { align_item_p_ = new Grace_align_item; + side_position (align_item_p_).set_axis (X_AXIS); + side_position (align_item_p_).set_direction (LEFT); // needed for setting font size. announce_element (Score_element_info (align_item_p_, 0)); } diff --git a/lily/bar-script-engraver.cc b/lily/bar-script-engraver.cc index 0902c377e7..98d4c92fdf 100644 --- a/lily/bar-script-engraver.cc +++ b/lily/bar-script-engraver.cc @@ -16,13 +16,14 @@ #include "paper-column.hh" #include "paper-def.hh" #include "dimension-cache.hh" - +#include "staff-symbol-referencer.hh" +#include "side-position-interface.hh" +#include "staff-symbol.hh" Bar_script_engraver::Bar_script_engraver () { axis_ = Y_AXIS; text_p_ =0; - visibility_lambda_ = ly_eval_str ("non-postbreak-visibility"); } @@ -101,6 +102,11 @@ Bar_script_engraver::do_pre_move_processing () { if (text_p_) { + Staff_symbol * st = staff_symbol_referencer (text_p_).staff_symbol_l(); + + if (st) + side_position (text_p_).add_support (st); + typeset_element (text_p_); text_p_ =0; } diff --git a/lily/beam.cc b/lily/beam.cc index 6dc4bb25c4..33f354eb26 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -93,7 +93,6 @@ Beam::do_pre_processing () auto_knees (); set_stem_directions (); - set_stem_shorten (); } diff --git a/lily/bezier-bow.cc b/lily/bezier-bow.cc index 65eadb6193..0cfd5a070e 100644 --- a/lily/bezier-bow.cc +++ b/lily/bezier-bow.cc @@ -14,6 +14,7 @@ #include "direction.hh" #include "debug.hh" #include "main.hh" +#include "lily-guile.hh" void flipy (Array &c) @@ -52,10 +53,23 @@ Bezier_bow::Bezier_bow (Array points, Direction dir) void Bezier_bow::blow_fit () { - Real f = fit_factor (); + Real len = curve_.control_[3][X_AXIS] ; + Real ind = curve_.control_[1][X_AXIS] / len; + Real h = curve_.control_[1][Y_AXIS] * fit_factor () / len; + + // ugh. Unhardcode this + if (h > 4 * ind) + { + h = 4* ind; + } + + if (h > 0.8 + -2 * ind) + { + h = 0.8 - 2 *ind; + } - curve_.control_[1][Y_AXIS] *= f; - curve_.control_[2][Y_AXIS] *= f; + curve_.control_[1][Y_AXIS] = h * len; + curve_.control_[2][Y_AXIS] = h * len; curve_.check_sanity (); } @@ -63,13 +77,16 @@ Bezier_bow::blow_fit () void Bezier_bow::calculate () { - calc_default (0.0); + calc_default (); if (fit_factor () > 1.0) { - calc_tangent_controls (); + // calc_tangent_controls (); blow_fit (); } } + + + Bezier Bezier_bow::get_curve ()const { @@ -81,6 +98,7 @@ Bezier_bow::get_curve ()const rv.rotate (alpha_); rv.translate (origin_); + return rv; } @@ -248,7 +266,7 @@ Bezier_bow::to_canonic_form () See Documentation/fonts.tex */ void -Bezier_bow::calc_default (Real h) +Bezier_bow::calc_default () { Real pi = M_PI; @@ -260,7 +278,7 @@ Bezier_bow::calc_default (Real h) Real b = delta.length (); Real indent = alpha * atan (beta * b); - Real height = indent + h; + Real height = indent; curve_.control_ [0] = Offset (0, 0); curve_.control_ [1] = Offset (indent, height); @@ -269,3 +287,4 @@ Bezier_bow::calc_default (Real h) } + diff --git a/lily/dot-column-engraver.cc b/lily/dot-column-engraver.cc index 88108cbea8..675574b034 100644 --- a/lily/dot-column-engraver.cc +++ b/lily/dot-column-engraver.cc @@ -10,6 +10,7 @@ #include "dot-column-engraver.hh" #include "rhythmic-head.hh" #include "dot-column.hh" +#include "side-position-interface.hh" Dot_column_engraver::Dot_column_engraver () { @@ -40,6 +41,8 @@ Dot_column_engraver::acknowledge_element (Score_element_info info) if (!dotcol_p_) { dotcol_p_ = new Dot_column; + side_position (dotcol_p_).set_axis (X_AXIS); + side_position (dotcol_p_).set_direction (RIGHT); announce_element (Score_element_info (dotcol_p_, 0)); } diff --git a/lily/dot-column.cc b/lily/dot-column.cc index 61d1c771f2..2e80a913bc 100644 --- a/lily/dot-column.cc +++ b/lily/dot-column.cc @@ -12,6 +12,7 @@ #include "group-interface.hh" #include "staff-symbol-referencer.hh" #include "directional-element-interface.hh" +#include "side-position-interface.hh" void Dot_column::add_dots (Dots *d) @@ -29,7 +30,7 @@ Dot_column::add_head (Rhythmic_head *r) if (!r->dots_l ()) return ; - add_support (r); + side_position (this).add_support (r); add_dots (r->dots_l ()); } @@ -39,7 +40,6 @@ Dot_column::compare (Dots * const &d1, Dots * const &d2) { Staff_symbol_referencer_interface s1(d1); Staff_symbol_referencer_interface s2(d2); - return int (s1.position_f () - s2.position_f ()); } diff --git a/lily/grace-align-item.cc b/lily/grace-align-item.cc index ed1989cd9b..0256679458 100644 --- a/lily/grace-align-item.cc +++ b/lily/grace-align-item.cc @@ -29,8 +29,6 @@ Grace_align_item::do_pre_processing () Axis_align_item::do_pre_processing (); - Note_head_side::do_pre_processing (); - translate_axis (-0.5* nhw, X_AXIS); // ugh. } diff --git a/lily/grace-position-engraver.cc b/lily/grace-position-engraver.cc index 1b9fe9534f..e1e49f466a 100644 --- a/lily/grace-position-engraver.cc +++ b/lily/grace-position-engraver.cc @@ -13,6 +13,7 @@ #include "local-key-item.hh" #include "paper-column.hh" #include "dimension-cache.hh" +#include "side-position-interface.hh" class Grace_position_engraver:public Engraver { @@ -63,7 +64,7 @@ Grace_position_engraver::process_acknowledged () if (align_l_) { for (int i=0; i < support_.size (); i++) - align_l_->add_support (support_[i]); + side_position (align_l_).add_support (support_[i]); support_.clear (); } } @@ -71,6 +72,8 @@ Grace_position_engraver::process_acknowledged () void Grace_position_engraver::do_pre_move_processing () { + if (align_l_ && !side_position (align_l_).supported_b ()) + { /* We don't have support. Either some moron tried attaching us to a rest, or we're at the end of the piece. In the latter case, we have a @@ -80,8 +83,7 @@ Grace_position_engraver::do_pre_move_processing () Solution: attach ourselves to the last musical column known. A little intricate. */ - if (align_l_ && !align_l_->supported_b ()) - { + Score_element * elt = align_l_->parent_l (X_AXIS); if (elt) return; diff --git a/lily/include/bezier-bow.hh b/lily/include/bezier-bow.hh index 8734471e5e..903088dece 100644 --- a/lily/include/bezier-bow.hh +++ b/lily/include/bezier-bow.hh @@ -12,7 +12,7 @@ #include "bezier.hh" #include "lily-proto.hh" - +#include "lily-guile.hh" /** Implement bow specific bezier curve. Calculate bezier curve for bow @@ -21,9 +21,9 @@ class Bezier_bow { Bezier curve_; Array encompass_; - + void blow_fit (); - void calc_default (Real h); + void calc_default (); void to_canonic_form (); void calc_tangent_controls (); Real fit_factor () const; @@ -34,11 +34,15 @@ class Bezier_bow Real alpha_; Offset origin_; public: - Real rc_factor_, - height_limit_, - ratio_; + Real rc_factor_; + Real height_limit_; + Real ratio_; + Real vertical_offset_needed () const; + + + SCM ugly_scm () const; Bezier_bow (Array points, Direction dir); void calculate (); Bezier get_curve () const; diff --git a/lily/include/dot-column.hh b/lily/include/dot-column.hh index 78caaf839d..de7d522f05 100644 --- a/lily/include/dot-column.hh +++ b/lily/include/dot-column.hh @@ -11,12 +11,12 @@ #define DOT_COLUMN_HH #include "axis-group-item.hh" -#include "note-head-side.hh" + /** Group dots. This is needed because, the dots have to be aligned per voice */ -class Dot_column : public Axis_group_item, public Note_head_side +class Dot_column : public Axis_group_item { static int compare (Dots * const&,Dots * const&); void add_dots (Dots*); diff --git a/lily/include/grace-align-item.hh b/lily/include/grace-align-item.hh index 9780c3f818..ee8d0ce6f2 100644 --- a/lily/include/grace-align-item.hh +++ b/lily/include/grace-align-item.hh @@ -10,10 +10,10 @@ #ifndef GRACE_ALIGN_ITEM_HH #define GRACE_ALIGN_ITEM_HH -#include "note-head-side.hh" + #include "axis-align-item.hh" -class Grace_align_item : public Axis_align_item, public Note_head_side +class Grace_align_item : public Axis_align_item { public: VIRTUAL_COPY_CONS (Score_element); diff --git a/lily/include/local-key-engraver.hh b/lily/include/local-key-engraver.hh index a42051d7cc..cf4cf305e5 100644 --- a/lily/include/local-key-engraver.hh +++ b/lily/include/local-key-engraver.hh @@ -8,36 +8,4 @@ #ifndef LOCALKEYGRAV_HH #define LOCALKEYGRAV_HH -#include "engraver.hh" -#include "key.hh" -#include "parray.hh" -/** - Make accidentals. Catches note heads, ties and notices key-change - events. Due to interaction with ties (which don't come together - with note heads), this needs to be in a context higher than Tie_engraver. - (FIXME). - */ -struct Local_key_engraver : Engraver { - Local_key_item *key_item_p_; -protected: - VIRTUAL_COPY_CONS(Translator); - virtual void do_process_requests(); - virtual void acknowledge_element (Score_element_info); - virtual void do_pre_move_processing(); - virtual void do_creation_processing (); - virtual void process_acknowledged (); - virtual void do_removal_processing (); -public: - - Key local_key_; - Key_engraver *key_grav_l_; - Array mel_l_arr_; - Array support_l_arr_; - Link_array forced_l_arr_; - Link_array tied_l_arr_; - Local_key_engraver(); - bool self_grace_b_; - Grace_align_item * grace_align_l_; -}; - #endif // LOCALKEYGRAV_HH diff --git a/lily/include/local-key-item.hh b/lily/include/local-key-item.hh index 626af84454..b1d20b3ac4 100644 --- a/lily/include/local-key-item.hh +++ b/lily/include/local-key-item.hh @@ -10,7 +10,7 @@ #include "array.hh" #include "musical-pitch.hh" -#include "note-head-side.hh" + struct Local_key_cautionary_tuple { @@ -40,13 +40,13 @@ struct Local_key_cautionary_tuple */ -class Local_key_item : public Note_head_side +class Local_key_item : public Item { Array accidental_arr_; Molecule accidental (int,bool,bool) const; public: - Local_key_item (); + void add_pitch (Musical_pitch, bool cautionary, bool natural); protected: virtual void do_pre_processing(); diff --git a/lily/include/lookup.hh b/lily/include/lookup.hh index 5b83aef91e..d86f04e62a 100644 --- a/lily/include/lookup.hh +++ b/lily/include/lookup.hh @@ -34,7 +34,6 @@ public: Molecule ledger_line (Interval) const; Molecule fill (Box b) const; Molecule filledbox (Box b) const; - Molecule tuplet_bracket (Real dy, Real dx, Real gap, Real thick,Real height, Direction dir) const; Molecule accordion (SCM arg, Real interline_f) const; Molecule slur (Bezier controls, Real cthick, Real thick) const; Molecule text (String style, String text, Paper_def*) const; diff --git a/lily/include/multi-measure-rest.hh b/lily/include/multi-measure-rest.hh index adf3c718d8..b86e566146 100644 --- a/lily/include/multi-measure-rest.hh +++ b/lily/include/multi-measure-rest.hh @@ -17,9 +17,9 @@ class Multi_measure_rest : public Spanner { public: Multi_measure_rest (); - int measures_i_; - void add_column (Item*); + void add_column (Item*); + Molecule compound_rest (int)const; protected: virtual Molecule *do_brew_molecule_p () const; VIRTUAL_COPY_CONS (Score_element); diff --git a/lily/include/note-head-side.hh b/lily/include/note-head-side.hh index 3e94b475d2..65296f8106 100644 --- a/lily/include/note-head-side.hh +++ b/lily/include/note-head-side.hh @@ -1,29 +1,2 @@ -/* - note-head-side.hh -- declare Note_head_side - - source file of the GNU LilyPond music typesetter - - (c) 1999 Han-Wen Nienhuys - - */ - -#ifndef NOTE_HEAD_SIDE_HH -#define NOTE_HEAD_SIDE_HH - -#include "item.hh" - -/** - be next to noteheads. - */ -class Note_head_side: public virtual Item -{ -public: - Note_head_side (); - bool supported_b () const; - void add_support (Item*); - VIRTUAL_COPY_CONS (Score_element); -}; - - -#endif /* NOTE_HEAD_SIDE_HH */ +#error diff --git a/lily/include/paper-def.hh b/lily/include/paper-def.hh index 37e35c1b66..e4f608088d 100644 --- a/lily/include/paper-def.hh +++ b/lily/include/paper-def.hh @@ -77,13 +77,6 @@ public: Lookup const * lookup_l (int sz) const; // TODO naming - /** convert a duration to an idealspacing - influence using the geometric_ and paratime_signatures. - */ - Real length_mom_to_dist (Moment, Real) const; - - Real arithmetic_constant (Moment minimal_mom) const; - Real arithmetic_spacing (Moment mom,Real constant) const; virtual int get_next_default_count () const; static void reset_default_count(); diff --git a/lily/include/spacing-spanner.hh b/lily/include/spacing-spanner.hh index a5c5420bd5..eb3a0eb1a8 100644 --- a/lily/include/spacing-spanner.hh +++ b/lily/include/spacing-spanner.hh @@ -25,7 +25,8 @@ protected: Real stem_dir_correction (Paper_column*,Paper_column*) const; Real default_bar_spacing (Paper_column*,Paper_column*,Moment) const; - Real note_spacing (Paper_column*,Paper_column*,Moment) const; + Real note_spacing (Paper_column*,Paper_column*,Moment) const; + Real get_duration_space (Moment dur, Moment shortest) const; }; #endif /* SPACING_SPANNER_HH */ diff --git a/lily/include/time-signature.hh b/lily/include/time-signature.hh index e09572632f..4d02f04693 100644 --- a/lily/include/time-signature.hh +++ b/lily/include/time-signature.hh @@ -18,7 +18,11 @@ C style time_signatures, 2+3+2/8 time_signatures, alla breve. */ -class Time_signature: public Item { +class Time_signature: public Item +{ + Molecule special_time_signature (String,int,int) const; + Molecule time_signature (int, int)const; + protected: virtual Molecule*do_brew_molecule_p() const; public: diff --git a/lily/local-key-engraver.cc b/lily/local-key-engraver.cc index 8ac7cfaf73..6edf683cf6 100644 --- a/lily/local-key-engraver.cc +++ b/lily/local-key-engraver.cc @@ -18,12 +18,50 @@ #include "engraver-group-engraver.hh" #include "grace-align-item.hh" #include "staff-symbol-referencer.hh" +#include "side-position-interface.hh" +#include "engraver.hh" +#include "key.hh" +#include "parray.hh" + + +/** + Make accidentals. Catches note heads, ties and notices key-change + events. Due to interaction with ties (which don't come together + with note heads), this needs to be in a context higher than Tie_engraver. + (FIXME). + */ +struct Local_key_engraver : Engraver { + Local_key_item *key_item_p_; +protected: + VIRTUAL_COPY_CONS(Translator); + virtual void do_process_requests(); + virtual void acknowledge_element (Score_element_info); + virtual void do_pre_move_processing(); + virtual void do_creation_processing (); + virtual void process_acknowledged (); + virtual void do_removal_processing (); +public: + + Key local_key_; + Key_engraver *key_grav_l_; + Array mel_l_arr_; + Array support_l_arr_; + Link_array forced_l_arr_; + Link_array tied_l_arr_; + Local_key_engraver(); + bool self_grace_b_; + Grace_align_item * grace_align_l_; + Timing_translator * time_trans_l_ ; +}; + + Local_key_engraver::Local_key_engraver() { key_grav_l_ = 0; key_item_p_ =0; grace_align_l_ =0; + time_trans_l_ = 0; } void @@ -33,7 +71,7 @@ Local_key_engraver::do_creation_processing () UGHGUHGUH. Breaks if Key_engraver is removed from under us. - */ + */ Translator * result = daddy_grav_l()->get_simple_translator ("Key_engraver"); @@ -53,67 +91,71 @@ Local_key_engraver::do_creation_processing () TODO (if we are grace) get key info from parent Local_key_engraver */ + + Translator * tr = daddy_grav_l()->get_simple_translator ("Timing_engraver"); // ugh + time_trans_l_ = dynamic_cast (tr); } void Local_key_engraver::process_acknowledged () { - if (!key_item_p_ && mel_l_arr_.size()) + if (!key_item_p_ && mel_l_arr_.size()) { - SCM f = get_property ("forgetAccidentals",0); - bool forget = to_boolean (f); - for (int i=0; i < mel_l_arr_.size(); i++) + SCM f = get_property ("forgetAccidentals",0); + bool forget = to_boolean (f); + for (int i=0; i < mel_l_arr_.size(); i++) + { + Item * support_l = support_l_arr_[i]; + Note_req * note_l = mel_l_arr_[i]; + + /* see if there's a tie that "changes" the accidental */ + /* works because if there's a tie, the note to the left + is of the same pitch as the actual note */ + bool tie_changes = tied_l_arr_.find_l (support_l) + && !local_key_.different_acc (note_l->pitch_); + + if (!forget + + && ((note_l->forceacc_b_ + || !local_key_.different_acc (note_l->pitch_) + || local_key_.internal_forceacc (note_l->pitch_))) + + && !tie_changes) { - Item * support_l = support_l_arr_[i]; - Note_req * note_l = mel_l_arr_[i]; - - /* see if there's a tie that "changes" the accidental */ - /* works because if there's a tie, the note to the left - is of the same pitch as the actual note */ - bool tie_changes = tied_l_arr_.find_l (support_l) - && !local_key_.different_acc (note_l->pitch_); - - if (!forget - - && ((note_l->forceacc_b_ - || !local_key_.different_acc (note_l->pitch_) - || local_key_.internal_forceacc (note_l->pitch_))) - - && !tie_changes) - { - if (!key_item_p_) - { - key_item_p_ = new Local_key_item; - Staff_symbol_referencer_interface si(key_item_p_); - si.set_interface (); + if (!key_item_p_) + { + key_item_p_ = new Local_key_item; + side_position (key_item_p_).set_axis (X_AXIS); + side_position (key_item_p_).set_direction (LEFT); + staff_symbol_referencer(key_item_p_).set_interface (); - announce_element (Score_element_info (key_item_p_, 0)); - } + announce_element (Score_element_info (key_item_p_, 0)); + } - key_item_p_->add_pitch (note_l->pitch_, + key_item_p_->add_pitch (note_l->pitch_, note_l->cautionary_b_, - local_key_.double_to_single_acc(note_l->pitch_)); - key_item_p_->add_support (support_l); - } + local_key_.double_to_single_acc(note_l->pitch_)); + side_position (key_item_p_).add_support (support_l); + } - if (!forget) - { - local_key_.set (note_l->pitch_); - if (!tied_l_arr_.find_l (support_l)) - { - local_key_.clear_internal_forceacc (note_l->pitch_); - } - else if (tie_changes) - { - local_key_.set_internal_forceacc (note_l->pitch_); - } - } + if (!forget) + { + local_key_.set (note_l->pitch_); + if (!tied_l_arr_.find_l (support_l)) + { + local_key_.clear_internal_forceacc (note_l->pitch_); + } + else if (tie_changes) + { + local_key_.set_internal_forceacc (note_l->pitch_); + } + } } } - if (key_item_p_ && grace_align_l_) + if (key_item_p_ && grace_align_l_) { - grace_align_l_->add_support (key_item_p_); - grace_align_l_ =0; + side_position (grace_align_l_).add_support (key_item_p_); + grace_align_l_ =0; } } @@ -130,7 +172,7 @@ Local_key_engraver::do_pre_move_processing() if (key_item_p_) { for (int i=0; i < support_l_arr_.size(); i++) - key_item_p_->add_support (support_l_arr_[i]); + side_position (key_item_p_).add_support (support_l_arr_[i]); typeset_element (key_item_p_); key_item_p_ =0; @@ -169,7 +211,7 @@ Local_key_engraver::acknowledge_element (Score_element_info info) mel_l_arr_.push (note_l); support_l_arr_.push (note_head); } - else if (Tie * tie_l = dynamic_cast (info.elem_l_)) + else if (Tie * tie_l = dynamic_cast (info.elem_l_)) { tied_l_arr_.push (tie_l->head (RIGHT)); } @@ -178,14 +220,9 @@ Local_key_engraver::acknowledge_element (Score_element_info info) void Local_key_engraver::do_process_requests() { - Translator * tr = daddy_grav_l()->get_simple_translator ("Timing_engraver"); // ugh - Timing_translator * time_C_ = dynamic_cast (tr); - - if (time_C_ && !time_C_->measure_position ()) + if (time_trans_l_ && !time_trans_l_->measure_position ()) { - SCM n = get_property ("noResetKey",0); - bool no_res = to_boolean (n); - if (!no_res && key_grav_l_) + if (!to_boolean (get_property ("noResetKey",0)) && key_grav_l_) local_key_= key_grav_l_->key_; } else if (key_grav_l_ && key_grav_l_->key_changed_b ()) diff --git a/lily/local-key-item.cc b/lily/local-key-item.cc index 7541177600..d18824b443 100644 --- a/lily/local-key-item.cc +++ b/lily/local-key-item.cc @@ -8,16 +8,12 @@ #include "local-key-item.hh" #include "molecule.hh" #include "staff-symbol-referencer.hh" - #include "lookup.hh" #include "paper-def.hh" #include "musical-request.hh" #include "note-head.hh" #include "misc.hh" -Local_key_item::Local_key_item () -{ -} void Local_key_item::add_pitch (Musical_pitch p, bool cautionary, bool natural) @@ -40,7 +36,6 @@ void Local_key_item::do_pre_processing() { accidental_arr_.sort (Local_key_cautionary_tuple::compare); - Note_head_side::do_pre_processing (); } Molecule @@ -49,9 +44,9 @@ Local_key_item::accidental (int j, bool cautionary, bool natural) const Molecule m (lookup_l ()->afm_find (String ("accidentals-") + to_str (j))); if (natural) { - Molecule prefix = lookup_l ()->afm_find (String ("accidentals-0")); - m.add_at_edge(X_AXIS, LEFT, Molecule(prefix), 0); - } + Molecule prefix = lookup_l ()->afm_find (String ("accidentals-0")); + m.add_at_edge(X_AXIS, LEFT, Molecule(prefix), 0); + } if (cautionary) { Molecule open = lookup_l ()->afm_find (String ("accidentals-(")); diff --git a/lily/lookup.cc b/lily/lookup.cc index afcd03b804..9e8586ee2b 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -240,10 +240,10 @@ Lookup::dashed_slur (Bezier b, Real thick, Real dash) const } Atom *at = new Atom(gh_list (ly_symbol2scm ("dashed-slur"), - gh_double2scm (thick), - gh_double2scm (dash), - ly_quote_scm (l), - SCM_UNDEFINED)); + gh_double2scm (thick), + gh_double2scm (dash), + ly_quote_scm (l), + SCM_UNDEFINED)); Molecule m; m.add_atom (at->self_scm_); return m; @@ -261,26 +261,6 @@ Lookup::fill (Box b) const } - -Molecule -Lookup::special_time_signature (String s, int n, int d, Paper_def*pap) const -{ - // First guess: s contains only the signature style - String symbolname = "timesig-" + s + to_str (n) + "/" + to_str (d); - - Molecule m = afm_find (symbolname, false); - if (!m.empty_b()) - return m; - - // Second guess: s contains the full signature name - m = afm_find ("timesig-"+s, false); - if (!m.empty_b ()) - return m; - - // Resort to default layout with numbers - return time_signature (n,d,pap); -} - Molecule Lookup::filledbox (Box b ) const { @@ -403,29 +383,6 @@ Lookup::text (String style, String text, Paper_def *paper_l) const - -Molecule -Lookup::time_signature (int num, int den, Paper_def *paper_l) const -{ - String sty = "number"; - Molecule n (text (sty, to_str (num), paper_l)); - Molecule d (text (sty, to_str (den), paper_l)); - n.align_to (X_AXIS, CENTER); - d.align_to (X_AXIS, CENTER); - Molecule m; - if (den) - { - m.add_at_edge (Y_AXIS, UP, n, 0.0); - m.add_at_edge (Y_AXIS, DOWN, d, 0.0); - } - else - { - m = n; - m.align_to (Y_AXIS, CENTER); - } - return m; -} - Molecule Lookup::staff_brace (Real y, int staff_size) const { @@ -451,26 +408,6 @@ Lookup::staff_brace (Real y, int staff_size) const } - -Molecule -Lookup::tuplet_bracket (Real dy , Real dx, Real thick, Real gap, - Real height, Direction dir) const -{ - Molecule m; - - Atom *at = new Atom (gh_list(ly_symbol2scm ("tuplet"), - gh_double2scm (height), - gh_double2scm (gap), - gh_double2scm (dx), - gh_double2scm (dy), - gh_double2scm (thick), - gh_int2scm (dir), - SCM_UNDEFINED)); - m.add_atom (at->self_scm_); - - return m; -} - /* Make a smooth curve along the points */ diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 4427d7aa9a..d34a75adbd 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -163,8 +163,9 @@ Multi_measure_rest_engraver::do_post_move_processing () if (mmrest_p_ && !time->measure_position ()) { lastrest_p_ = mmrest_p_; - lastrest_p_->measures_i_ - = gh_scm2int (time->get_property ("currentBarNumber", 0)) - start_measure_i_; + int cur = gh_scm2int (time->get_property ("currentBarNumber", 0)); + lastrest_p_->set_elt_property ("measure-count", + gh_int2scm (cur - start_measure_i_)); mmrest_p_ = 0; } } diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index ea462cee20..2b5ff1ac50 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -22,22 +22,20 @@ Multi_measure_rest::Multi_measure_rest () { - measures_i_ = 0; set_elt_property ("columns", SCM_EOL); } /* - [TODO] 17 + [TODO] 17 * variable-sized multi-measure rest symbol: |====| ?? - - * build 3, 5, 6, 7, 8 symbols (how far, property?) - from whole, brevis and longa rests - */ Molecule* Multi_measure_rest::do_brew_molecule_p () const { + Real staff_space + = staff_symbol_referencer (this).staff_space (); + Interval sp_iv; Direction d = LEFT; do @@ -67,17 +65,53 @@ Multi_measure_rest::do_brew_molecule_p () const Molecule s; - bool rest_symbol=true; - SCM alt_symbol_sym =get_elt_property ("alt-symbol"); - if (gh_string_p (alt_symbol_sym)) + + int measures = 1; + SCM m (get_elt_property ("measure-count")); + if (gh_number_p (m)) { - s = lookup_l () -> afm_find (ly_scm2string (alt_symbol_sym)); - rest_symbol = false; + measures = gh_scm2int (m); } - else if (measures_i_ == 1 || measures_i_ == 2 || measures_i_ == 4) + + + if (measures <= paper_l() ->get_var ("multi_measure_rest_expand_limit")) { - s = lookup_l ()->afm_find ("rests-" + to_str (- intlog2(measures_i_))); - s.translate_axis (-s.extent ()[X_AXIS].length () / 2, X_AXIS); + /* + Build a rest from smaller parts. Distances inbetween are + really variable, see Wanske pp. 125 */ + + int l = measures; + while (l) + { + int k; + if (l >= 4) + { + l-=4; + k = -2; + } + else if (l>= 2) + { + l -= 2; + k = -1; + } + else + { + k = 0; + l --; + } + + Real pad = s.empty_b () + ? 0.0 : paper_l ()->get_var ("multi_measure_rest_padding"); + + Molecule r (lookup_l ()->afm_find ("rests-" + to_str (k))); + if (k == 0) + r.translate_axis (staff_space, Y_AXIS); + + s.add_at_edge (X_AXIS, RIGHT, r, pad); + } + + + s.align_to (X_AXIS, CENTER); } else { @@ -86,15 +120,10 @@ Multi_measure_rest::do_brew_molecule_p () const } mol_p->add_molecule (s); - Real staff_space - = staff_symbol_referencer (this).staff_space (); - if (measures_i_ == 1 && rest_symbol) - { - mol_p->translate_axis (staff_space, Y_AXIS); - } - else if (measures_i_ > 1) + + if (measures > 1) { - Molecule s (lookup_l ()->text ("number", to_str (measures_i_), paper_l ())); + Molecule s (lookup_l ()->text ("number", to_str (measures), paper_l ())); s.align_to (X_AXIS, CENTER); s.translate_axis (3.0 * staff_space, Y_AXIS); mol_p->add_molecule (s); @@ -117,6 +146,8 @@ Multi_measure_rest::do_add_processing () set_bounds (LEFT, column_arr[0 >? column_arr.size () - 2]); set_bounds (RIGHT, column_arr.top ()); } + + // set columns to SCM_EOL? } void @@ -172,7 +203,7 @@ Multi_measure_rest::get_rods () const should do something more advanced. */ rod.distance_f_ = l->extent (X_AXIS)[BIGGER] - r->extent (X_AXIS)[SMALLER] - + paper_l ()->get_var ("mmrest_x_minimum"); + + paper_l ()->get_var ("multi_measure_rest_x_minimum"); a.push (rod); } diff --git a/lily/note-head-side.cc b/lily/note-head-side.cc deleted file mode 100644 index 273744c032..0000000000 --- a/lily/note-head-side.cc +++ /dev/null @@ -1,34 +0,0 @@ -/* - note-head-side.cc -- implement Note_head_side - - source file of the GNU LilyPond music typesetter - - (c) 1999 Han-Wen Nienhuys - - */ - -#include "directional-element-interface.hh" - -#include "side-position-interface.hh" -#include "note-head-side.hh" -void -Note_head_side::add_support (Item*head_l) -{ - Side_position_interface s (this); - s.add_support (head_l); -} - - -Note_head_side::Note_head_side() -{ - Side_position_interface s(this); - s.set_axis (X_AXIS); - s.set_direction (LEFT); -} - -bool -Note_head_side::supported_b ()const -{ - Side_position_interface s(this); - return s.supported_b (); -} diff --git a/lily/paper-column.cc b/lily/paper-column.cc index 94e22e0e34..7b3309513b 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -144,7 +144,7 @@ Paper_column::when_mom () const bool Paper_column::musical_b () const { - SCM m = get_elt_property ("shortest-starter"); + SCM m = get_elt_property ("shortest-starter-duration"); Moment s (0); if (SMOB_IS_TYPE_B(Moment, m)) { diff --git a/lily/paper-def.cc b/lily/paper-def.cc index 9c6be3c464..233e2075d2 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -109,34 +109,6 @@ Paper_def::line_dimensions_int (int n) const gh_scm2double (gh_cdr (pair))); } -Real -Paper_def::length_mom_to_dist (Moment d,Real k) const -{ - return arithmetic_spacing (d,k); -} - - -/** - Get the measure wide constant for arithmetic spacing. - - @see - John S. Gourlay. ``Spacing a Line of Music,'' Technical Report - OSU-CISRC-10/87-TR35, Department of Computer and Information Science, - The Ohio State University, 1987. - - */ -Real -Paper_def::arithmetic_constant (Moment d) const -{ - return get_var ("arithmetic_basicspace") - log_2 (Moment (1,8) ai(*lookup_p_tab_p_); ai.ok (); ai++) { DEBUG_OUT << "Lookup: " << ai.key () << " = " << ai.val ()->font_name_ << '\n'; } - DEBUG_OUT << "}\n"; #endif } diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index f314b8f41f..812e94ff8f 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -137,15 +137,13 @@ Score_engraver::typeset_all() } else { - Item *item_p = dynamic_cast (elem_p); - - if (!item_p->parent_l (X_AXIS)) + if (!elem_p->parent_l (X_AXIS)) { - bool br = to_boolean (item_p->remove_elt_property ("breakable")); + bool br = to_boolean (elem_p->remove_elt_property ("breakable")); if (br) - command_column_l_->add_element(item_p); + command_column_l_->add_element(elem_p); else - musical_column_l_->add_element(item_p); + musical_column_l_->add_element(elem_p); } } if (!elem_p->parent_l(Y_AXIS)) diff --git a/lily/script-column-engraver.cc b/lily/script-column-engraver.cc index 793ef46e97..c79f0bee93 100644 --- a/lily/script-column-engraver.cc +++ b/lily/script-column-engraver.cc @@ -56,13 +56,12 @@ Script_column_engraver::do_post_move_processing () void Script_column_engraver::acknowledge_element( Score_element_info inf) { - Item *thing = dynamic_cast(inf.elem_l_); - if (!thing) - return; - - if (Side_position_interface (thing).has_interface_b ()) + if (side_position (inf.elem_l_).has_interface_b ()) { - if (!thing->breakable_b () && Side_position_interface (thing).get_axis () == Y_AXIS) + Item *thing = dynamic_cast (inf.elem_l_); + if (thing + && !thing->breakable_b () + && side_position (inf.elem_l_).get_axis () == Y_AXIS) { script_l_arr_.push (thing); } diff --git a/lily/slur.cc b/lily/slur.cc index 5b8a08f02d..9cd4ab1d2d 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -143,6 +143,7 @@ Slur::do_post_processing () if (!directional_element (this).get ()) directional_element (this).set (get_default_dir ()); + /* Slur and tie placement [OSU] @@ -280,6 +281,12 @@ Slur::do_post_processing () } } + if (!fix_broken_b) + dy_f_drul_[RIGHT] += interstaff_f; + + + + return; /* Now we've got a fine slur @@ -291,13 +298,10 @@ Slur::do_post_processing () Real snap_f = paper_l ()->get_var ("slur_"+infix +"snap_to_stem"); Real snap_max_dy_f = paper_l ()->get_var ("slur_"+infix +"snap_max_slope_change"); - if (!fix_broken_b) - dy_f_drul_[RIGHT] += interstaff_f; - + Real dx_f = spanner_length ()+ dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]; Real dy_f = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]; if (!fix_broken_b) dy_f -= interstaff_f; - Real dx_f = spanner_length ()+ dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]; /* Avoid too steep slurs. @@ -524,8 +528,34 @@ Slur::get_rods () const +#if 0 +SCM +ugly_scm (Bezier b) +{ + b.translate (-b.control_[0]); + Real alpha = b.control_[3].arg (); + + b.rotate ( -alpha); + if (b.control_[1][Y_AXIS] < 0) + { + b.control_[1][Y_AXIS] *= -1; + b.control_[2][Y_AXIS] *= -1; + } + + Real len = b.control_[3][X_AXIS]; + Real indent = 10 *b.control_[1][X_AXIS] / len ; + Real ht = 10 *b.control_[1][Y_AXIS] / len ; + + SCM res = scm_eval (scm_listify (ly_symbol2scm ("slur-ugly"), gh_double2scm (indent), gh_double2scm (ht), SCM_UNDEFINED )); + + return res; +} +#endif +/* + Ugh should have dash-length + dash-period + */ Molecule* Slur::do_brew_molecule_p () const { @@ -535,10 +565,23 @@ Slur::do_brew_molecule_p () const Molecule a; SCM d = get_elt_property ("dashed"); if (gh_number_p (d)) - a = lookup_l ()->dashed_slur (one, thick, gh_scm2int (d)); + a = lookup_l ()->dashed_slur (one, thick, thick * gh_scm2double (d)); else a = lookup_l ()->slur (one, directional_element (this).get () * thick, thick); - + +#if 0 + SCM u = ugly_scm (one); + if (gh_pair_p (u)) + { + Molecule mark = lookup_l ()-> text ( "roman", + to_str (gh_scm2double (gh_car (u)), "%0.2f") + "," + + to_str(gh_scm2double (gh_cdr (u)), "%0.2f"), + paper_l ()); + + mark.translate_axis (20 , Y_AXIS); + a.add_molecule (mark); + } +#endif return new Molecule (a); } @@ -547,99 +590,32 @@ Slur::do_brew_molecule_p () const Bezier Slur::get_curve () const { - Bezier_bow b (get_encompass_offset_arr (), directional_element (this).get ()); + Array enc (get_encompass_offset_arr ()); + Direction dir = directional_element (this).get (); + Bezier_bow b (enc,dir); b.ratio_ = paper_l ()->get_var ("slur_ratio"); b.height_limit_ = paper_l ()->get_var ("slur_height_limit"); b.rc_factor_ = paper_l ()->get_var ("slur_rc_factor"); b.calculate (); - return b.get_curve (); -} - -#if 0 - -/* - TODO: FIXME. - */ - -/* - Clipping - - This function tries to address two issues: - * the tangents of the slur should always point inwards - in the actual slur, i.e. *after rotating back*. - * slurs shouldn't be too high - let's try : h <= 1.2 b && h <= 3 staffheight? + Bezier curve = b.get_curve (); - We could calculate the tangent of the bezier curve from - both ends going inward, and clip the slur at the point - where the tangent (after rotation) points up (or inward - with a certain maximum angle). + Real x1 = enc[0][X_AXIS]; + Real x2 = enc.top ()[X_AXIS]; - However, we assume that real clipping is not the best - answer. We expect that moving the outer control point up - if the slur becomes too high will result in a nicer slur - after recalculation. - - Knowing that the tangent is the line through the first - two control points, we'll clip (move the outer control - point upwards) too if the tangent points outwards. - */ - -bool -Bezier_bow::calc_clipping () -{ - Real clip_height = paper_l_->get_var ("slur_clip_height"); - Real clip_ratio = paper_l_->get_var ("slur_clip_ratio"); - Real clip_angle = paper_l_->get_var ("slur_clip_angle"); - - Real b = curve_.control_[3][X_AXIS] - curve_.control_[0][X_AXIS]; - Real clip_h = clip_ratio * b ? begin_h - clip_h; - Real end_dy = 0 >? end_h - clip_h; - - Real pi = M_PI; - Real begin_alpha = (curve_.control_[1] - curve_.control_[0]).arg () + dir_ * alpha_; - Real end_alpha = pi - (curve_.control_[2] - curve_.control_[3]).arg () - dir_ * alpha_; - - Real max_alpha = clip_angle / 90 * pi / 2; - if ((begin_dy < 0) && (end_dy < 0) - && (begin_alpha < max_alpha) && (end_alpha < max_alpha)) - return false; - - transform_back (); - - if ((begin_dy > 0) || (end_dy > 0)) - { - Real dy = (begin_dy + end_dy) / 4; - dy *= cos (alpha_); - encompass_[0][Y_AXIS] += dir_ * dy; - encompass_.top ()[Y_AXIS] += dir_ * dy; - } - else + Real off = 0.0; + for (int i=1; i < enc.size ()-1; i++) { - //ugh - Real c = 0.4; - if (begin_alpha >= max_alpha) - begin_dy = 0 >? c * begin_alpha / max_alpha * begin_h; - if (end_alpha >= max_alpha) - end_dy = 0 >? c * end_alpha / max_alpha * end_h; - - encompass_[0][Y_AXIS] += dir_ * begin_dy; - encompass_.top ()[Y_AXIS] += dir_ * end_dy; - - Offset delta = encompass_.top () - encompass_[0]; - alpha_ = delta.arg (); + Real x = enc[i][X_AXIS]; + if (x > x1 && x ? dir * (enc[i][Y_AXIS] - y); + } } - - to_canonic_form (); - - return true; + curve.translate (Offset (0, dir * off)); + return curve; } -#endif - diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index 0082a25ae4..8f4672537e 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -74,9 +74,11 @@ Spacing_engraver::do_pre_move_processing () { Moment m = (playing_durations_[i].info_.req_l_)->length_mom (); if (m) - shortest_playing = shortest_playing (get_staff_info ().musical_pcol_l ()); - sc->set_elt_property ("shortest-playing", (new Moment (shortest_playing))->smobify_self ()); + sc->set_elt_property ("shortest-playing-duration", + (new Moment (shortest_playing))->smobify_self ()); - sc->set_elt_property ("shortest-starter", (new Moment (starter))->smobify_self ()); + sc->set_elt_property ("shortest-starter-duration", + (new Moment (starter))->smobify_self ()); } void diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 7d9194d66e..e912cf5d3c 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -14,6 +14,7 @@ #include "warn.hh" #include "paper-score.hh" #include "line-of-score.hh" +#include "misc.hh" Spacing_spanner::Spacing_spanner () { @@ -41,16 +42,25 @@ Array Spacing_spanner::do_measure (Link_array cols) const { Moment shortest; + Moment mean_shortest; shortest.set_infinite (1); + + int n = 0; for (int i =0 ; i < cols.size (); i++) { if (cols[i]->musical_b ()) { - SCM st = cols[i]->get_elt_property ("shortest-starter"); - - shortest = shortest get_elt_property ("shortest-starter-duration"); + Moment this_shortest = (*SMOB_TO_TYPE(Moment, st)); + shortest = shortest meas_springs; @@ -184,19 +194,39 @@ Spacing_spanner::default_bar_spacing (Paper_column *lc, Paper_column *rc, */ if (delta_t) { - Real k= paper_l()->arithmetic_constant (shortest); - durational_distance = paper_l()->length_mom_to_dist (delta_t,k); + durational_distance = get_duration_space (delta_t, shortest); } return symbol_distance >? durational_distance; } +/** + Get the measure wide constant for arithmetic spacing. + + @see + John S. Gourlay. ``Spacing a Line of Music,'' Technical Report + OSU-CISRC-10/87-TR35, Department of Computer and Information Science, + The Ohio State University, 1987. + + */ +Real +Spacing_spanner::get_duration_space (Moment d, Moment shortest) const +{ + Real log = log_2 (Moment (1,8) get_var ("arithmetic_basicspace") + - log; + + return (log_2 (d) + k) * paper_l ()->get_var ("arithmetic_multiplier"); +} + + Real Spacing_spanner::note_spacing (Paper_column *lc, Paper_column *rc, Moment shortest) const { Moment shortest_playing_len = 0; - SCM s = lc->get_elt_property ("shortest-playing"); + SCM s = lc->get_elt_property ("shortest-playing-duration"); + // SCM s = lc->get_elt_property ("mean-playing-duration"); if (SMOB_IS_TYPE_B(Moment, s)) shortest_playing_len = *SMOB_TO_TYPE (Moment, s); @@ -213,8 +243,7 @@ Spacing_spanner::note_spacing (Paper_column *lc, Paper_column *rc, Moment shorte shortest = 1; } Moment delta_t = rc->when_mom () - lc->when_mom (); - Real k= paper_l()->arithmetic_constant(shortest); - Real dist = paper_l()->length_mom_to_dist (shortest_playing_len, k); + Real dist = get_duration_space (shortest_playing_len, shortest); dist *= (double)(delta_t / shortest_playing_len); dist += stem_dir_correction (lc,rc); diff --git a/lily/tie.cc b/lily/tie.cc index 0ae13646c3..e9e1ab7060 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -17,6 +17,7 @@ #include "directional-element-interface.hh" #include "molecule.hh" #include "bezier-bow.hh" +#include "stem.hh" void Tie::set_head (Direction d, Item * head_l) @@ -52,6 +53,16 @@ Tie::head (Direction d) const Direction Tie::get_default_dir () const { + Stem * sl = head(LEFT) ? head (LEFT)->stem_l () :0; + Stem * sr = head(RIGHT) ? head (RIGHT)->stem_l () :0; + + if (sl && directional_element (sl).get () == UP + && sr && directional_element (sr).get () == UP) + return DOWN; + else + return UP; + +#if 0 Real p1 = Staff_symbol_referencer_interface (head (LEFT)).position_f () ; Real p2 = Staff_symbol_referencer_interface (head (RIGHT)).position_f () ; @@ -63,6 +74,7 @@ Tie::get_default_dir () const */ Direction neutral_dir = (Direction)(int)paper_l ()->get_var ("stem_default_neutral_direction"); return (m == 0) ? other_dir (neutral_dir) : (m < 0) ? DOWN : UP; +#endif } void @@ -97,6 +109,9 @@ Tie::do_post_processing() return; } + if (!directional_element (this).get ()) + directional_element (this).set (get_default_dir ()); + Real staff_space = paper_l ()->get_var ("interline"); Real half_staff_space = staff_space / 2; Real x_gap_f = paper_l ()->get_var ("tie_x_gap"); @@ -225,7 +240,7 @@ Tie::get_rods () const Molecule* Tie::do_brew_molecule_p () const { - Real thick = paper_l ()->get_var ("slur_thickness"); + Real thick = paper_l ()->get_var ("tie_thickness"); Bezier one = get_curve (); Molecule a; diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index 965ecbf3c4..0e6f874f1f 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -35,12 +35,10 @@ Time_signature_engraver::do_process_requests() Time_signature_change_req *req = timing_grav_l->time_signature_req_l(); if (req) { - Array args; - args.push (req->beats_i_); - args.push (req->one_beat_i_); - time_signature_p_ = new Time_signature; - time_signature_p_->args_ = args; + time_signature_p_->set_elt_property ("fraction", + gh_cons (gh_int2scm (req->beats_i_), + gh_int2scm (req->one_beat_i_))); time_signature_p_->set_elt_property ("break-aligned", SCM_BOOL_T); } diff --git a/lily/time-signature.cc b/lily/time-signature.cc index aaa7952d8e..24f0fa73f0 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -23,25 +23,76 @@ Molecule* Time_signature::do_brew_molecule_p () const { SCM st = get_elt_property ("style"); + + SCM frac = get_elt_property ("fraction"); + int n = 4; + int d = 4; + if (gh_pair_p (frac)) + { + n = gh_scm2int (gh_car (frac)); + d = gh_scm2int (gh_cdr (frac)); + } + if (gh_string_p (st)) { String style (ly_scm2string (st)); if (style[0]=='1') { - Array tmparr = args_; - return new Molecule( lookup_l ()->time_signature (args_[0], 0, paper_l ())); + return new Molecule (time_signature (n, 0)); } else { - return new Molecule( lookup_l ()-> special_time_signature (style, args_[0], args_[1], paper_l ())); + return new Molecule (special_time_signature (style, n, d)); } } else - return new Molecule(lookup_l ()->time_signature (args_[0], args_[1],paper_l ())); + return new Molecule (time_signature (n,d)); } +Molecule +Time_signature::special_time_signature (String s, int n, int d) const +{ + // First guess: s contains only the signature style + String symbolname = "timesig-" + s + to_str (n) + "/" + to_str (d); + + Molecule m = lookup_l ()->afm_find (symbolname, false); + if (!m.empty_b()) + return m; + + // Second guess: s contains the full signature name + m = lookup_l ()->afm_find ("timesig-"+s, false); + if (!m.empty_b ()) + return m; + + // Resort to default layout with numbers + return time_signature (n,d); +} +Molecule +Time_signature::time_signature (int num, int den) const +{ + String sty = "number"; + /* + UGH: need to look at fontsize. + */ + Molecule n (lookup_l ()->text (sty, to_str (num), paper_l ())); + Molecule d (lookup_l ()->text (sty, to_str (den), paper_l ())); + n.align_to (X_AXIS, CENTER); + d.align_to (X_AXIS, CENTER); + Molecule m; + if (den) + { + m.add_at_edge (Y_AXIS, UP, n, 0.0); + m.add_at_edge (Y_AXIS, DOWN, d, 0.0); + } + else + { + m = n; + m.align_to (Y_AXIS, CENTER); + } + return m; +} diff --git a/lily/tuplet-spanner.cc b/lily/tuplet-spanner.cc index 02b560feb4..2a10981813 100644 --- a/lily/tuplet-spanner.cc +++ b/lily/tuplet-spanner.cc @@ -6,6 +6,7 @@ (c) 1997--2000 Jan Nieuwenhuizen */ +#include "atom.hh" #include "beam.hh" #include "box.hh" #include "debug.hh" @@ -21,7 +22,6 @@ #include "directional-element-interface.hh" - Tuplet_spanner::Tuplet_spanner () { set_elt_property ("beams", SCM_EOL); @@ -89,8 +89,17 @@ Tuplet_spanner::do_brew_molecule_p () const if (bracket_visibility) { Real gap = paper_l () -> get_var ("tuplet_spanner_gap"); - - mol_p->add_molecule (lookup_l ()->tuplet_bracket (dy, w, thick, gap, staff_space, dir)); + Real height = staff_space; + Atom *at = new Atom (gh_list(ly_symbol2scm ("tuplet"), + gh_double2scm (height), + gh_double2scm (gap), + gh_double2scm (w), + gh_double2scm (dy), + gh_double2scm (thick), + gh_int2scm (dir), + SCM_UNDEFINED)); + + mol_p->add_atom (at->self_scm_); } mol_p->translate_axis (dir * staff_space, Y_AXIS); @@ -186,17 +195,16 @@ Tuplet_spanner::do_post_processing () Direction Tuplet_spanner::get_default_dir () const { - assert (false); - Direction d = UP; SCM dir_sym =get_elt_property ("dir-forced"); - if (gh_number_p (dir_sym)) + if (isdir_b (dir_sym)) { d= to_dir (dir_sym); if (d != CENTER) return d; } + d = UP ; for (SCM s = get_elt_property ("columns"); gh_pair_p (s); s = gh_cdr (s)) { Score_element * sc = unsmob_element (gh_car (s)); diff --git a/ly/params.ly b/ly/params.ly index dd2e7f1fcc..e385999666 100644 --- a/ly/params.ly +++ b/ly/params.ly @@ -85,8 +85,10 @@ tie_y_gap = 0.25 * \interline; tie_staffspace_length = 4.0 * \interline; % ugh: rename to bow (in bezier.cc and fonts.doc too...) -% slur_thickness = 1.8 * \stafflinethickness; -slur_thickness = 1.4 * \stafflinethickness; + +% used to be 1.4 . +slur_thickness = 1.2 * \stafflinethickness; +tie_thickness = 1.2 * \stafflinethickness; %{ Specifies the maximum height of slurs. @@ -159,8 +161,9 @@ hyphen_height = 0.2*\font_normal; hyphen_minimum_length = 0.25*\font_normal; % Multi-measure rests -mmrest_x_minimum = 1.4*\staffheight; - +multi_measure_rest_x_minimum = 2.5*\staffheight; +multi_measure_rest_padding = 2.0 *\interline; +multi_measure_rest_expand_limit = 10.0; % chop off this much when next to pp / ff sign. crescendo_shorten = 4.0 * \interline; @@ -238,3 +241,4 @@ Wordwrap =0.0; #'Staff_symbol::staff-space = \interline ; #'Staff_symbol::line-count = #5 + diff --git a/ly/textscripts.ly b/ly/textscripts.ly index 92cb7f4e4e..47cb7d258b 100644 --- a/ly/textscripts.ly +++ b/ly/textscripts.ly @@ -13,6 +13,9 @@ ff = \textscript "ff" "dynamic" fff = \textscript "fff" "dynamic" fp = \textscript "fp" "dynamic" cresc = \textscript "cresc." "italic" +decresc = \textscript "decresc." "italic" +dim = \textscript "dim." "italic" + sf = \textscript "sf" "dynamic" sfp = \textscript "sfp" "dynamic" sff = \textscript "sff" "dynamic" diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 8d98ea97a6..bfe8f048ae 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.23 -Entered-date: 07FEB00 +Version: 1.3.24 +Entered-date: 13FEB00 Description: Keywords: music notation typesetting midi fonts engraving Author: hanwen@cs.uu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 1000k lilypond-1.3.23.tar.gz + 1000k lilypond-1.3.24.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.23.tar.gz + 1000k lilypond-1.3.24.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index 36bcf2f798..a0800aac45 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.3.23 +Version: 1.3.24 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.23.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.24.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # get Packager from (undocumented?) ~/.rpmmacros! diff --git a/make/toplevel.make.in b/make/toplevel.make.in index 60b6f26cf3..f23ac55661 100644 --- a/make/toplevel.make.in +++ b/make/toplevel.make.in @@ -8,13 +8,13 @@ depth = . # descent order into subdirectories: # -SUBDIRS = scripts buildscripts flower lib lily mf midi2ly po debian \ +SUBDIRS = scripts buildscripts flower lily mf midi2ly po debian \ Documentation ly input tex make mutopia intl stepmake\ ps scm # SCRIPTS = configure aclocal.m4 -README_FILES = DEDICATION COPYING NEWS TODO CHANGES +README_FILES = DEDICATION COPYING NEWS TODO CHANGES ROADMAP README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt IN_FILES := $(wildcard *.in) EXTRA_DIST_FILES = dstreamrc lilypond-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) diff --git a/mf/feta-eindelijk.mf b/mf/feta-eindelijk.mf index 538b006eb0..c7e8373551 100644 --- a/mf/feta-eindelijk.mf +++ b/mf/feta-eindelijk.mf @@ -92,10 +92,10 @@ save breve_rest_y, breve_rest_x; breve_rest_y# = staff_space#; breve_rest_x# = 3/5 staff_space#; -multi_rest_x# = 2 staff_space#; -multi_rest_y# = 1/3 staff_space#; +multi_rest_x# = 4 staff_space#; +multi_beam_height# = 1/3 staff_space#; -define_pixels(breve_rest_y, breve_rest_x, multi_rest_x, multi_rest_y); +define_pixels(breve_rest_y, breve_rest_x, multi_rest_x, multi_beam_height); fet_beginchar("breve rest", "-1", "breverest"); set_char_box(0, breve_rest_x#, 0, breve_rest_y#); @@ -112,12 +112,12 @@ tracingvariables := 1; fet_beginchar("multi rest", "-4", "multirest"); set_char_box(multi_rest_x#, multi_rest_x#, breve_rest_y#, breve_rest_y#); - draw_block ((-multi_rest_x, -multi_rest_y), - (multi_rest_x, multi_rest_y)); - draw_block ((-multi_rest_x,-breve_rest_y), - (rthin-multi_rest_x, breve_rest_y)); - draw_block ((multi_rest_x-rthin,-breve_rest_y), - (multi_rest_x, breve_rest_y)); + draw_block ((- b, - multi_beam_height), + (w, multi_beam_height)); + draw_block ((- b,-breve_rest_y), + (rthin - b, breve_rest_y)); + draw_block ((w - rthin,-breve_rest_y), + (w, breve_rest_y)); fet_endchar; fet_beginchar("Quarter rest","2","quartrest"); diff --git a/mf/feta-generic.mf b/mf/feta-generic.mf index a50866f73a..b1cdd49fbc 100644 --- a/mf/feta-generic.mf +++ b/mf/feta-generic.mf @@ -35,9 +35,9 @@ if test = 0: input feta-klef; input feta-timesig; else: - input feta-bolletjes; +% input feta-bolletjes; % input feta-banier; -% input feta-eindelijk; + input feta-eindelijk; % input feta-klef; % input feta-toevallig; % input feta-schrift; diff --git a/mf/feta-nummer.mf b/mf/feta-nummer.mf index 2ca82d771d..be478d4ab1 100644 --- a/mf/feta-nummer.mf +++ b/mf/feta-nummer.mf @@ -55,6 +55,7 @@ def draw_six = penpos1(thin,90); z1=(thick,h/2+thin-hair/2); penpos2(hair,90); + z2=(w/2,y1); penpos3(7/8thick,0); % yup, should use the path fract [] "everywhere" @@ -71,7 +72,7 @@ def draw_six = z10r=(0,y3); penlabels(1,2,3,4,5,6,7,8,9,10,11); save t; t=tense; - fill z5{right}..z2r{right}..tension t..z3r{down} + fill z7{right}..z2r{right}..tension t..z3r{down} ..tension t..z4r{left} ..tension t..z7r{up}..tension t..z6r{right} ..z6l{left}..tension t..z7l{down}..z10l{up}..cycle; diff --git a/mf/feta-test11.mf b/mf/feta-test11.mf deleted file mode 100644 index 4bec669221..0000000000 --- a/mf/feta-test11.mf +++ /dev/null @@ -1,21 +0,0 @@ -% feta-test16 -% part of LilyPond's pretty-but-neat music font - -input feta-autometric; -fet_beginfont("feta-test", 16); -staffsize#:=11pt#; -test:=1; - -% smoked cheese -% test := -1; - - -% dem piksels. -%test := 1; - -input feta-generic; - -fet_endfont("feta"); - -end. - diff --git a/mf/slur.mf b/mf/slur.mf new file mode 100644 index 0000000000..86a394ae0a --- /dev/null +++ b/mf/slur.mf @@ -0,0 +1,31 @@ + +staffsize# = 1pt#; +stafflinethickness# = staffsize#/10; +define_pixels (stafflinethickness, staffsize); + +input feta-sleur; + + + +% beginchar + +indent = 1.17 staffsize; +height = 6.15 staffsize; +len = 10 staffsize; + +path boogje; + + + +z1 = (0,0); +z2 = (indent, height); +z3 = (len - indent, height); +z4 = (len, 0); + +boogje=z1..controls z2 and z3..z4; +pickup pencircle scaled stafflinethickness; +draw boogje; +shipit; + + +bye diff --git a/midi2ly/GNUmakefile b/midi2ly/GNUmakefile index 906205f630..5a6f293e33 100644 --- a/midi2ly/GNUmakefile +++ b/midi2ly/GNUmakefile @@ -8,7 +8,7 @@ MODULE_NAME = midi2ly SUBDIRS = include EXTRA_DIST_FILES += TODO -MODULE_LIBS=$(depth)/lib $(depth)/flower +MODULE_LIBS=$(depth)/flower HELP2MAN_EXECS = midi2ly STEPMAKE_TEMPLATES=c++ executable po help2man diff --git a/scm/lily.scm b/scm/lily.scm index d18cdbf12f..2e218d5b09 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -346,12 +346,9 @@ "\\placebox{" (number->dim y) "}{" (number->dim x) "}{" s "}\n")) - - (define (bezier-sandwich l thick) (embedded-ps ((ps-scm 'bezier-sandwich) l thick))) - (define (start-line ht) (begin (string-append"\\vbox to " (number->dim ht) "{\\hbox{%\n")) @@ -509,16 +506,15 @@ (numbers->string (list w h (inexact->exact cont) thick)) " draw_crescendo")) + ;; what the heck is this interface ? (define (dashed-slur thick dash l) (string-append (apply string-append (map control->string l)) (number->string thick) " [ " - (if (> 1 dash) - (number->string (- (* thick dash) thick)) - "0") + (number->string dash) " " - (number->string (* 2 thick)) + (number->string (* 10 thick)) ;UGH. 10 ? " ] 0 draw_dashed_slur")) (define (decrescendo thick w h cont) @@ -771,3 +767,13 @@ ) +(define (slur-ugly ind ht) + (if (and +; (< ht 4.0) + (< ht (* 4 ind)) + (> ht (* 0.4 ind)) + (> ht (+ (* 2 ind) -4)) + (< ht (+ (* -2 ind) 8))) + #f + (cons ind ht) + )) -- 2.39.2