From 3c4e2d2b3e9af228c597a2885ab30170e4371143 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:52:56 +0000 Subject: [PATCH] lilypond-0.1.1 --- NEWS | 1178 +---------------------------------------- flower/rational.cc | 18 + lily/spring-spacer.cc | 146 +++-- 3 files changed, 99 insertions(+), 1243 deletions(-) create mode 100644 flower/rational.cc diff --git a/NEWS b/NEWS index a06bb28631..6f889e2664 100644 --- a/NEWS +++ b/NEWS @@ -1,1165 +1,23 @@ +pl 0.1.1 + - {Horizontal, Vertical}_group. A score_element may be in at most one. + - This means Horizontal_group_item and Vertical_group_spanner need special support. + - This also means a big speed increase + - configure cleanup + - bf: Choleski solve. + - doc updates: lilygut, INSTALL -august 1 +pl 0.1.1.hwn + - recode of Break/Colhpos interfaces + - Gourlay_breaking: dynamic-programming optimal solution for + casting off. Word_wrap is still optional + - some printing short cuts if no -d specced. + - band_matrices for column calcs + - more Diagonal_storage fixes + - retake: INFTY fixes ( now infinity_mom, infinity_f ) -VERSION 0.1.0 - - - bf: output tempo to track 0 too - - bf: don't forget to copy id_str_, so moved into Music +pl 78.jcn3 + - configure: ln and zip + - target doosdist -> lilypond-x.x.x.exe.zip: + executables - sources -pl 78.jcn1 - - fix for multi-staff midi: wohltemperirt.ly, standchen.ly - - doze fixes - - bf: conflily, configure (text) -***** -july 31 -pl 78 - - bf: Midi_instrument - - added enable/disable defaults to help. - - incredibly ugly NAME_MEMBERS(); bug. Immediately changed to -DECLARE_MY_RUNTIME_TYPEINFO; - - \stem -1 -> \stem \down in input - - bf: slurchar index - - configure warnings - - preliminary stuff for multiarch building - - #!/usr/bin/perl fixes (AO) - - some Makefile cleanups: now faster. -pl 77.jcn2 - - Midi_instrument -****** -july 29 -pl 77 - - some fixes for internal compiler errors -derive from Pointer_list with default dtor gives error with -O2 - - .ini -> .ly - - lyrics fix - - Performer beautification: got rid of set_track(), midi_output() - - pseudo RTTI for midi-items - - bf: Performer*::print() - - links.pod - - Voice_element -> Request_chord - - fixed flex problems: stdin input works again - - Documentation/Rules.make, make-website via make - - spacing: now add basicspace - -******* -july 28 -pl 76 - - mudela version bumped to 0.1 - - mudela-book - - doco updates, now some stuff in LaTeX - - junked book.{ly,tex} example - - progress indicator - - rhythm.ly updated - - removed mf sources from distribution due to (c) stuff - - allowal of breaks handled cleanly - - junked Subtle_reqs, junked Request_iterator. Request - iteration now by Voice_element_iterator - - Piano_bar, Piano_bar_engraver, Span_score_bar_engraver, - Span_score_bar - - Swallow_performer - - removed Staff_engravers, grouping into Line_group_engraver - - Head_column as base for Rest_column,Note_column - - Score_column derived from PCol - - regurgled Line spacing: interface and implementation - separate. Idealspacing moved into Spring_spacer - - Gourlay style linespacing - -pl 75.jcn6 - - {lyric,meter,key}-performer - - span-brace-* (Removed again. Such is life) - - doze compile - - midi output, notes only - - working midi output -- hacked - - doze compile, mingw32 configure (still triggers gcc int. comp err) - -pl 74pre.jcn2 - - mi2mu fixes after scott snyder [sss] - - mi2mu update for mudela 0.0.61 - - conflily fixes - -******* -july 21 - -pl 75 - - inbook.ly & book.tex example. - - natural width: linewidth = -1.0\cm - -pl 74pre.jcn1 - - oversimplified midi output thru performer hierarchy - - bf: Spanner::doprint - -pl 72pre.jcn1 - - naming fixes; some iter*() explicitations - - removed acceptor.hh - - *performer*: second draft of midi (audio/...) - -******* -july 9 - -pl 74pre - - Input_engraver -> Input_translator - - bf: span start/stop is now a "used" col. - - Rest_column/Rest_collisions bugfixes - - bf: crescendi. - - Spanner do_print() - -****** -july 7 -pl 73pre - - some refs doco. - - move Input_engraver into Paper_def - - junk Interpreter - - naming: Request_engraver -> Engraver, - - Music_iterator::next() -> process_and_next() - - junk Voice_engravers - - Span_bar, Span_bar_engraver - - Vertical_align_engraver - -******* -july 2 -pl 72pre - - \paper{} syntax: var = 1.0\pt;, with an Assoc array - - sketch of MIDI Performer classes. - - bf: memleak in parser - - naming: Acceptor -> Translator - - input: bf collisions.ly, scales.ly - - bf: [r8 c8] - - naming: Register -> Engraver - - force \\ on identifiers - - doco updates - - musixtex T73 fonts - -pl 70.mb - - bf: find syntax in Variables.make -***** -july 1 -pl 71pre - - nested \melodic and \lyric constructs - - init id's, Input_register aliases. - - bf: notehead x-swap - - bf: auto-keys. - - bf: first clef - - junked \init_end; construct - - Preparatory work for MIDI output: - * Acceptor as baseclass for Register_group_register - * Global_acceptor as interface of Register to Score - - bf: empty voice - - Lyrics: partially working - - some doco updates (junks, mostly) - - -****** -june 30 - - -pl 70pre - - bf: text Script - - bf: Script::dir_i_ checks. - - bf: script stacking - - bf: Text_spanner::do_subst. - - bf: Text_spanner::Text_spanner(Text_spanner&) - - bf: script priority read from script.ini - - bf: Script_def::do_equal_b - - bf: script dims. - - mudela: ; obligatory for \paper {}. - - some cosmetic changes involving RTTI macros - -******* -june 29 -pl 69pre - - bf: whole rest position, whole/half rest dots. - - bf: scripts - - reg termination - - centered bars - - bf: init of Tie::dir_i_ - - bf: Staff_side depends on staff_sym_ - - bf: Script::do_substitute_dependency() now implemented - - more print info (also in output) - - bf: Vertical_align_element - - stemless beams now allowed (with warning) - - bf: Rest_column::stem_l_ init - - merge rests.ly with collisions.ly - -pl 67.jcn3 - - rests under beam [c8 r c] - -pl 67.jcn2 - - first attempt at rest collisions - - rests.ly - -pl 67.jcn1 - - beam stem length: beams.ly - - bf: mingw configure - - re: conflily - -****** -june 26 -pl 68pre - - doco: other-packages.pod, lots of lilyliterature.pod - - last duration mode now is default. - - some OpusTeX stuff. - - bf Y2K in convert-mudela - - Grand rewrite of Music/Register stuff: - * separation of Y and X-elt-groups - * Registers: info up: broadcasts, info down: get_xxx_info() - * Registers: try_request works from bottom to top of tree. - * Score_elem empty_b_ and transparent_b_ flag - * Junk Staff_column, and find the requests while walking the - Voices. - * Score_register - * Staff_group, Score_request_register. - * align key/Meters/bar across staffs - * junked Staff, Staff_column, Staff_walker, Complex_walker, - Request_column Pulk_voice, Pulk_voices, Walker_registers, - Voice_element, - Input_score, Input_staff, Input_music and a lot of - parserjunk. - * mudela: lots of structure changes : now much simpler - * generation of pre/postbreak items now in Score_elem with deps. - - - bf: make_patch explanation - - bf: make install TeX stuff - - mudela: . mandatory for REALs - - -pl 67 - - damped beamslope after wanske - -****** -june 3 -pl 67 - - sketch of Music classes - - General_script_def as baseclass for Text_def and Script_def - - bf: clean lib/out/liblily.a - - bf: rests shorter than 1/4 - -pl 66.jcn3 - - bf: make uninstall - - conflily - - f: some pedaling - - plet hack removed :-( [ c c c ]2/3 -> [2/3 c c c ]1/1 - -pl 66.jcn2 - - bf: bar, Hilfslinie - - bf: configure for mingw32 - -pl 66.jcn1 - - WIN32 -> WINDOWS32, more win32->windows32 - - some GNU/Linux changes - - cygnus b18 / mingw update - - doze compile; bf: p-score.cc compares - - reincluded toccata fixes - - small stuff: vi tags, typos, bibl - -****** -may 27 -pl 66 - - make_website --jpeg, --png and --gif - - win32 -> windows32 - - bf: Score_elem::TeXstring assert fail - - bf: headswap with stemdown - - bf: broken tie - - bf: broken slur - - bf: accidental dims - - bf: measure bar width - - -****** -may 26 - -pl 65 - - bf pathfind /root/file - - massive Score_elem rewrite: - * group_element_i_ count - * support for removing an individual Score_elem cleanly. - * moved dep stuff into class Directed_graph_node - * Score_elems can be copied and deleted freely. - * junk PStaff - * Spanner_elem_group - * Line_of_{score,staff} now are Score_elems - * clean dep handling upon deletion - * delete unbroken spanners - * added a break_processing round. - * Super_elem - - junk Complex_staff, - - clean {lily}?proto.hh - - Element_group - - Score_elem now as virtual base class everywhere - - naming: Staff_elem -> Score_elem - - bf: make in toplevel dir - - bf: broken tie y-pos - - bf: sharing 4th, 8th and 16th noteheads - - bf: overlapping chords. <\multivoice c d > - -pl 64.wl - - new stem direction code - - bfs: wohltemperirt.ly (thanks, Werner) - - bf: stem direction - -pl 63.jcn2 - - doze compile - -pl 63.jcn1 - - bf: mi2mu mudela commands - - bf: mi2mu tracks - - mi2mu quantify tuning - - mi2mu TODO - -********* -may 16 -pl 64 - - exe's now built in out/ - - toplevel Makefile dep from make/Toplevel.make.in - - make_website: add version footer - - make_website: bf dist *.txt - - bf: fix loose bars : \meter 4/4; c1. - - Staff_elem -> Score_elem - - bf - - vbrace lookup - - resync barcheck - -******* - -may 15 -pl 63 - - bf: segfault during MIDI output with mi2mu output. - - kludge: parse error beyond eof - - don't read ini if toplevel file not found - - accumulate \kern in TeX output. - - bf: try to prevent long lines; TeX breaks on them. - - naming: Pointer->Link, IPointer->Pointer - - bf: \plet didn't work (MB) - - GMP manifesto. - -pl 61.jcn4 - - mi2mu -p -s16 fugua2.midi getting better! - plus factor 2 mi2mu speedup (fugue2.midi 5.50user) - - bf: Duration_convert quantify threshold down - - bf: (on quantify): tcols quantified; no silly voices - -pl 61.jcn3 - - lily parsing speedup: backup rules for lexer.l - - bf: mi2mu, using midi_voice list... - -pl 61.jcn2 - - all in all mi2mu speedup of about factor 8 since pl61 - (fugue.midi 82.72user to 10.30user on a 586.133) - what about lily? - - binary search on track-columns - - mi2mu IP*list to Array (implications?!) conversion - - mi2mu parsing speedup: backup rules for midi-lexer.l - - bf: zero denominator - -********** -may 14 -pl 62 - - make clean bf: remove lex & yacc files too - - added kludge in case measure too long - - added kludge in case of unconnected columns. - - kludged columns get error marker - - kludged lines get error marker - - -pl 61.jcn1 - - smarter + faster duration-convert using Array - - bf: mi2mu compilation/duration-conversions - - lots faster mi2mu, hopefully does type 1 too... -pl 60.jcn1 - - mi2mu handles non-quantified rests, try mi2mu -b wtk-i/fugue2.midi - - - -********** -pl 61 - - scales.ly bugfix: dimensions default to ((0,0), (0,0)) - - naming: PointerList->Pointer_list - - tied notes don't get accidental - - bf: crescendo size - - fixes: make_patch, - - bf: _"text" direction - - mailing list into lilypond.pod - -pl 60.mb - - set_flower_debug: Warning if -d is used when NPRINT is defined. - - Fixed several TeX details. vcenter renamed since it interfered - with LaTeX. Position of accents changed. - - New example; scripts.ly - - table_sixteen: added scriptdefinition (Lilypond breaks if a - script is defined without dimensions). - - bf: ifndef typos in p-score.cc, choleski.cc - - bf: Slur::do_post_processing(), whole notes caused SIGSEGV. - -(ascension break :-) -******* -pl 57.jcn4 - - mi2mu handles rests (quantified only) - - fixed configure buglet - - "!date" Fri May 2 02:18:12 MET DST 1997 - -pl 60 - - Request_register::get_feature(), tie direction, Slur direction - - lilypond output is now directly texable. - - make_website checks return status - -******* -may 5 -pl 59 - - Slur now into voicegroups, and take stems into account. - - bf: rest size in table. - - split Slur in baseclass Bow - - Tie, Tie_req, Tie_register - -****** -may 2 -pl 58.jcn1 - - bf: toccata-fuga-E.ly - -pl 57.jcn4 - - mi2mu handles rests (quantified only) - - fixed configure buglet - - "!date" Fri May 2 02:18:12 MET DST 1997 - -pl 58 - - lexer cleanup - - national chars in lyrics - - \stem 2; bf - - long comments: %{ %} - - *.ini mode bf - - bf: partial may be everywhere - - bf: meterchange not at start of measure - - some doc updates - - bf: stem too long if stem is down. - -pl 57.jcn3 - - dank je schat, voor wtk-i - - mi2mu tries to handle rests - - "!date" Thu May 1 02:34:04 MET DST 1997 - - maak je het niet te laat schat? - XXXX HWN - -pl 57.jcn2 - - small toccata-fuga-E.ly fixes - - \bar "||"; is now doublebar, "|." is finishbar - - collision hshift fix, with on-line assistance -****** -pl 57 - - lots of TODO doco - - text alignment bugfix - - bugfix Voice_group_regs::get_register_p() now is actually called too - - bugfix init of Text_item::pos_i_ - -pl 56.jcn1 - - toccata-fuga-in-E.ly, excerpts with real-life collisions - - \{l,r}{b,f}{toe,heel} --- using cmsy fonts... - - pedal.ly - -pl 55.jcn1 - - mi2mu man page - - make doc fixlet - - \[lr]heel \[lr]toe scripts (happy pedal studies, pa) - - lyric with width - - removal of some example files - -pl 56.mb: - - last duration fix - - makefile fixes - - space rest - - swedish note name update - -****** -pl 56 - - Massive Rest/Stem/Collision/Note_column rewrite: resolve -notehead/rest ambiguities and bugs. eg, [c8 r8 c8] - -pl 54.jcn1 - - standchen.ly: repeats; lyricii to end - - convert-mudela: help + usage - - fixed midi key/meter-change (triggered by martien.ly) bug - -****** -April 23 -pl 55 - - staff-side robustification - - script-on-rest bug - - doc update - - transpose syntax -****** -pl 54 - - bugfix Colhpos.cc::OK assert fail. - - Inclusion of MusixTeX MF files, - - detection of MF dir -pl 53.hwn - - stacked lyrics - - configure/make buglets. -****** -pl 53 - - spurious accidental bug. - - simultaneity check. - - added AUTHORS.pod - - convert-mudela auto from guess - - include -> \include - - change order of opening parse/init file - - Pulk_voice, Pulk_voices - - Request_column - - revised request-from-voice extraction. Now much faster - -****** -april 17 -pl 52 - - Buildroot RPM - - tex-prefix and tex-dir sep'd (here you are jan) - - convert-mudela framework - - Collision_register, Collision - - \hshift 1; input - - Features changed -pl 50.jcn1 - - LILYINCLUDE dir searched before DIR_DATADIR(?) - - lily reads from stdin again (but does not now when to stop) -****** -pl 51 - - transposition bugfix + doco - - LilyPond -> GNU LilyPond - - bugfixes for Staff_side and Note_column* - - wohltemperirt: complete - -****** -april 11 - -pl 50 - - merge rest / notehead. - - Staff_side as a base class for most "staff-side" symbols. - - version check - - Note_column_register, Note_column - - multiple scripts - -******** -april 8 -pl 49.jcn1 -Bugfix - - configure[.in], make/Configure_variables.make.in c++ (=doze fix) - - "configure; make" ok for doze, win32 target may be removed now - - win32/gcc 2.7.2 compile fixes -- why does this all compile - (without warnings, why can-t i even trigger warnings) under - linux/gcc-2.7.2.1? it's quite a tedious job fixing this - shit _on doze_ all the time. - * fixed #includes global-regs.cc, staff-info.cc, staff.cc - * key.hh:Key() -> Octave_key() - * added missing lily/include/input.hh: Input( Input const& ) - -pl 49 - - lsm template - - clef in cadenza mode. - - notename clear - - \command bla; for \meter, \clef, \octave etc. -******* -pl 48 - - notenames init - - Duration order -> grouping - - broken key s - - default octave - -****** -april 3 -pl 47 - - dynamic flowerlib - - Input mods: now use Source_file iso Sources - - makefile lib deps restructured - - make_website now produces in out/ - -pl 46 - - examples.pod - - LILYINCLUDE env var. - - push/popgroup - - website updated - - Swallow_register - - Lyric_register. - - Staff_sym_register - - user settable register config - - struct Input now used iso defined_ch_C_ - - Walker_registers and Staff_registers separated - - dynamic-reg -> hairpins - -pl 44.jcn2 - - doze configure/compile fixes - - doze make refixed - - faq - - install mudela manpage too - - RedHat spec lilypond.spec fixed - - target: rpm (make RedHat packages) - -****** -Mar 26 -pl 45 - - Removing unused Voice_regs & Voice_groups - - -O2 bugfix - -pl 44.jcn1 - - merged 42.3 42.jcn4 code trees (see stuff below) - - moving towards Mudela 0.1 (again) - * keyword "music" dropped for horizontal music - * keywords "\lyric" "\melodic" introduced, e.g.: - melody = \melodic { c c | g g } - * removed level of indirection: - - staff initialisable with music identifier list: - \staff{ global melody } - - \score and staffs alike - - gnu standard(?) help texts - - configure "creates" toplevel Makefile from make/Toplevel.make - -Bugfix - - fixed mi2mu - - write meter to track0 too... - - default octave - - new Sources in My_midi_lexer: sourcefile_p_ = get_file_l(): oeps. - (ain-t hungarian grand?) - -Examples - - updated for mudela 0.1 - -****** -pl 44 - - naming: _c_l -> _C - - pure parser, My_lily_parser - - ''a iso ``a - - Includable_lexer - - junk Input_file - - Duration in parser, Duration restructuring - - grandiose lexer hax. Flex should be fixed, really. - Lexer much faster now. - - opps. mi2mu broken - -****** -pl 43 - - transposition. - - $variable&@name - - warnings if incorrect mode - - missing scsii measure - - declaration used check. - - - -pl 42.jcn4 - - lily writes midi meter/key changes from requests - - mi2mu: - + write mudela 0.1 - + write bar change requests - + more tunable quantisation - -Examples - - half-new-menuetto.ly converted to mudela -almost- 0.1 - - new mi2mu of bach's wtk pre1/fugue1 - -pl 42.3 (jcn version) - - oeps, branched source tree - -pl 42.hwn3 - - const naming change (T const <-> const T) - - Mudela 0.1 (roughly the same as below..) - -pl 42.3 - - moving towards Mudela 0.1: - * all keywords must be preceded by backslash '\' - * explicit lexer switches '$' and '@' dropped - * keyword "music" dropped for horizontal music - * keywords "\lyric" " introduced, e.g.: - melody = \melodic { c c | g g } - * staff initialisable with music identifier: - \staff{ melody } - * chords: < c e > - * octavate ''c`` - * \meter{ 2/4 } - * \octave{ ''`` } - - configure sets CXX (to c++, commonly) -Internal - - renamed lexer.hh, mylexer.cc My_flex_lexer to my.lily.lexer.* - -pl 42.2 - - new lilyinput (Mudela 0.1) doc. -Examples - - new-twinkle.ly (in Mudela 0.1, hopefully) - -pl 42.1 - - further Makefile revamping. - - moved flowerlib - -******* -pl 42 - - -pl 41.hwn3 - - struct Lexer_prefs - - parser bug - - make uninstall - -pl 41.hwn2 - - make file rehack - - spec update - - make install - - detect TeX directory - -pl 41.hwn1 - - cygnus configure, - - updated versioning - - install.pod - -pl 41.jn1 -Bugfix - - doze compile -******* -pl 41 - - release - -pl 40.3 - - all of the above - - hw's configure.in - - p-name.xx fixes - -pl 40.hwn1 - - hairpin dynamics - - notename now as identifier. Parser/lexer cleanup - -pl 40.2 - - mi2mu --blonde-durations, --no-silly options. - - mi2mu starts to look promising, see examples -Examples - - pre1.midi.ly, fugue.midi.ly -Internal - - Duration handles blonde midi-durations - - More settings for Duration_convert - - lily writes meter too (ugh, howto?) -Bugfix - - mi2mu auto track number fix - - mi2mu / lily Midi_tempo fixed/added - -pl 40.1 -Bugfix - - lily midi output track 0 name - - mi2mu tempo fixed - - make out/make and out/make/Site.make in configure script! - - mi2mu double newline fix - - -****** -Mar 11 -pl 40 - - release - -pl 39-5 - - own versioning for mi2mu: 0.0.10 - - some file renaming mi2mu -pl 39-4 - - all of the above - -pl 39-hwn2 - - last bar bugfix -Internal - - simple dynamics - - experimental RPM spec. - - doco update. - -pl 39-3 - - all of the above - - m2m renamed to mi2mu - - better line breaking in mi2mu - - (somewhat broken) progress indicator for mi2mu - - mi2mu output === lily input (in names and durations, - always assuming voices > 1 though) - -Bugfix - - midi: note on/off only once per pitch per track - (sending all note-on events introduces cool mi2mu feature) - - make clean removes deps too - - mi2mu notename/accidental/octave, and key fixed - -Internal - - auto create of out-dirs, config headers, using tag file .GENERATE - -Examples - - stanchen.ly debugged - -pl 39-2 - - configure script help and in topdir again, duh. - - auto configure upon virgin make - - configured makefile stuff in make/out/ - - -******** -pl 39-1 - - doze target (for 16 bit dos xcompiler: gcc-go32) -Internal - - make/User.make; C..FLAGS sorted out -Bugfix - - make clean... - -pl 39 - - new make structure, featuring: - * top-level/sub-level build - * auto custom-library dependencies/build - * top-level/sub-level dist - * minimal(? can even smaller) specific Makefiles - * which makes for simple lib/exe module split (make/Template.make) - * integrated flowerlib - * all stuff into subbirs (make/Stuff.make) - * all headers into /include dirs (make/Include.make) - * all output into /out (executables into bin/) - * more make features, like make config, make help - * small lily lib - * lilypond-x.x.x/.version for toplevel lily version - * lilypond-x.x.x//.version for version (eg: flower) - * versioning using additional optional MY_PATCH_LEVEL - for easy make_patch - - - bin/cptogen - -Internal - - generic m2m header: m2m.hh - -Bugfix - - small fixes, make, dist, configure - -pl 38-5 - - all of the below, e.g. new filenames and new makefile - structure patches merged -****** -pl 38 - -Internal - - great filename renaming operation with - convention. - - printing methods for paper_def/lookup/symtab(s) - - untied all registers from complexwalker. Now registers are -intrinsically hierarchical. All walker communication is done via a -"top level" register. - -pl 37-3 - - m2m handles voices - - instrument, track_name, copyright/left stuff for m2m/ly - -Internal - - Midi_voice - -pl 37-1 - - text, key, tempo event in midi output/ly input - -Internal - - simple makefile structure, allows for multiple projects - -****** -pl 37 - - -Documentation - - language.pod as starting point for mudela devel. - - - Jan's patches: -Features - - m2m patchy --no-triplet option; - lilypond accepts m2m's real midi output (hand-add red tape) - - m2m output only valid durations, resync option wip - - m2m produces .ly output -Internal - - simpler and better naming for Duration* - - the great String renaming / index to base=0 change - - Track_column, Lily_stream - - Duration, Plet, Duration_convert taking load off duration calc. -Bugfix - - m2m duration calc - - - -****** -pl 36 - - Jan's patches: - - do MIDI rests cleanly. - - lily/m2m: time and tempo fixed for metric timing -Internal - - Midi_tempo - - m2m parses more midi stuff (all of bach-wtc); timing?? - - m2m recognises some commandline options -Examples - - fixed midi.ly - -******* -Feb 25 -pl 35 - - Register_group -Bugfix - - alignment of breakable items. - -******* -pl 34 - - better midi syntax. - - --midi,-M option. - - preliminary midi2mudela (/mudela2midi) converter: m2m (JCN) -Internal - - m2m sources: midi-*; (JCN) - - new Midi_walker, fixes several MIDI bugs. - - junked Midi_staff, Staff_column children, Midi_walker - - Midi_output - -pl 33-1 - - m2m parses midi -Internal - - Binary_source_file - - Source_file::error_str simplified -******* -pl33 -Examples - - Swedish notenames (MB) - -pl pre33-2 - -Bugfix - - midi pitch - -Features - - Jan's patches, see below -Bugfix - - some midi bugfixes. - -pl pre33-1 (JCN) - - - - midi output using pitches iso notename -Examples - - added midi output (some midi output files broken?) - - all melodic fixed (except for error.ly:-) - - midi.ly -Bugfix - - midiwalker line break - - empty/nonexistent include at top of ly - - midi #tracks - - midi pitch c0 - - midi poor man-s staff dynamics -Internal - - Midi_column, Midi_staff, Midi_walker - -pl pre33 (JCN) - - Jan's patches, see below - -Features - - simple plet notation (JCN) - - lyrics centred, but no fully suppored? (JCN) -Internal - - Midi_stream - - Mididef - - Midi_item, Midi_pitch, Midi_duration - - Midi_chunk, Midi_header, Midi_track - - preparations for midi output - - no exit upon context error (JCN) - - converted some "warnings" to errors; no output (JCN) -Bugfix: - - simple plet bugfix -Examples - - updated standchen, menuetto (JCN) - - new plet notation (JCN) - - plet.ly (parse and spacing tests) (JCN) - -******* -pl 32 -Features - - multiple meters, see rhythm.ly - - skip syntax/Skip_req - - score_wide_music: commands in staff now override commands in score. -Internal: - - command carnage - - Key_register - - Bar_register - - Meter_register - - meters now kept in baseclass Staff_walker - - Score_walker (to ease MIDI output) -Doc: - - Hungarian doco added to CodingStyle - -pl 32-1 - - music processing speedup - - website added to doco - - clef must *inside* music - - fixed spurious "beam too narrow" messages. -Internal: - - merge musical / non-musical staff_column - - musical/ non-musical requests - - Clef_register - - split up request.hh, Musical_req vs. Nonmusical_req -******* -pl 31 - -Examples - - Coriolan example (JN) - - standchen updated -Bugfix - - calcideal assertion bugfix -******* -Feb 12 13:55 -pl 30 - -Features - - better multivoice spacing - - move rest in multivoice staff - - errors in TeX output now warnings - - progress indicator - - music processing speedup. -Internal - - make spanner for staffsym; scrap Line_pstaff - - scrap simplestaff (Rhythmic_staff temporarily disabled) - - docxx 3.0 format comments - - split register source files - - hardcoded dimensions compile time - - Lookup::tex_hairpin -Bugfix - - non G-clef clefs - - script junking (2x) - - empty files - - beam::center (plet position!) - -pl 29 - - multiplatform Makefile (JN) - - context errors: bugfixes (JN) -******* -pl 28 - -Internal - - idealspacing slightly better for multivoice. -Doc - - Request_register -Bugfix - - Script.cc : float exception (MB) - - Request::Request(Request) copying of definition pointer (JN) - - cleaned dependencies for broken spanners - - stupid typo in Staff_elem::post_processing() - - init of hpos in PCol::PCol - - Word_wrap::solve() bug -******* -pl 27 - - preliminary WIN32 support (JN) -Features - - errors converted to warnings (JN) - - context errors (JN) - - As vs. as notename. - - WARNING: "melodic" stafftype will create the new Complex_staff! -Examples - - Lohman's Viola Quartet (JN) - - JS Bach Solo Cello suite II menuet (JN) - - -pl pre27 - -Features - - option --init - - last_duration_mode: default_duration is last duration entered - (\duration{\last}) - - syntax: grouping 2*4 3*8 - - preliminary multivoice support -Examples - - JS Bach's WTK example added. - -Internal: - - Text_reg and Script_reg -******* -pl 26 - - Documentation/lelie_logo.png - - 8-bit chars for input (see ltest.tex) (MB) - - quotes around string now optional -Bugfixes: - - unmatched ] (MB) -Internal: - - print/name methods of Staff_elem - - added Request_register - - Voice_group_registers, Voice_registers, *_register - - Complex_staff -******* - Jan 27 '97 -pl 25 - - other clefs added, keys typeset properly (MB) - -******* -pl 24: - - Lyrics (JCN) - - Commands in music-mode (an input feature) (there you are, Mats) - -******* -pl 23: - - TODO file inc'd - - cadenza mode. - - default extension, search path. - - error.pod,faq.pod - - Markers - - configure script - - inputfile name in output. -Internal changes: - - scrapped VPATH - - Make dependencies per .o - - Split Input_* parsing steps to enable marking -Bugfixes: - - unconnected columns - - -******* -pl 22: - - doco from mpp - - repeat signs - - | checks for bar in a voice (Barcheck_req) -Internal changes: - - naming (Hungarian notation, svec vs. Array) - - cleanup PScore, Score - - removed Staff_commands, plugging commands into Staff_column directly -Bugfixes: - - bug noteheadswap - - huge memleak fixed; unearthed lots of bugs - -******* -pl 21: - - scripts - - texts - - nplets (triplets!) -Internal changes: - - Move breaking stuff into a separate class Break_algorithm - - dependencies for Staff_elem's - -******* -Dec 23 -pl 20: - - updated doco to .pod - - include files from .ly -Internal changes: - - Rational for time measurement - - directionalspanner/textspanner - -******* -pl 19: - - grouping code: LilyPond can set advanced multibeams. -Internal changes: - - struct Moment - -******* - -pl 18: - - robust Staff_commands - -******* -pl 17: - - robust Input_commands - - merged Vertical_/Horizontal music - - PARTIALs with duration - - modularized lexer: multiple runs - -******* -pl 16 - - notenames configurable - -******* -pl 15 - - grouping code - - multibeams (simple) - -******* -pl 14 - - symtables from .ly - - Input_command - - Input_{score/staff} - -******* -Dec 2 -pl 13 - - Horizontal/Vertical music - - Input_commands diff --git a/flower/rational.cc b/flower/rational.cc new file mode 100644 index 0000000000..b1056c2430 --- /dev/null +++ b/flower/rational.cc @@ -0,0 +1,18 @@ +/* + rational.cc -- implement Rational related functions + + source file of the Flower Library + + (c) 1997 Han-Wen Nienhuys +*/ + +#include "rational.hh" +#include "string.hh" + +void +print_rat(Rational const &m) +{ + cout << String(m) << flush; +} + + diff --git a/lily/spring-spacer.cc b/lily/spring-spacer.cc index 7684e5de5f..81196d6b24 100644 --- a/lily/spring-spacer.cc +++ b/lily/spring-spacer.cc @@ -19,7 +19,8 @@ #include "score-column.hh" #include "paper-def.hh" #include "dimen.hh" -#include "minterval.hh" +#include "colhpos.hh" + Vector Spring_spacer::default_solution()const @@ -96,8 +97,8 @@ Spring_spacer::position_loose_cols(Vector &sol_vec)const assert(sol_vec.dim()); Array fix_b_arr; fix_b_arr.set_size(cols.size() + loose_col_arr_.size()); - Real utter_right_f=-INFTY_f; - Real utter_left_f =INFTY_f; + Real utter_right_f=-infinity_f; + Real utter_left_f =infinity_f; for (int i=0; i < loose_col_arr_.size(); i++) { fix_b_arr[loose_col_arr_[i].rank_i_] = false; } @@ -235,6 +236,16 @@ Spring_spacer::make_matrices(Matrix &quad, Vector &lin, Real &c) const } } +void +Spring_spacer::set_fixed_cols(Mixed_qp &qp)const +{ + for (int j=0; j < cols.size(); j++) + if (cols[j].fixed()) + qp.add_fixed_var(j,cols[j].fixed_position()); + + +} + // put the constraints into the LP problem void Spring_spacer::make_constraints(Mixed_qp& lp) const @@ -242,9 +253,6 @@ Spring_spacer::make_constraints(Mixed_qp& lp) const int dim=cols.size(); for (int j=0; j < dim; j++) { Colinfo c=cols[j]; - if (c.fixed()) { - lp.add_fixed_var(j,c.fixed_position()); - } if (j > 0){ Vector c1(dim); @@ -256,26 +264,44 @@ Spring_spacer::make_constraints(Mixed_qp& lp) const } } -Array -Spring_spacer::solve() const +void +Spring_spacer::lower_bound_solution(Col_hpositions*positions)const +{ + Mixed_qp lp(cols.size()); + make_matrices(lp.quad,lp.lin, lp.const_term); + set_fixed_cols(lp); + + Vector start(cols.size()); + start.fill(0.0); + Vector solution_vec(lp.solve(start)); + + positions->energy_f_ = lp.eval(solution_vec); + positions->config = solution_vec; + positions->satisfies_constraints_b_ = check_constraints(solution_vec); +} + +void +Spring_spacer::solve(Col_hpositions*positions) const { assert(check_feasible()); Mixed_qp lp(cols.size()); make_matrices(lp.quad,lp.lin, lp.const_term); make_constraints(lp); + set_fixed_cols(lp); Vector start=find_initial_solution(); - Vector sol(lp.solve(start)); - if (!check_constraints(sol)) { - WARN << "solution doesn't satisfy constraints.\n" ; - } - Real energy_f =lp.eval(sol); - position_loose_cols(sol); + Vector solution_vec(lp.solve(start)); - Array posns(sol); - posns.push(energy_f); - return posns; + positions->satisfies_constraints_b_ = check_constraints(solution_vec); + if (!positions->satisfies_constraints_b_) { + WARN << "solution doesn't satisfy constraints.\n" ; + } + position_loose_cols(solution_vec); + positions->energy_f_ = lp.eval(solution_vec); + positions->config = solution_vec; + positions->error_col_l_arr_ = error_pcol_l_arr(); + } /** @@ -292,7 +318,7 @@ Spring_spacer::add_column(PCol *col, bool fixed, Real fixpos) cols.push(c); } -Array +Line_of_cols Spring_spacer::error_pcol_l_arr()const { Array retval; @@ -445,7 +471,7 @@ Spring_spacer::calc_idealspacing() } if ( d_iter.ok() && now >= d_iter.when()) { Durations_iter d2 = d_iter; - Moment shortest = (Real)INT_MAX; //ugh INFTY; + Moment shortest = infinity_mom; while (d2.ok() && d2.when() <= now) { shortest = shortest musical_b()) { - ideal_arr_[i] = cols[i].minright() + 2 PT; - hooke_arr_[i] = 2.0; + Real symbol_distance =cols[i].minright() + 2 PT; + Real durational_distance = 0; + if (i+1 < cols.size()) { Moment delta_t = scol_l(i+1)->when() - scol_l(i)->when() ; - Real dist = delta_t ? paper_l()->duration_to_dist(delta_t) : 0; - if (delta_t && dist > ideal_arr_[i]) - ideal_arr_[i] = dist; + if (delta_t) + durational_distance = paper_l()->duration_to_dist(delta_t) ; + symbol_distance += cols[i+1].minleft(); } + + ideal_arr_[i] = symbol_distance >? durational_distance; + hooke_arr_[i] = 2.0; } } for (int i=0; i < cols.size(); i++) { @@ -495,11 +525,14 @@ Spring_spacer::calc_idealspacing() dist *= delta_t / shortest_len; if (!scol_l(i+1)->musical_b() ) { - if (ideal_arr_[i+1] + cols[i+1].minleft() < dist) { - ideal_arr_[i+1] = dist/2 + cols[i+1].minleft(); - hooke_arr_[i+1] =1.0; - } - ideal_arr_[i] = dist/2; + Real minimum_dist = cols[i+1].minleft() + 2 PT + cols[i].minright() ; + if (ideal_arr_[i+1] + minimum_dist < dist) { + ideal_arr_[i] = dist - ideal_arr_[i+1]; + // hooke_arr_[i+1] =1.0; + } else { + ideal_arr_[i] = minimum_dist; + } + } else ideal_arr_[i] = dist; } @@ -509,7 +542,6 @@ Spring_spacer::calc_idealspacing() assert (ideal_arr_[i] >=0 && hooke_arr_[i] >=0); connect(i, i+1, ideal_arr_[i], hooke_arr_[i]); } - } @@ -527,56 +559,4 @@ Spring_spacer::constructor() { return new Spring_spacer; } - -#if 0 -void obsolete() -{ - for (int i=0; i < cols.size(); i++) { - if (!scol_l(i)->used_b()) - continue; - - - int j = i+1; - - if (scol_l(i)->musical_b()) { - assert ( j < cols.size()); - - for (int n=0; n < scol_l(i)->durations.size(); n++) { - Moment d = scol_l(i)->durations[n]; - Real dist = paper_l()->duration_to_dist(d); - Real strength = scol_l(i)->durations[0]/scol_l(i)->durations[n]; - assert(strength <= 1.0); - - while (j < cols.size()) { - if (scol_l(j)->used_b() - && scol_l(j)->when() >= d + scol_l(i)->when() ) - break; - j++; - } - if ( j < cols.size() ){ - Moment delta_desired = scol_l(j)->when() - (d+scol_l(i)->when()); - dist += paper_l()->duration_to_dist(delta_desired); - if (scol_l(j)->musical_b()) { - dist += cols[j].minleft() + 2 PT; - } - connect(i, j, dist, strength); - } - } - } else if (j < cols.size()) { - while (!scol_l(j)->used_b()) - j++; - - /* attach i to the next column in use. This exists, since - the last col is breakable, and therefore in use - */ - - Moment d = scol_l(j)->when() - scol_l(i)->when(); - Real minimal_f = cols[i].minright() +cols[j].minleft() + 2 PT; - Real durdist_f = (d) ? paper_l()->duration_to_dist(d) : 0; // todo - - connect(i, j, minimal_f