From: fred Date: Tue, 26 Mar 2002 21:45:38 +0000 (+0000) Subject: lilypond-1.1.16 X-Git-Tag: release/1.5.59~2662 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=10fe542db6a6a11b2abb194ac28b8bb542406f69;p=lilypond.git lilypond-1.1.16 --- diff --git a/NEWS b/NEWS index c4bbcd3efc..a2c9b3d6a0 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,19 @@ +pl 15.uu1 + - dynamic fix. + - junked abbrev stuff from parser. + +pl15.tca1 + - fixed verbatim option behaviour for mudela-book. + - added mudela-book option intertext="some text" + - mudela-book now understand latex \begin{verbatim} + +pl 15.jcn1 + - chord inversion: + * enter C/E + * display chord names according to boolean property + \property Score.chordInversion; + +********* pl 15 pl 14.hwn1 diff --git a/TODO b/TODO index cbc7bc7157..a5006302d9 100644 --- a/TODO +++ b/TODO @@ -21,9 +21,6 @@ BUGS: - repeat bars span staffs - placement alternative number - * who is trying to print too (small/big) piano braces all the time? - warning: piano brace too small (16.000pt) - * latex bla.tex broken (titles / \lilyfooter stuff?) * msgfmt -o check? @@ -54,8 +51,6 @@ BUGS: * repeat bars: need distance after ":|" and before "|:" - * The time signature warnings still remain, will be fixed later. - Summary of minor spelling irregularities: - capitalization/use of underscores in property names @@ -141,8 +136,6 @@ STUFF gs: Error: /undefined in draw_beam gs: Operand stack: - * run texhash after installing .tex - * fix vertical alignment and stafflines * GrandStaff needs more work -- I want a single word @@ -153,8 +146,6 @@ STUFF through, so the \property Voice.Instrument would be a stop, and \property GrandStaff.instrument would be PipeOrgan...) - * make Tie_req a "command" { ~ } - * revise the Score_priority_align_engraver concept. It sucks. * make new VoiceOne, VoiceTwo, VoiceThree contexts with @@ -184,8 +175,6 @@ ydirection and hshift preset * fix audio-items (don't use (input) requests, but copy data) - * junk My_lily_parser::abbrev_beam_type_i_ - * make sure all ex's have a mudela-version * do rest-collisions for Multi_measure_rests as well. @@ -395,7 +384,6 @@ PROJECTS .. ? * chords - - jazz style inversions C/E => - guitar chords (fret diagrams) - other chord name styles (american(?) style) - basso continuo diff --git a/VERSION b/VERSION index 688692906a..bf0c2ee231 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=1 -PATCH_LEVEL=15 +PATCH_LEVEL=16 MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a diff --git a/input/praeludium-fuga-E.ly b/input/praeludium-fuga-E.ly index c8d3c86919..d9c5e8dbd8 100644 --- a/input/praeludium-fuga-E.ly +++ b/input/praeludium-fuga-E.ly @@ -214,7 +214,14 @@ breakmusic = \notes { ydirection = "-1"; hshift = "1"; } - + \translator { + \StaffContext + + \accepts VoiceFour; + \accepts VoiceThree; + \accepts VoiceTwo; + \accepts VoiceOne; + } } \midi { diff --git a/lily/include/my-lily-parser.hh b/lily/include/my-lily-parser.hh index 5dcb4ef38f..889ccf1bb7 100644 --- a/lily/include/my-lily-parser.hh +++ b/lily/include/my-lily-parser.hh @@ -30,8 +30,6 @@ public: void set_version_check (bool ignore); public: - int abbrev_beam_type_i_; - int default_abbrev_i_; Duration default_duration_; Extender_req* extender_req; Scope *default_header_p_; @@ -68,13 +66,12 @@ private: void add_requests (Simultaneous_music*v); Simultaneous_music * get_note_element (Note_req * ,Duration *); - Simultaneous_music * get_chord (Musical_pitch, Array*, Array*, Duration); + Simultaneous_music * get_chord (Musical_pitch, Array*, Array*, Musical_pitch*, Duration); Simultaneous_music* get_rest_element (String, Duration *); Simultaneous_music* get_word_element (String, Duration*); Melodic_req* get_melodic_req (Melodic_req* melodic, int quotes); String notename_str (Melodic_req* melodic); void set_last_duration (Duration const *); - void set_abbrev_beam (int type_i); friend int yyparse (void*); }; diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index 88a05f6985..5f733ef6db 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -26,9 +26,7 @@ My_lily_parser::My_lily_parser (Sources * source_l) first_b_ = true; source_l_ = source_l; lexer_p_ = 0; - abbrev_beam_type_i_ = 0; default_duration_.durlog_i_ = 2; - default_abbrev_i_ = 0; error_level_i_ = 0; extender_req = 0; fatal_error_i_ = 0; @@ -94,11 +92,6 @@ My_lily_parser::parser_error (String s) exit_status_i_ = 1; } -void -My_lily_parser::set_abbrev_beam (int type_i) -{ - abbrev_beam_type_i_ = type_i; -} void @@ -153,16 +146,11 @@ My_lily_parser::get_rest_element (String s, Duration * duration_p) } Simultaneous_music * -My_lily_parser::get_chord (Musical_pitch tonic, Array* add_arr_p, Array* sub_arr_p, Duration d) +My_lily_parser::get_chord (Musical_pitch tonic, Array* add_arr_p, Array* sub_arr_p, Musical_pitch* inversion_p, Duration d) { Simultaneous_music*v = new Request_chord; v->set_spot (here_input ()); - Note_req* n = new Note_req; - n->pitch_ = tonic; - n->duration_ = d; - v->add_music (n); - for (int i = 0; i < add_arr_p->size (); i++) { Musical_pitch p = tonic; @@ -253,26 +241,64 @@ My_lily_parser::get_chord (Musical_pitch tonic, Array* add_arr_p, i++; } + /* + add tonic + */ + if (!add_arr_p->size () || ((*add_arr_p)[0] != tonic)) + add_arr_p->insert (tonic, 0); + + Array pitch_arr; /* add all that aren't subtracted */ for (int i = 0; i < add_arr_p->size (); i++) { Musical_pitch p = (*add_arr_p)[i]; - Note_req* n = new Note_req; - n->pitch_ = p; - n->duration_ = d; - for (int j = 0; j < sub_arr_p->size (); j++) + int j = 0; + for (; j < sub_arr_p->size (); j++) + if (p == (*sub_arr_p)[j]) + break; + if (j == sub_arr_p->size ()) + pitch_arr.push (p); + } + + if (inversion_p) + { + int i = 0; + for (; i < pitch_arr.size (); i++) + if ((pitch_arr[i].notename_i_ == inversion_p->notename_i_) + && (pitch_arr[i].accidental_i_ == inversion_p->accidental_i_)) + break; + if (i == pitch_arr.size ()) + warning (_ ("invalid inversion pitch (not part of chord)")); + else { - if (p == (*sub_arr_p)[j]) + Array pitches; + Musical_pitch last (0, 0, -5); + for (int j = 0; j < pitch_arr.size (); j++) { - delete n; - n = 0; - break; + Musical_pitch p = pitch_arr[(j + i) % pitch_arr.size ()]; + if (p < last) + { + p.octave_i_ = last.octave_i_; + if (p < last) + p.octave_i_++; + } + pitches.push (p); + last = p; } + pitch_arr = pitches; } - if (n) - v->add_music (n); + delete inversion_p; + } + + for (int i = 0; i < pitch_arr.size (); i++) + { + Musical_pitch p = pitch_arr[i]; + Note_req* n = new Note_req; + n->pitch_ = p; + n->duration_ = d; + v->add_music (n); } v->set_spot (here_input ()); @@ -311,18 +337,7 @@ My_lily_parser::get_parens_request (int t) case '[': case ']': { - if (!abbrev_beam_type_i_) - { - reqs.push (new Beam_req); - } - else - { - Abbreviation_beam_req* a = new Abbreviation_beam_req; - a->type_i_ = abbrev_beam_type_i_; - if (t==']') - abbrev_beam_type_i_ = 0; - reqs.push (a); - } + reqs.push (new Beam_req); } break;