From edafc7f228097872b0b80a37300c205ec21a4241 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 8 Nov 1999 21:37:02 +0100 Subject: [PATCH] patch::: 1.3.4.jcn1 pl 4.jcn1 - junked some chord guessing code - bf: lookup size (-1) for chord-name accidentals - bf: ly2dvi's MFINPUTS setting --- CHANGES | 5 +++++ VERSION | 2 +- input/test/banter-chords.ly | 6 +++++ lily/chord.cc | 45 +++++++++---------------------------- scm/chord-names.scm | 20 ++++------------- scripts/ly2dvi.py | 2 +- 6 files changed, 28 insertions(+), 52 deletions(-) diff --git a/CHANGES b/CHANGES index 81585aa915..276fb767e5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +pl 4.jcn1 + - junked some chord guessing code + - bf: lookup size (-1) for chord-name accidentals + - bf: ly2dvi's MFINPUTS setting + pl 2.jcn3 - chords: * Chord is item diff --git a/VERSION b/VERSION index 3262ab2017..ddbc5b97da 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=4 -MY_PATCH_LEVEL= +MY_PATCH_LEVEL=jcn1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/test/banter-chords.ly b/input/test/banter-chords.ly index 307b8656fa..ee9a67b9ec 100644 --- a/input/test/banter-chords.ly +++ b/input/test/banter-chords.ly @@ -9,6 +9,12 @@ TestedFeatures = "Banter named chords"; % test German (Banter) naming % for more conventional naming, comment scm stuff out +% urg, +% this shows a serious shortcoming with our guile approach: +% we can't (easily) display banter/non banter chords alongside +% eachother. These guile lists are fixed in the guile environment +% when this file has been parsed... + % { #(set! pitch-names-alist (append diff --git a/lily/chord.cc b/lily/chord.cc index 8dbc57a6c7..f6e1341d9e 100644 --- a/lily/chord.cc +++ b/lily/chord.cc @@ -494,9 +494,8 @@ Chord::pitch2molecule (Musical_pitch p) const Molecule mol = lookup_l ()->text ("", p.str ().left_str (1).upper_str (), paper_l ()); if (p.accidental_i_) - // urg, how to select the feta-1 font? mol.add_at_edge (X_AXIS, RIGHT, - lookup_l ()->accidental (p.accidental_i_, 0), 0); + paper_l ()->lookup_l (-2)->accidental (p.accidental_i_, 0), 0); return mol; } @@ -575,23 +574,11 @@ Chord::banter (Array pitch_arr, Chord_name* name_p) const int accidental = p.accidental_i_ - scale[(step - 1) % 7].accidental_i_; if ((step < 16) && (has[step] != -1)) has[step] = accidental == -1 ? -1 : 1; + // only from guile table ? if ((step == 3) && (accidental == -1)) { mod_str = "m"; } - /* - urg. - This routine gets a lot simpler, if we don't try to be catch - the 'dim' chords. However, we'll have to list every exceptional - 'dim' chord in scm: otherwise we'll get stuff like Cdim7-, iso - Cdim7, etc - */ -#ifdef SMART_DIM - else if ((step == 5) && (accidental == -1) && (has[3] == -1)) - { - mod_str = "dim"; - } -#endif else if (accidental || (!(step % 2) || ((i == add_arr.size () - 1) && (step > 5)))) @@ -603,26 +590,11 @@ Chord::banter (Array pitch_arr, Chord_name* name_p) const add_str += "maj7"; } else -#ifdef SMART_DIM { - if ((step % 2) && (accidental == -1) - && (has[3] == -1) && (has[5] == -1)) - { - if (i != add_arr.size () - 1) - sep_str = ""; - else - add_str += to_str (step); - } - else -#endif - { - add_str += to_str (step); - if (accidental) - add_str += accidental < 0 ? "-" : "+"; - } -#ifdef SMART_DIM + add_str += to_str (step); + if (accidental) + add_str += accidental < 0 ? "-" : "+"; } -#endif } } @@ -652,7 +624,12 @@ Chord::banter (Array pitch_arr, Chord_name* name_p) const } } - +/* + This routine tries to guess tonic in a possibly inversed chord, ie + should produce: C. + This is only used for chords that are entered as simultaneous notes, + chords entered in \chord mode are fully defined. + */ int Chord::find_tonic_i (Array const* pitch_arr_p) { diff --git a/scm/chord-names.scm b/scm/chord-names.scm index 597679a2cf..3329c144d6 100644 --- a/scm/chord-names.scm +++ b/scm/chord-names.scm @@ -12,22 +12,10 @@ ;((6 . 0) . ("H" "")) ;((6 . -1) . ("B" ("feta-1" . ""))) - ; urg, temp hack for accidental size: can't set from Chord:: - ((0 . 1) . ("C" ("feta-1" . ""))) - ((1 . 1) . ("D" ("feta-1" . ""))) - ((2 . 1) . ("E" ("feta-1" . ""))) - ((3 . 1) . ("F" ("feta-1" . ""))) - ((4 . 1) . ("G" ("feta-1" . ""))) - ((5 . 1) . ("A" ("feta-1" . ""))) - ((6 . 1) . ("B" ("feta-1" . ""))) - - ((0 . -1) . ("C" ("feta-1" . ""))) - ((1 . -1) . ("D" ("feta-1" . ""))) - ((2 . -1) . ("E" ("feta-1" . ""))) - ((3 . -1) . ("F" ("feta-1" . ""))) - ((4 . -1) . ("G" ("feta-1" . ""))) - ((5 . -1) . ("A" ("feta-1" . ""))) - ((6 . -1) . ("B" ("feta-1" . ""))) + ; C-p/C-r current feta chars for sharp/flat + ; don't use them: ly2dvi breaks (inputenc package) + ;((0 . 1) . ("C" ("feta-1" . ""))) + ;((0 . -1) . ("C" ("feta-1" . ""))) ) pitch-names-alist)) diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index d2ab97ae06..57702825d5 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -468,7 +468,7 @@ class Properties: t='' if os.environ.has_key ('MFINPUTS'): t = os.environ['MFINPUTS'] - os.environ['MFINPUTS'] = os.pathsep + t + \ + os.environ['MFINPUTS'] = t + os.pathsep + \ os.path.join(this.get('root'), 'mf') if os.environ.has_key('TMP'): -- 2.39.2