]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.134 release/1.3.134
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 2 Mar 2001 10:26:35 +0000 (11:26 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 2 Mar 2001 10:26:35 +0000 (11:26 +0100)
============

* Bugfix: fixed point-and-click broken in jcn2.

* convert-ly: Added and fixed various entries (our strings with optional "" re\ally suck).

* Small ez play tweaks.  Guess I'm a sucker too.

* Easy-play bugfixes: don't do showpage for each notehead, output
staff-symbol first, moved to lily.ps.

* Bugfix: don't print so many decimals in ps output.

* Bugfix for refman example.

* Added some part combiner doco.

* Bugfix: a broken tie only generates an accidental if it would differ
from an untied note.

1.3.133.h

60 files changed:
CHANGES
Documentation/footer.html.in
Documentation/user/refman.itely
NEWS
VERSION
input/bugs/clef-staff.ly [deleted file]
input/regression/easy-notation.ly
input/test/orchestscore.ly
input/twinkle.ly
lily/a2-engraver.cc
lily/align-interface.cc
lily/align-note-column-engraver.cc
lily/arpeggio-engraver.cc
lily/audio-item.cc
lily/bar-number-engraver.cc
lily/break-align-item.cc
lily/clef-engraver.cc
lily/dot-column-engraver.cc
lily/dot-column.cc
lily/dynamic-engraver.cc
lily/grace-position-engraver.cc
lily/include/audio-item.hh
lily/include/performer-group-performer.hh
lily/include/side-position-interface.hh
lily/instrument-name-engraver.cc
lily/key-performer.cc
lily/local-key-engraver.cc
lily/mark-engraver.cc
lily/midi-item.cc
lily/paper-outputter.cc
lily/performance.cc
lily/piano-pedal-engraver.cc
lily/rest-engraver.cc
lily/script-column-engraver.cc
lily/script-column.cc
lily/script-engraver.cc
lily/script.cc
lily/side-position-interface.cc
lily/staff-performer.cc
lily/syllable-group.cc
lily/system-start-delimiter.cc
lily/tempo-performer.cc
lily/text-engraver.cc
lily/text-spanner-engraver.cc
lily/time-signature-performer.cc
lily/volta-engraver.cc
lily/volta-spanner.cc
ly/performer.ly
make/out/lilypond.lsm
make/out/lilypond.spec
mutopia/Coriolan/c-midi.ly [deleted file]
scm/backend-documentation-lib.scm
scm/grob-description.scm
scm/grob-property-description.scm
scm/interface-description.scm
scm/midi.scm
scm/tex.scm
scm/translator-property-description.scm
scripts/ly2dvi.py
tex/lilyponddefs.tex

diff --git a/CHANGES b/CHANGES
index 098c529656d18e01a807dc0066b5298f4d264102..e23e5ea743a8b1d7d6ef9b13bd5d22f972f4e3d9 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,19 +3,10 @@
 
 * Bugfix: fixed point-and-click broken in jcn2.
 
-1.3.133.jcn4
-============
-
-* convert-ly: Added and fixed various entries (our strings with optional "" really suck).
-
-1.3.133.jcn3
-============
+* convert-ly: Added and fixed various entries (our strings with optional "" re\ally suck).
 
 * Small ez play tweaks.  Guess I'm a sucker too.
 
-1.3.133.jcn2
-============
-
 * Easy-play bugfixes: don't do showpage for each notehead, output
 staff-symbol first, moved to lily.ps.
 
@@ -23,16 +14,30 @@ staff-symbol first, moved to lily.ps.
 
 * Bugfix for refman example.
 
-1.3.133.jcn1
-============
-
 * Added some part combiner doco.
 
 * Bugfix: a broken tie only generates an accidental if it would differ
 from an untied note.
 
-1.3.133
-=======
+1.3.133.hwn1
+============
+
+* Center instrument name on staffs.  Use
+Side_position_interface::align_elements_to_refpoints.
+
+* staff-symbol-referencer-interface, general cleanup of
+interface-description.scm
+
+1.3.133.mb3
+===========
+
+* Bugfix: Time and key signatures in MIDI.
+
+* Bugfix: Tempo changes in MIDI work again.
+
+* Bugfix: ly2dvi file.tex works again.
+
+* Bugfix: don't stretch the space after the last score line.
 
 1.3.132.jcn3
 ============
index 205114b3354ee4c92d7fbf6ebbe08f8054f11676..19ed96aed4e958cb3d1aafa38cfbb4d66ffca3b4 100644 (file)
@@ -28,7 +28,7 @@ Please send comments on these web pages to
 
 <p>
 
-Copyright (c) 1997, 1998, 1999, 2000 Han-Wen Nienhuys and Jan Nieuwenhuizen.
+Copyright (c) 1997--2001 Han-Wen Nienhuys and Jan Nieuwenhuizen.
 
 <p>
 
index cca14f14a8ec2695b3164022405665a153b80351..e4f278c778610a91c65bd969789c011a4e5d0928 100644 (file)
@@ -2525,13 +2525,13 @@ If you just want the splitting of Threads and setting of directions, and
 not the textual markings, you may set the property @var{soloADue} to false:
 
 @lilypond[verbatim,singleline]
-\score {
-  \context Staff <
+  \score {
+    \notes \context Staff <
     \context Voice=one \partcombine Voice
-      \context Thread=one \notes\relative c'' {
+      \context Thread=one\relative c'' {
         b4 a c g
       }
-      \context Thread=two \notes\relative c'' {
+      \context Thread=two\relative c'' {
         d,2 a4 g'
       }
   >
@@ -2539,7 +2539,7 @@ not the textual markings, you may set the property @var{soloADue} to false:
     \translator {
       \VoiceContext
       soloADue = ##f
-    }
+    } }
   }
 }
 @end lilypond
diff --git a/NEWS b/NEWS
index f307b3f3fd406b3aed7198e52dba3cb0c463648a..ca0c0f2de9efb3572984e9bce3787cd58fa5c234 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -45,3 +45,5 @@ internals: LilyPond is smaller, cleaner, more flexible, etc.
 * AsciiScript: ASCII-art output 
 
 * Translations into Japanese, French and Russian
+
+* EZ play notation
diff --git a/VERSION b/VERSION
index 42a0067cb6d0d0b03fc893e226b6229f1bdd9d94..578469acf8d825429aceb871b6ce2488a12727aa 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=133
-MY_PATCH_LEVEL=jcn5
+PATCH_LEVEL=134
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff --git a/input/bugs/clef-staff.ly b/input/bugs/clef-staff.ly
deleted file mode 100644 (file)
index bb1e8e2..0000000
+++ /dev/null
@@ -1,279 +0,0 @@
-% Bugs:
-% * CLef has `Staff' hardcoded
-% * Dynamics into staff: pp/ff at first note cello/contrabass
-
-\header {
-texidoc="Template for part-combining orchestral scores";
-}
-  
-\include "paper16.ly"; 
-% \include "mutopia/Coriolan/coriolan-paper.ly";
-
-
-
-flautoI = \notes\relative c'' {
-  c4 d e f
-  b,4 d c d
-  r2 e4 f
-  \break
-  c4 d e f
-  c4 r e f
-  c4 r e f
-  \break
-  c4 r a r
-  a a r a
-  a2 \property VoiceCombineThread.soloADue = ##f a
-}
-
-flautoII = \notes\relative c'' {
-  g4 b d f
-  r2 c4 d
-  a c c d
-  a4. b8 c4 d
-  c r e r
-  r2 s2
-  a,4 r a r
-  a r r a
-  a2 \property VoiceCombineThread.soloADue = ##f a
-}
-          
-flautiStaff =  \notes \context VoiceCombineStaff = flauti <
-  \property VoiceCombineStaff.midiInstrument = #"flute"
-  \property VoiceCombineStaff.instrument = #"2 Flauti"
-  \property VoiceCombineStaff.instr = #"Fl."
-  %\global
-  \context VoiceCombineVoice=one \partcombine VoiceCombineVoice
-    \context VoiceCombineThread=one \flautoI
-    \context VoiceCombineThread=two \flautoII
->
-
-legniGroup =  \context StaffGroup = legni_group <
-  \flautiStaff
-  %\oboiStaff
-  %\clarinettiStaff
-  %\fagottiStaff
->
-
-violinoI = \notes\relative c'' {
-  c4 d e f
-  c d e f
-  c d e f
-  c d e f
-  c d e f
-  c d e f
-  c4 d e f
-  a8 a a a b b b b
-  d1
-}      
-
-violinoII = \notes\relative c'' { 
-  c4 d e f
-  c d e f
-  c d e f
-  c2 e2
-  c4 d e f
-  c2 e2
-  c,4 d e f
-  a8 a a a b b b b
-  b1
-}
-
-violinoIStaff =  \context Staff = oneViolino <
- \property Staff.midiInstrument = #"violin"
-  \property Staff.instrument = #"Violino I"
-  \property Staff.instr = #"Vl. I"
-  %\notes < 
-    %\global
-    %\context Voice=oneViolino
-    %\context Thread=oneViolino
-    \violinoI
- % >
->
-
-violinoIIStaff =  \context Staff = twoViolino <
-  % MIDI hoort geeneens verschil tussen een
-  % eerste en tweede viool ;-)
-  \property Staff.midiInstrument = #"violin"
-  \property Staff.instrument = #"Violino II"
-  \property Staff.instr = #"Vl. II"
-  %\notes < 
-    %\global
-    %\context Voice=twoViolino
-    %\context Thread=twoViolino
-    \violinoII
- % >
->
-
-violaI = \notes\transpose c, \violinoI
-
-violaII = \notes\transpose c, \violinoII
-
-violiGroup =  \notes \context VoiceCombineStaff = oneVioli <
-  \property VoiceCombineStaff.midiInstrument = #"viola"
-  \property VoiceCombineStaff.instrument = #"Viola"
-  \property VoiceCombineStaff.instr = #"Vla."
-  \clef "alto";
-
-  \key f \major;
-  \skip 1*314; 
-  \bar "|.";
-
-  \context VoiceCombineVoice=oneVioli \partcombine VoiceCombineVoice
-    \context VoiceCombineThread=oneVioli \violaI
-    \context VoiceCombineThread=twoVioli \violaII
->
-
-violoncello = \notes\relative c {
-  c1\ff d e f c d e f c
-}
-
-contrabasso = \notes\relative c {
-  c1\pp
-  d4 e d e
-  e1
-  f4 g f g
-  c1
-  d4 e d e
-  e1
-  f4 g f g
-  c1
-}
-
-
-bassiGroup =  \context PianoStaff = bassi_group \notes <
-  \context StaffCombineStaff=oneBassi {
-    \property StaffCombineStaff.midiInstrument = #"cello"
-    %\property StaffCombineStaff.instrument = #"Violoncello\ne\nContrabasso"
-    \property StaffCombineStaff.instrument = #'(lines "Violoncello" "e" "Contrabasso")
-    \property StaffCombineStaff.instr = #"Vc."
-    
-    \clef "bass";
-    \key es \major;
-    \skip 1*314; 
-    \bar "|.";
-  }
-  \context StaffCombineStaff=twoBassi {
-    \property StaffCombineStaff.midiInstrument = #"contrabass"
-    \property StaffCombineStaff.instrument = #"Contrabasso"
-    \property StaffCombineStaff.instr = #"Cb."
-    
-    \clef "bass";
-    \key as \major;
-    \skip 1*314; 
-    \bar "|.";
-  }
-
-  \context StaffCombineStaff=oneBassi \partcombine StaffCombineStaff
-    \context StaffCombineVoice=oneBassi \violoncello
-    \context StaffCombineVoice=twoBassi \contrabasso
->
-
-
-violiniGroup =  \context GrandStaff = violini_group <
-  \violinoIStaff
-  \violinoIIStaff
->
-
-archiGroup =  \context StaffGroup = archi_group <
-  \violiniGroup
-  \violiGroup
-  \bassiGroup
->
-
-
-\score{
-  <
-    \legniGroup
-    %\ottoniGroup
-    %\timpaniGroup
-    \archiGroup
-  >
-  \header {
-    title = "Coriolan";
-    subtitle = "Ouverture"; 
-    opus = "Opus 62";
-    composer = "Ludwig van Beethoven (1770-1827)";
-    enteredby = "JCN";
-    copyright = "public domain";
-  }
-  %\paper {}
-  \paper{
-    \paperSixteen
-
-    %textheight = 290.0\mm;
-    %linewidth = 195.0\mm;
-    textheight = 285.0\mm;
-    linewidth = 190.0\mm;
-
-    \translator{ \HaraKiriStaffContext }
-    %
-    % The Voice combine hierarchy
-    %
-    \translator{
-      \ThreadContext
-      \name "VoiceCombineThread";
-      \consists "Rest_engraver";
-    }
-    \translator{
-      \VoiceContext
-      \name "VoiceCombineVoice";
-      soloText = #"I."
-      soloIIText = #"II."
-      \remove "Rest_engraver";
-      \accepts "VoiceCombineThread";
-    }
-    \translator{
-      \HaraKiriStaffContext
-      \consists "Mark_engraver";
-      \name "VoiceCombineStaff";
-      \accepts "VoiceCombineVoice";
-    }
-
-    %
-    % The Staff combine hierarchy
-    %
-    \translator{
-      \ThreadContext
-      \name "StaffCombineThread";
-    }
-    \translator{
-      \VoiceContext
-      \name "StaffCombineVoice";
-      \accepts "StaffCombineThread";
-      \consists "Thread_devnull_engraver";
-    }
-    \translator {
-      \HaraKiriStaffContext
-      \name "StaffCombineStaff";
-      \accepts "StaffCombineVoice";
-
-      soloADue = ##t
-      soloText = #""
-      soloIIText = #""
-      % This is non-conventional, but currently it is
-      % the only way to tell the difference.
-      aDueText = #"\\`a2"
-      splitInterval = #'(1 . 0)
-      changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
-    }
-    \translator {
-      \StaffGroupContext
-      \accepts "VoiceCombineStaff";
-      \accepts "StaffCombineStaff";
-    }
-    \translator{ \HaraKiriStaffContext }
-
-    \translator {
-      %\ScoreContext
-      \OrchestralScoreContext
-      \accepts "VoiceCombineStaff";
-      \accepts "StaffCombineStaff";
-      skipBars = ##t 
-
-      markScriptPadding = #4.0
-
-      BarNumber \override #'padding = #3
-      RestCollision \override #'maximum-rest-count = #1
-    }
-  }
-}
index fc5a8f6a84c8c0c06951ddb8125b0243521775f4..a169cbe494259ee39e44abac8c2bb6b6caa39922 100644 (file)
@@ -1,5 +1,5 @@
 \header {
-texidoc  = " Ez-notation prints names in note heads."
+texidoc  = " Ez-notation prints names in note heads.";
 }
 
 \score {
index 06a8b1acf852ea8d9d9ab614e7ab6934c7562803..5dc33ef467730c316a13c20d5865031e122bc5bb 100644 (file)
@@ -17,7 +17,9 @@ c1 | c2 c | c c | R1*5
 \score{ < 
   \context StaffGroup = wood <
     \context Staff = flauto <
-      \property Staff.instrument = "\\rotatebox[origin=c]{90}{Flauto}"
+    %"\\rotatebox[origin=c]{90}{Flauto}"
+    
+      \property Staff.instrument = "Flauto"
       \property Staff.instr = "Fl."
       \m
     >
@@ -82,7 +84,7 @@ c1 | c2 c | c c | R1*5
     >
     \context Staff = vlc <
       %% \property Staff.instrument = "Violoncello"
-      \property StaffCombineStaff.instrument = #'(lines "Violoncello" "e" "Contrabasso")
+      \property Staff.instrument = #'(lines "Violoncello" "e" "Contrabasso")
       \property Staff.instr = "Vlc"
       \m
     >
index 09cb9cff0fd2f025731ce9d7e0c5537f5688ab75..0407456491f7468d163bc9b104cb9597931563f8 100644 (file)
@@ -74,8 +74,7 @@ hegedraagjetekst =  \lyrics{
 }
 
 texte =  \lyrics{ 
-       \property Lyrics . textStyle" =  "italic" 
-%      \property Lyrics . textStyle" =  "roman" 
+       \property Lyrics . LyricText \set #'font-shape = #'italic
        Ah! vous dir -- ai -- je ma -- man " "
        Ce qui cau -- se mon tour --  " " ment
        Pa -- pa veut que je rai -- son -- ne
@@ -85,7 +84,7 @@ texte =  \lyrics{
 }
 
 texti =  \lyrics{
-       \property "Lyrics"."textStyle" =  "roman"
+
        Twin -- kle, twin -- kle, lit -- tle star, " "
        How I won -- der what you  " " are.
        Up a -- bove the world so high, " "
index f767e7004d3826723466128686b666b7f285a952..b6958618bc6d4cb8dd7e617389904f5956139dc2 100644 (file)
@@ -55,7 +55,7 @@ A2_engraver::create_grobs ()
                  && daddy_trans_l_->id_str_.left_str (3) == "one")))
        {
          text_p_ = new Item (get_property ("TextScript"));
-         Side_position::set_axis (text_p_, Y_AXIS);
+         Side_position_interface::set_axis (text_p_, Y_AXIS);
          announce_grob (text_p_, 0);
       
          Direction dir = UP;
@@ -80,7 +80,7 @@ A2_engraver::create_grobs ()
                text = get_property ("aDueText");
            }
          
-         Side_position::set_direction (text_p_, dir);
+         Side_position_interface::set_direction (text_p_, dir);
          text_p_->set_grob_property ("text", text);
        }
     }
@@ -97,14 +97,14 @@ A2_engraver::acknowledge_grob (Grob_info i)
       if (Note_head::has_interface (i.elem_l_))
        {
          Grob*t = text_p_;
-         Side_position::add_support (t, i.elem_l_);
-         if (Side_position::get_axis (t) == X_AXIS
+         Side_position_interface::add_support (t, i.elem_l_);
+         if (Side_position_interface::get_axis (t) == X_AXIS
              && !t->parent_l (Y_AXIS))
            t->set_parent (i.elem_l_, Y_AXIS);
        }
       if (Stem::has_interface (i.elem_l_))
        {
-         Side_position::add_support (text_p_, i.elem_l_);
+         Side_position_interface::add_support (text_p_, i.elem_l_);
        }
     }
          
@@ -174,7 +174,7 @@ A2_engraver::stop_translation_timestep ()
 {
   if (text_p_)
     {
-      Side_position::add_staff_support (text_p_);
+      Side_position_interface::add_staff_support (text_p_);
       typeset_grob (text_p_);
       text_p_ = 0;
     }
index 5df19061aad3e580d2ec1f6c28a4c8c5bbc7e7c9..7aa6de3fc82278b10331c1dbe7d467331ed08cea 100644 (file)
@@ -199,17 +199,16 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
          all_translates .push (w);
          j++;
        }
-    }
 
-  if (isdir_b  (align))
-    {
-      center_offset = total.linear_combination (gh_scm2double (align));
-    }
+      if (isdir_b  (align))
+       {
+         center_offset = total.linear_combination (gh_scm2double (align));
+       }
 
-  for (int j = 0 ;  j < all_grobs.size (); j++)
-    all_grobs[j]->translate_axis (all_translates[j] - center_offset, a);
+      for (int j = 0 ;  j < all_grobs.size (); j++)
+       all_grobs[j]->translate_axis (all_translates[j] - center_offset, a);
+    }
 }
-
 Axis
 Align_interface::axis (Grob*me)
 {
index d03f316746f485ac889e3651a4190c356b0cd2b0..87dd0f079483ff71bdd72e20c017a99ab56900fc 100644 (file)
@@ -48,8 +48,8 @@ Align_note_column_engraver::initialize ()
 {
   align_item_p_ = new Item (get_property ("GraceAlignment"));
   Grace_align_item::set_interface (align_item_p_);
-  Side_position::set_axis (align_item_p_, X_AXIS);
-  Side_position::set_direction (align_item_p_, LEFT);
+  Side_position_interface::set_axis (align_item_p_, X_AXIS);
+  Side_position_interface::set_direction (align_item_p_, LEFT);
   
   // needed  for setting font size.
   announce_grob (align_item_p_, 0);
index 76bc80a5050bd7fd55f66842dbc7ecb44f43ba62..b69aeb35bc85f7418821c4add7ecd6c8045c26bd 100644 (file)
@@ -91,7 +91,7 @@ Arpeggio_engraver::create_grobs ()
        }
       for (int i = 0; i < supports_.size (); i++)
        {
-         Side_position::add_support (arpeggio_, supports_[i]);
+         Side_position_interface::add_support (arpeggio_, supports_[i]);
        }
       announce_grob (arpeggio_, arpeggio_req_);
     }
index fc225388207a3f4e12b25dc2b95a5de9351fa089..a35f1b42cfed62e1d111b5675f6b88791e145577 100644 (file)
@@ -40,9 +40,10 @@ Audio_note::tie_to (Audio_note* t)
 }
 
                    
-Audio_key::Audio_key () // Key_def const& k)
+Audio_key::Audio_key (int acc, bool major)
 {
-  //fixme.
+  accidentals_=acc;
+  major_=major;
 }
 
 Audio_dynamic::Audio_dynamic (Real volume)
index b082ddb1aae0b842615989c86c668b360164048e..eb91eeef961f68cb4938779d7a0cacaad4f0429b 100644 (file)
@@ -119,7 +119,7 @@ Bar_number_engraver::create_items ()
 
   SCM b = get_property ("BarNumber");
   text_p_ = new Item (b);
-  Side_position::set_axis(text_p_,Y_AXIS);
+  Side_position_interface::set_axis(text_p_,Y_AXIS);
 
   announce_grob (text_p_, 0);
 }
index 74dab15ca4e0de6977ba657690a6084de823ce66..779be73cf3340f725b15b2e053a2f554fe58c307 100644 (file)
@@ -69,7 +69,7 @@ Break_align_interface::self_align_callback (SCM element_smob, SCM axis)
    */
   
   
-  return Side_position::aligned_on_self (element_smob, axis);  
+  return Side_position_interface::aligned_on_self (element_smob, axis);  
 }
 
 void
index adc1807f39eb7ac51442fc97655150a97ab4f48b..f0fe112bac76b22f341282e43361d33960c1045b 100644 (file)
@@ -163,7 +163,7 @@ Clef_engraver::create_clef ()
     {
       Item * g = new Item (get_property ("OctavateEight"));
 
-      Side_position::add_support (g,clef_p_);      
+      Side_position_interface::add_support (g,clef_p_);      
 
       g->set_parent (clef_p_, Y_AXIS);
       g->set_parent (clef_p_, X_AXIS);
index 9fc7bbcd04a7d43d45b7144742bb40107f8424f5..9e234405cfc0991fcd81004562f7cd431a6f3650 100644 (file)
@@ -54,8 +54,8 @@ Dot_column_engraver::acknowledge_grob (Grob_info info)
          dotcol_p_ = new Item(get_property ("DotColumn"));
 
          Dot_column::set_interface (dotcol_p_);
-         Side_position::set_axis (dotcol_p_, X_AXIS);
-         Side_position::set_direction (dotcol_p_, RIGHT);      
+         Side_position_interface::set_axis (dotcol_p_, X_AXIS);
+         Side_position_interface::set_direction (dotcol_p_, RIGHT);      
          announce_grob (dotcol_p_, 0);
        }
 
index cfd51975ac96abfd809569cd8bb1a7422f655204..db7e3b0d3c10e7f9b9906b0bfacc369df8bffec4 100644 (file)
@@ -124,7 +124,7 @@ Dot_column::add_head (Grob * me, Grob *rh)
   Grob * d = unsmob_grob (rh->get_grob_property ("dot"));
   if (d)
     {
-      Side_position::add_support (me,rh);
+      Side_position_interface::add_support (me,rh);
 
       Pointer_group_interface ::add_element (me, "dots",d);
       d->add_offset_callback (Dot_column::force_shift_callback_proc , Y_AXIS);
index 2aee3603d13b643874daf05d7cea6f0bd53c333d..ae16fb9aaf0ce848f861ad68238df9efd8b6db26 100644 (file)
@@ -140,7 +140,7 @@ Dynamic_engraver::process_music ()
        {
          line_spanner_ = new Spanner (get_property ("DynamicLineSpanner"));
 
-         Side_position::set_axis (line_spanner_, Y_AXIS);
+         Side_position_interface::set_axis (line_spanner_, Y_AXIS);
          Axis_group_interface::set_interface (line_spanner_);
          Axis_group_interface::set_axes (line_spanner_, Y_AXIS, Y_AXIS);
 
@@ -174,8 +174,8 @@ Dynamic_engraver::process_music ()
       script_p_->set_grob_property ("text",
                                   script_req_l_->get_mus_property ("text"));
       
-      Side_position::set_direction (script_p_, LEFT);
-      Side_position::set_axis (script_p_, X_AXIS);
+      Side_position_interface::set_direction (script_p_, LEFT);
+      Side_position_interface::set_axis (script_p_, X_AXIS);
       
       if (Direction d = script_req_l_->get_direction ())
        Directional_element_interface::set (line_spanner_, d);
@@ -339,7 +339,7 @@ Dynamic_engraver::typeset_all ()
       /*
        To make sure that this works
       */
-      Side_position::add_staff_support (finished_line_spanner_);
+      Side_position_interface::add_staff_support (finished_line_spanner_);
       /*
        We used to have
        
@@ -366,7 +366,7 @@ Dynamic_engraver::acknowledge_grob (Grob_info i)
     {
       if (line_spanner_)
        {
-         Side_position::add_support (line_spanner_,i.elem_l_);
+         Side_position_interface::add_support (line_spanner_,i.elem_l_);
          add_bound_item (line_spanner_,dynamic_cast<Item*>(i.elem_l_));
        }
     }
index b5bf1b1a054ac8a3495b5ee674efb76d41c76555..0f732a37d8990bf74cb630084b3e5860c8a1e1c1 100644 (file)
@@ -67,7 +67,7 @@ Grace_position_engraver::create_grobs ()
   if (align_l_)
     {
       for (int i=0; i < support_.size (); i++)
-       Side_position::add_support (align_l_,support_[i]);
+       Side_position_interface::add_support (align_l_,support_[i]);
       support_.clear ();
     }
 }
@@ -75,7 +75,7 @@ Grace_position_engraver::create_grobs ()
 void
 Grace_position_engraver::stop_translation_timestep ()
 {
-  if (align_l_ && !Side_position::supported_b (align_l_))
+  if (align_l_ && !Side_position_interface::supported_b (align_l_))
     {
   /*
      We don't have support. Either some moron tried attaching us to a rest,
index 04b876761fff6664d4182368b44a1fc80a8f349b..66246a074a2e65aa4e1466ed81b914913ab941fa 100644 (file)
@@ -46,8 +46,10 @@ public:
 class Audio_key : public Audio_item
 {
 public:
-  Audio_key (); //Newkey_def const& key);
-  // FIXME
+  Audio_key (int acc, bool major);
+
+  int accidentals_;
+  bool major_;
 };
 
 class Audio_instrument : public Audio_item
index 8101186210abefc2f85f3a1f00019158c9a28460..a516331ec7cc36fdaf80cb85d2ff3e679b4abe36 100644 (file)
@@ -25,9 +25,9 @@ public:
   virtual void announce_element (Audio_element_info);
 protected:
   Array<Audio_element_info> announce_info_arr_;
+  void create_audio_elements ();
 
 private:
-  void create_audio_elements ();
   void acknowledge_audio_elements ();
 };
 
index 38ab695aa1e2184fbeed0d3920d6726d7ef3b618..9ce408a662e92c44f161c70d406abc223253847e 100644 (file)
 #include "item.hh"
 
 /*
-  TODO: move  out unrelated callbacks.
+  TODO: move out unrelated callbacks.
 
   TODO: reduce number of methods.
 */
-struct Side_position
+struct Side_position_interface
 {
 public:
-  DECLARE_SCHEME_CALLBACK(side_position, (SCM  element, SCM axis));
-  DECLARE_SCHEME_CALLBACK(aligned_on_self, (SCM  element, SCM axis));
+  DECLARE_SCHEME_CALLBACK(aligned_on_support_extents, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK(aligned_on_support_refpoints, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK(aligned_on_self, (SCM element, SCM axis));
   DECLARE_SCHEME_CALLBACK(aligned_side, (SCM element, SCM axis));  
   DECLARE_SCHEME_CALLBACK(quantised_position, (SCM element, SCM axis));
   DECLARE_SCHEME_CALLBACK(centered_on_parent, (SCM element, SCM axis));
+
+  static SCM general_side_position (Grob*, Axis, bool);
   static void set_axis (Grob*,Axis);
   static void set_minimum_space (Grob*,Real);
   static void set_padding (Grob*,Real);
index 852ef176d35a4a0b4d963b95cbb5d4c39a9e7b84..9171bb691939e39e1536db8997eedc46fa0ce51a 100644 (file)
 #include "system-start-delimiter.hh"
 #include "side-position-interface.hh"
 #include "align-interface.hh"
+#include "axis-group-interface.hh"
+#include "translator-group.hh"
 
 class Instrument_name_engraver : public Engraver
 {
   Item *text_;
-  Grob * delim_ ;
-
+  Grob *delim_ ;
+  
   void create_text (SCM s);
 public:
   VIRTUAL_COPY_CONS(Translator);
   Instrument_name_engraver ();
-
+  virtual void initialize ();
   virtual void acknowledge_grob (Grob_info);
   virtual void stop_translation_timestep ();
 };
@@ -37,11 +39,19 @@ Instrument_name_engraver::Instrument_name_engraver ()
 }
 
 
+void
+Instrument_name_engraver::initialize ()
+{
+  daddy_trans_l_->set_property ("instrumentSupport", SCM_EOL); 
+}
+
 void
 Instrument_name_engraver::stop_translation_timestep ()
 {
   if (text_)
     {
+      text_->set_grob_property ("side-support-elements",
+                               get_property ("instrumentSupport"));
       typeset_grob (text_);
       text_ = 0;
     }
@@ -82,12 +92,20 @@ Instrument_name_engraver::acknowledge_grob (Grob_info i)
          
     }
 
-  if (Align_interface::has_interface (i.elem_l_)
-      && Align_interface::axis  (i.elem_l_) == Y_AXIS      
-      //System_start_delimiter::has_interface (i.elem_l_)
-      && i.origin_trans_l_->daddy_trans_l_ == daddy_trans_l_)
+  if (dynamic_cast<Spanner*> (i.elem_l_)
+      && i.elem_l_->has_interface (ly_symbol2scm ("dynamic-interface")))
+    return;
+  
+  if (dynamic_cast<Spanner*> (i.elem_l_)
+      &&((Axis_group_interface::has_interface (i.elem_l_)
+        && Axis_group_interface::axis_b (i.elem_l_, Y_AXIS))
+        || (Align_interface::has_interface (i.elem_l_)
+            && Align_interface::axis  (i.elem_l_) == Y_AXIS)))
     {
-      delim_ = i.elem_l_;
+      SCM nl = gh_cons (i.elem_l_->self_scm (),
+                       get_property ("instrumentSupport"));
+
+      daddy_trans_l_->set_property ("instrumentSupport", nl);
     }
 }
 
index b379691f75691bb8230d7d8c218455036f7dbe81..65bcfba7b26692f3873150d10f6d4009e97bac7c 100644 (file)
@@ -6,6 +6,7 @@
   (c)  1997--2001 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
+#include "lily-guile.hh"
 #include "command-request.hh"
 #include "audio-item.hh"
 #include "performer.hh"
@@ -43,10 +44,14 @@ Key_performer::~Key_performer ()
 void
 Key_performer::create_audio_elements ()
 {
-  if (key_req_l_ &&
-      gh_list_p (key_req_l_->get_mus_property ("pitch-alist")))
+  if (key_req_l_) 
     {
-      audio_p_ = new Audio_key (); // *key_req_l_->key_);
+      SCM pitchlist = key_req_l_->get_mus_property ("pitch-alist");
+      SCM proc = scm_eval2 (ly_symbol2scm ("accidentals-in-key"), SCM_EOL); 
+      SCM acc = gh_call1 (proc, pitchlist);
+      proc = scm_eval2 (ly_symbol2scm ("major-key"), SCM_EOL);
+      SCM major = gh_call1 (proc, pitchlist);
+      audio_p_ = new Audio_key (gh_scm2int(acc), major == SCM_BOOL_T); 
       Audio_element_info info (audio_p_, key_req_l_);
       announce_element (info);
       key_req_l_ = 0;
index 805543171301d5c606f77c74e959192f7cbe1732..e4ac50238835b9f8d7cd934e83a19a46c1ec2b06 100644 (file)
@@ -147,7 +147,7 @@ Local_key_engraver::create_grobs ()
                                         to_boolean (note_l->get_mus_property ("cautionary")),
                                         extra_natural,
                                         tie_break_reminder);
-             Side_position::add_support (key_item_p_,support_l);
+             Side_position_interface::add_support (key_item_p_,support_l);
            }
          
          /*
@@ -192,7 +192,7 @@ Local_key_engraver::create_grobs ()
   
   if (key_item_p_ && grace_align_l_)
     {
-      Side_position::add_support (grace_align_l_,key_item_p_);
+      Side_position_interface::add_support (grace_align_l_,key_item_p_);
       grace_align_l_ =0;
     }
 
@@ -206,7 +206,7 @@ Local_key_engraver::create_grobs ()
        (Arpeggios are engraved left of accidentals, of course.)
        */
       for (int i=0;  i < arpeggios_.size ();  i++)
-       Side_position::add_support (arpeggios_[i], key_item_p_);
+       Side_position_interface::add_support (arpeggios_[i], key_item_p_);
 
       arpeggios_.clear ();
     }
@@ -224,7 +224,7 @@ Local_key_engraver::stop_translation_timestep()
   if (key_item_p_)
     {
       for (int i=0; i < support_l_arr_.size(); i++)
-       Side_position::add_support (key_item_p_,support_l_arr_[i]);
+       Side_position_interface::add_support (key_item_p_,support_l_arr_[i]);
 
       typeset_grob (key_item_p_);
       key_item_p_ =0;
index e559ff8029f547304ffbfee1973507c25e2cfce6..b860caba17b99b9c9e1ac399495423c54b991e50 100644 (file)
@@ -107,7 +107,7 @@ Mark_engraver::create_items (Request *rq)
   text_p_ = new Item (s);
 
 
-  Side_position::set_axis (text_p_, Y_AXIS);
+  Side_position_interface::set_axis (text_p_, Y_AXIS);
 
   announce_grob (text_p_, rq);
 }
index 64aa262a260c83559f900b3bd26f77499fe80b52..e4cc8262f49c1e6e28b4550854c0457ea3fed35d 100644 (file)
@@ -357,24 +357,12 @@ Midi_key::Midi_key (Audio_key*a)
 String
 Midi_key::str () const
 {
-  // fxime.
-  int sharps_i = 0; //audio_l_->key_.sharps_i ();
-  int flats_i = 0; //audio_l_->key_.flats_i ();
-
-  // midi cannot handle non-conventional keys
-  if (flats_i && sharps_i)
-    {
-      String str = _f ("unconventional key: flats: %d, sharps: %d", flats_i, 
-        sharps_i);
-      flats_i = sharps_i = 0;
-    }
-  int accidentals_i = sharps_i - flats_i;
-
   String str = "ff5902";
-  str += String_convert::i2hex_str (accidentals_i, 2, '0');
-
-  // (int)audio_l_->key_.minor_b ()
-  str += String_convert::i2hex_str (0, 2, '0');
+  str += String_convert::i2hex_str (audio_l_->accidentals_, 2, '0');
+  if (audio_l_->major_)
+    str += String_convert::i2hex_str (0, 2, '0');
+  else
+    str += String_convert::i2hex_str (1, 2, '0');
   return String_convert::hex2bin_str (str);
 }
 
index 5317b7ada185ef110ebd770b8654a60e5407ef80..46016c7573f425a7adfdadd430aa55d71a86b776 100644 (file)
@@ -97,6 +97,11 @@ Paper_outputter::output_header ()
       generate = generate.left_str (generate.length_i () - 1);
     }
 
+  /*
+    Make fixed length time stamps
+   */
+  generate = generate + to_str (' ' * (120 - generate.length_i ())>? 0)  ;
+  
   SCM args_scm = 
     gh_list (ly_str02scm (creator.ch_l ()),
             ly_str02scm (generate.ch_l ()), SCM_UNDEFINED);
index 7418c30f86eb2fd3ca47958aa2b32ed0d5bbf834..9e8715b1116d757bdec861186b7a44963f310fd5 100644 (file)
@@ -104,6 +104,11 @@ Performance::output_header_track (Midi_stream& midi_stream)
       str += ctime (&t);
       str = str.left_str (str.length_i() - 1);
     }
+
+  /*
+    Pad out time stamps to 120 chars.  */
+  str = str + to_str (' ' , (120 - str.length_i ()) >? 0);
+  
   Audio_text generate_a (Audio_text::TEXT, str);
   Midi_text generate (&generate_a);
   midi_track.add (Moment (0), &generate);
index 641a7fb0f7eb8e6e21c3982c11b193b01ce04cd3..527bd396c775745b99cd4197e1af8f5a917e60af 100644 (file)
@@ -90,15 +90,15 @@ Piano_pedal_engraver::acknowledge_grob (Grob_info info)
        {
          if (Rhythmic_head::has_interface (info.elem_l_))
            {
-             Side_position::add_support (p->item_p_, info.elem_l_);
+             Side_position_interface::add_support (p->item_p_, info.elem_l_);
 
-             if (Side_position::get_axis(p->item_p_) == X_AXIS
+             if (Side_position_interface::get_axis(p->item_p_) == X_AXIS
                  && !p->item_p_->parent_l (Y_AXIS))
                p->item_p_->set_parent (info.elem_l_, Y_AXIS);
            }
          if (Stem::has_interface (info.elem_l_))
            {
-             Side_position::add_support (p->item_p_,info.elem_l_);
+             Side_position_interface::add_support (p->item_p_,info.elem_l_);
            }
        }
     }
@@ -195,7 +195,7 @@ Piano_pedal_engraver::stop_translation_timestep ()
     {
       if (p->item_p_)
        {
-         Side_position::add_staff_support (p->item_p_);
+         Side_position_interface::add_staff_support (p->item_p_);
          
          /*
            Hmm.
@@ -204,7 +204,7 @@ Piano_pedal_engraver::stop_translation_timestep ()
            {
              if (sustain)
                {
-                 Side_position::add_support (p->item_p_,sustain);
+                 Side_position_interface::add_support (p->item_p_,sustain);
                }
            }
          typeset_grob (p->item_p_);
index 7fbaa78e0da283fbebb023301b60e4a06456b400..69839a7e295aae810632551ccd700718f9655142 100644 (file)
@@ -70,7 +70,6 @@ Rest_engraver::create_grobs ()
       rest_p_ = new Item (get_property ("Rest"));
       Rhythmic_head::set_interface (rest_p_);
       Staff_symbol_referencer::set_interface (rest_p_);
-
       
       int durlog  = unsmob_duration (rest_req_l_->get_mus_property ("duration"))-> duration_log ();
       
index 185ae49cdf0110239489003ba471c3eacc10a78d..5f0b41db4e569104ac7f8bcc635d939cf7f89613 100644 (file)
@@ -57,10 +57,10 @@ void
 Script_column_engraver::acknowledge_grob(Grob_info inf) 
 {
   Item *thing = dynamic_cast<Item*> (inf.elem_l_);
-  if (thing && Side_position::has_interface (inf.elem_l_)) // ugh FIXME
+  if (thing && Side_position_interface::has_interface (inf.elem_l_)) // ugh FIXME
     {
       if (!Item::breakable_b (thing)
-         && Side_position::get_axis (inf.elem_l_) == Y_AXIS)
+         && Side_position_interface::get_axis (inf.elem_l_) == Y_AXIS)
        {
          script_l_arr_.push (thing);
        }
index 2c7e6b24de0cb88134682909bd4e67768baf8bd2..1bddead7707182d515783dab3eba12d3ab7fbb36 100644 (file)
@@ -46,7 +46,7 @@ Script_column::before_line_breaking (SCM smob)
                                     
   for (int i=0; i < staff_sided.size (); i++)
     {
-      arrs[Side_position::get_direction (staff_sided[i])]
+      arrs[Side_position_interface::get_direction (staff_sided[i])]
        .push (staff_sided[i]);
     }
 
@@ -61,7 +61,7 @@ Script_column::before_line_breaking (SCM smob)
       {
 
        if (last)
-         Side_position::add_support( arr[i],last);
+         Side_position_interface::add_support( arr[i],last);
            
        arr[i]->remove_grob_property ("script-priority");
        last = arr[i];
index c8d677d26ea34854e483ba997ed1fd496204de88..22870e20757463d6acedb92ccf23d8429ae3a789 100644 (file)
@@ -100,13 +100,13 @@ Script_engraver::create_grobs ()
        */
       SCM axisprop = get_property ("scriptHorizontal");
       bool xaxis = to_boolean (axisprop);
-      Side_position::set_axis (p, xaxis ? X_AXIS : Y_AXIS);
+      Side_position_interface::set_axis (p, xaxis ? X_AXIS : Y_AXIS);
       
       if (!follow_staff && ! xaxis)
        p->set_grob_property ("staff-support", SCM_BOOL_T);
 
       if (!xaxis && follow_staff)
-       p->add_offset_callback (Side_position::quantised_position_proc, Y_AXIS);
+       p->add_offset_callback (Side_position_interface::quantised_position_proc, Y_AXIS);
       
       
       p->set_grob_property ("script-priority", priority);
@@ -134,7 +134,7 @@ Script_engraver::acknowledge_grob (Grob_info inf)
          Grob*e = script_p_arr_[i];
 
          e->set_grob_property ("direction-source", inf.elem_l_->self_scm ());
-         Side_position::add_support (e, inf.elem_l_);
+         Side_position_interface::add_support (e, inf.elem_l_);
        }
     }
   else if (Rhythmic_head::has_interface (inf.elem_l_))
@@ -147,11 +147,11 @@ Script_engraver::acknowledge_grob (Grob_info inf)
            {
              e->set_parent (inf.elem_l_, X_AXIS);
            }
-         if (Side_position::get_axis (e) == X_AXIS
+         if (Side_position_interface::get_axis (e) == X_AXIS
              && !e->parent_l (Y_AXIS))
            e->set_parent (inf.elem_l_, Y_AXIS);
          
-         Side_position::add_support (e,inf.elem_l_);
+         Side_position_interface::add_support (e,inf.elem_l_);
        }
     }  
 }
@@ -164,7 +164,7 @@ Script_engraver::stop_translation_timestep()
       Grob * sc = script_p_arr_[i];
       if (to_boolean (sc->get_grob_property ("staff-support")))
        {
-         Side_position::add_staff_support (sc);
+         Side_position_interface::add_staff_support (sc);
        }
       typeset_grob (sc);
     }
index 6ed6ee306c1c9ae8405631556cca1d67cf6baab0..b19724f6b18ef2f367ea9cb4612e0482ff7f0c6c 100644 (file)
@@ -44,8 +44,8 @@ Script::after_line_breaking (SCM smob)
 {
   Grob * me = unsmob_grob (smob);
 
-  Direction d = Side_position::get_direction (me);
-  Side_position::set_direction (me,d);
+  Direction d = Side_position_interface::get_direction (me);
+  Side_position_interface::set_direction (me,d);
 
   return SCM_UNSPECIFIED;
 }
@@ -62,7 +62,7 @@ Script::brew_molecule (SCM smob)
    if (isdir_b (d))
      dir = to_dir (d);
 #endif
-  Direction dir = Side_position::get_direction(me);
+  Direction dir = Side_position_interface::get_direction(me);
   return get_molecule (me, dir).smobbed_copy();
 }
 
index f19e5471ccc8c5d317a26a37301b79e634cc14e6..f18363f95dc5ed8dd2758a5cf1437226f5a08590 100644 (file)
@@ -16,7 +16,7 @@
 #include "group-interface.hh"
 
 void
-Side_position::add_support (Grob*me, Grob*e)
+Side_position_interface::add_support (Grob*me, Grob*e)
 {
   Pointer_group_interface::add_element (me, "side-support-elements",e);
 }
@@ -24,7 +24,7 @@ Side_position::add_support (Grob*me, Grob*e)
 
 
 Direction
-Side_position::get_direction (Grob*me)
+Side_position_interface::get_direction (Grob*me)
 {
   SCM d = me->get_grob_property ("direction");
   if (isdir_b (d) && to_dir (d))
@@ -41,23 +41,31 @@ Side_position::get_direction (Grob*me)
   Grob * e = unsmob_grob(other_elt);
   if (e)
     {
-      return (Direction)(relative_dir * Side_position::get_direction (e));
+      return (Direction)(relative_dir * Side_position_interface::get_direction (e));
     }
   
-  return DOWN;
+  return CENTER;
 }
   
-/*
-   Callback that does the aligning. Puts the element next to the support
- */
 
-MAKE_SCHEME_CALLBACK(Side_position,side_position,2);
+MAKE_SCHEME_CALLBACK(Side_position_interface,aligned_on_support_extents, 2);
 SCM
-Side_position::side_position (SCM element_smob, SCM axis)
+Side_position_interface::aligned_on_support_extents (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
   Axis a = (Axis) gh_scm2int (axis);
 
+  return general_side_position (me, a, true);
+}
+
+
+/*
+ Puts the element next to the support, optionally taking in
+ account the extent of the support.
+*/
+SCM
+Side_position_interface::general_side_position (Grob * me, Axis a, bool use_extents)
+{
   Grob *common = me->parent_l (a);
   SCM support = me->get_grob_property ("side-support-elements");
   for (SCM s = support; s != SCM_EOL; s = gh_cdr (s))
@@ -70,12 +78,15 @@ Side_position::side_position (SCM element_smob, SCM axis)
   Interval dim;
   for (SCM s = support; s != SCM_EOL; s = gh_cdr (s))
     {
-
       Grob * e  = unsmob_grob ( gh_car (s));
       if (e)
-       {
+       if (use_extents)
          dim.unite (e->extent (common, a));
-       }
+       else
+         {
+           Real x = e->relative_coordinate (common, a);
+           dim.unite (Interval (x,x));
+         }
     }
 
   if (dim.empty_b ())
@@ -83,33 +94,51 @@ Side_position::side_position (SCM element_smob, SCM axis)
       dim = Interval(0,0);
     }
 
-  Direction dir = Side_position::get_direction (me);
+  Direction dir = Side_position_interface::get_direction (me);
     
   Real off =  me->parent_l (a)->relative_coordinate (common, a);
   SCM minimum = me->remove_grob_property ("minimum-space");
 
-  Real total_off = dim[dir] + off;
+  Real total_off = dim.linear_combination (dir) + off;
   SCM padding = me->remove_grob_property ("padding");
   if (gh_number_p (padding))
     {
       total_off += gh_scm2double (padding) * dir;
     }
-  if (gh_number_p (minimum) && total_off * dir < gh_scm2double (minimum))
+
+  if (gh_number_p (minimum) 
+      && dir
+      && total_off * dir < gh_scm2double (minimum))
     {
       total_off = gh_scm2double (minimum) * dir;
     }
+
   if (fabs (total_off) > 100 CM)
     programming_error ("Huh ? Improbable staff side dim.");
 
   return gh_double2scm (total_off);
 }
 
+/*
+  Cut & paste (ugh.)
+ */
+MAKE_SCHEME_CALLBACK(Side_position_interface,aligned_on_support_refpoints,2);
+SCM
+Side_position_interface::aligned_on_support_refpoints (SCM smob, SCM axis)
+{
+  Grob *me = unsmob_grob (smob);
+  Axis a = (Axis) gh_scm2int (axis);
+
+  return  general_side_position (me, a, false); 
+}
+
+
 /**
   callback that centers the element on itself
  */
-MAKE_SCHEME_CALLBACK(Side_position,aligned_on_self,2);
+MAKE_SCHEME_CALLBACK(Side_position_interface,aligned_on_self,2);
 SCM
-Side_position::aligned_on_self (SCM element_smob, SCM axis)
+Side_position_interface::aligned_on_self (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
   Axis a = (Axis) gh_scm2int (axis);
@@ -156,14 +185,14 @@ directed_round (Real f, Direction d)
 
   Only rounds when we're inside the staff, as determined by
   Staff_symbol_referencer::staff_radius() */
-MAKE_SCHEME_CALLBACK(Side_position,quantised_position,2);
+MAKE_SCHEME_CALLBACK(Side_position_interface,quantised_position,2);
 SCM
-Side_position::quantised_position (SCM element_smob, SCM )
+Side_position_interface::quantised_position (SCM element_smob, SCM )
 {
   Grob *me = unsmob_grob (element_smob);
   
   
-  Direction d = Side_position::get_direction (me);
+  Direction d = Side_position_interface::get_direction (me);
 
   if (Staff_symbol_referencer::has_interface (me))
     {
@@ -186,15 +215,15 @@ Side_position::quantised_position (SCM element_smob, SCM )
 /*
   Position next to support, taking into account my own dimensions and padding.
  */
-MAKE_SCHEME_CALLBACK(Side_position,aligned_side,2);
+MAKE_SCHEME_CALLBACK(Side_position_interface,aligned_side,2);
 SCM
-Side_position::aligned_side (SCM element_smob, SCM axis)
+Side_position_interface::aligned_side (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
   Axis a = (Axis) gh_scm2int (axis);
   
-  Direction d = Side_position::get_direction (me);
-  Real o = gh_scm2double (side_position (element_smob,axis));
+  Direction d = Side_position_interface::get_direction (me);
+  Real o = gh_scm2double (aligned_on_support_extents (element_smob,axis));
 
   Interval iv =  me->extent (me, a);
 
@@ -212,9 +241,9 @@ Side_position::aligned_side (SCM element_smob, SCM axis)
 /*
   Position centered on parent.
  */
-MAKE_SCHEME_CALLBACK(Side_position,centered_on_parent,2);
+MAKE_SCHEME_CALLBACK(Side_position_interface,centered_on_parent,2);
 SCM
-Side_position::centered_on_parent (SCM element_smob, SCM axis)
+Side_position_interface::centered_on_parent (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
   Axis a = (Axis) gh_scm2int (axis);
@@ -225,7 +254,7 @@ Side_position::centered_on_parent (SCM element_smob, SCM axis)
 
 
 void
-Side_position::add_staff_support (Grob*me)
+Side_position_interface::add_staff_support (Grob*me)
 {
   Grob* st = Staff_symbol_referencer::staff_symbol_l (me);
   if (st)
@@ -235,19 +264,19 @@ Side_position::add_staff_support (Grob*me)
 }
 
 void
-Side_position::set_axis (Grob*me, Axis a)
+Side_position_interface::set_axis (Grob*me, Axis a)
 {
-  me->add_offset_callback (Side_position::aligned_side_proc, a);
+  me->add_offset_callback (Side_position_interface::aligned_side_proc, a);
 }
 
 
 
 // ugh. doesn't cactch all variants. 
 Axis
-Side_position::get_axis (Grob*me)
+Side_position_interface::get_axis (Grob*me)
 {
-  if (me->has_offset_callback_b (Side_position::aligned_side_proc, X_AXIS)
-      || me->has_offset_callback_b (Side_position::aligned_side_proc , X_AXIS))
+  if (me->has_offset_callback_b (Side_position_interface::aligned_side_proc, X_AXIS)
+      || me->has_offset_callback_b (Side_position_interface::aligned_side_proc , X_AXIS))
     return X_AXIS;
 
   
@@ -255,31 +284,31 @@ Side_position::get_axis (Grob*me)
 }
 
 void
-Side_position::set_direction (Grob*me, Direction d)
+Side_position_interface::set_direction (Grob*me, Direction d)
 {
   me->set_grob_property ("direction", gh_int2scm (d));
 }
 
 void
-Side_position::set_minimum_space (Grob*me, Real m)
+Side_position_interface::set_minimum_space (Grob*me, Real m)
 {
   me->set_grob_property ("minimum-space", gh_double2scm (m));
 }
 
 void
-Side_position::set_padding (Grob*me, Real p)
+Side_position_interface::set_padding (Grob*me, Real p)
 {
   me->set_grob_property ("padding", gh_double2scm (p));
 }
 
 bool
-Side_position::has_interface (Grob*me) 
+Side_position_interface::has_interface (Grob*me) 
 {
   return me->has_interface (ly_symbol2scm ("side-position-interface"));
 }
 
 bool
-Side_position::supported_b (Grob*me) 
+Side_position_interface::supported_b (Grob*me) 
 {
   SCM s = me->get_grob_property  ("side-support-elements"); 
   return gh_pair_p(s);
index 1b28a06336520b708a98edfc25cb06f64d992f56..c8baab0eddb113e309df9b443872e5f734ebbc8c 100644 (file)
@@ -85,6 +85,7 @@ Staff_performer::create_audio_elements ()
       instrument_p_ = new Audio_instrument (str);
       announce_element (Audio_element_info (instrument_p_, 0));
     }
+  Performer_group_performer::create_audio_elements ();
 }
 
 void
index 5b1e5c6cfe0f519332965da0457060e9a362f600..6965162778e003342d3581ccc0f35d77f7aa34ff 100644 (file)
@@ -120,7 +120,7 @@ Syllable_group::set_lyric_align(const char *punc, Grob *default_notehead_l)
     // centre on notehead ... if we have one. 
     if(notehead_l_) {
       lyric->set_parent(notehead_l_, X_AXIS);
-      lyric->add_offset_callback (Side_position::centered_on_parent_proc, X_AXIS);
+      lyric->add_offset_callback (Side_position_interface::centered_on_parent_proc, X_AXIS);
       // reference is on the right of the notehead; move it left half way, and add translation
       lyric->translate_axis (group_translation_f_-(notehead_l_->extent(notehead_l_, X_AXIS)).center(), X_AXIS);
     }
index 6f3223ad18b056fde29b0135a5133d322d666712..85d4947d59c4b74e9737b664ff7789a19386740c 100644 (file)
@@ -100,7 +100,8 @@ System_start_delimiter::brew_molecule (SCM smob)
                                  (me->self_scm(), gh_int2scm (Y_AXIS)));
   Real l = ext.length () / staff_space;
   
-  if (gh_number_p (c) && l <= gh_scm2double (c))
+  if (ext.empty_b ()
+      || (gh_number_p (c) && l <= gh_scm2double (c)))
     {
       me->suicide();
       return SCM_EOL;
index 413b45ce2344f1858a3aba435d906ed7e2e5e3cf..5691cdf5e2a8401d77388810381242235aa328c0 100644 (file)
@@ -49,7 +49,7 @@ Tempo_performer::create_audio_elements ()
     {
 
       SCM met = tempo_req_l_->get_mus_property ("metronome-count");
-      Duration *d = unsmob_duration (tempo_req_l_->get_mus_property ("tempo"));
+      Duration *d = unsmob_duration (tempo_req_l_->get_mus_property ("duration"));
       
       audio_p_ = new Audio_tempo (d->length_mom () /
                                  Moment (1, 4) 
index cb668b414608a00662aede9453005f015fcdaa9b..e4d2bbc8827a91cc8e6aa4c358c5f9ac3589e3c5 100644 (file)
@@ -53,15 +53,15 @@ Text_engraver::acknowledge_grob (Grob_info inf)
       for (int i=0; i < texts_.size (); i++)
        {
          Grob*t = texts_[i];
-         Side_position::add_support (t,inf.elem_l_);
+         Side_position_interface::add_support (t,inf.elem_l_);
 
          /*
            ugh.
           */
-         if (Side_position::get_axis( t) == X_AXIS
+         if (Side_position_interface::get_axis( t) == X_AXIS
              && !t->parent_l (Y_AXIS))
            t->set_parent (inf.elem_l_, Y_AXIS);
-         else if (Side_position::get_axis(t) == Y_AXIS
+         else if (Side_position_interface::get_axis(t) == Y_AXIS
              && !t->parent_l (X_AXIS))
            t->set_parent (inf.elem_l_, X_AXIS);
        }
@@ -71,7 +71,7 @@ Text_engraver::acknowledge_grob (Grob_info inf)
     {
       for (int i=0; i < texts_.size (); i++)
        {
-         Side_position::add_support(texts_[i],inf.elem_l_);
+         Side_position_interface::add_support(texts_[i],inf.elem_l_);
        }
     }
 }
@@ -101,7 +101,7 @@ Text_engraver::create_grobs ()
       SCM axisprop = get_property ("scriptHorizontal");
       
       Axis ax = to_boolean (axisprop) ? X_AXIS : Y_AXIS;
-      Side_position::set_axis (text, ax);
+      Side_position_interface::set_axis (text, ax);
 
 #if 0
       if (r->style_str_ == "finger" && ax == Y_AXIS)
@@ -109,8 +109,8 @@ Text_engraver::create_grobs ()
          /*
            nicely center the scripts.
           */ 
-         text->add_offset_callback (Side_position::aligned_on_self_proc, X_AXIS);
-         text->add_offset_callback (Side_position::centered_on_parent_proc, X_AXIS);
+         text->add_offset_callback (Side_position_interface::aligned_on_self_proc, X_AXIS);
+         text->add_offset_callback (Side_position_interface::centered_on_parent_proc, X_AXIS);
        }
 #endif
       
@@ -123,7 +123,7 @@ Text_engraver::create_grobs ()
                              gh_int2scm (200 + i));
 
       if (r->get_direction ())
-       Side_position::set_direction (text, r->get_direction ());
+       Side_position_interface::set_direction (text, r->get_direction ());
       
       text->set_grob_property ("text", r->get_mus_property ("text"));
       
@@ -145,7 +145,7 @@ Text_engraver::stop_translation_timestep ()
   for (int i=0; i < texts_.size (); i++)
     {
       Item *ti = texts_[i];
-      Side_position::add_staff_support (ti);
+      Side_position_interface::add_staff_support (ti);
       typeset_grob (ti);
     }
   texts_.clear ();
index 07e9b00fbd85f1fbec8aff5c857680c35452b77c..bba9f9be4e1895c9a304ca15c04b82a7dfce01e3 100644 (file)
@@ -123,7 +123,7 @@ Text_spanner_engraver::create_grobs ()
          span_->set_grob_property ("if-text-padding", gh_double2scm (0));
          span_->set_grob_property ("width-correct", gh_double2scm (0));
                    
-         Side_position::set_axis (span_, Y_AXIS);
+         Side_position_interface::set_axis (span_, Y_AXIS);
          Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
          span_->set_bound (LEFT, e);
          
@@ -138,7 +138,7 @@ Text_spanner_engraver::acknowledge_grob (Grob_info info)
 {
   if (span_ && Note_column::has_interface (info.elem_l_))
     {
-      Side_position::add_support (span_, info.elem_l_);
+      Side_position_interface::add_support (span_, info.elem_l_);
       add_bound_item (span_, dynamic_cast<Item*> (info.elem_l_));
     }
 }
@@ -148,7 +148,7 @@ Text_spanner_engraver::typeset_all ()
 {  
   if (finished_)
     {
-      Side_position::add_staff_support (finished_);
+      Side_position_interface::add_staff_support (finished_);
       typeset_grob (finished_);
       finished_ = 0;
     }
index d1f3599d78d214f5b94daa36bc0cfa01503bb110..0bcf5a4c40b0aaaffdec3581a0363506921e0d80 100644 (file)
@@ -49,6 +49,7 @@ Time_signature_performer::create_audio_elements ()
   if (gh_pair_p (fr)
       && scm_equal_p (fr, prev_fraction_) != SCM_BOOL_T)
     {
+      prev_fraction_ = fr;
       int b = gh_scm2int (gh_car (fr));
       int o = gh_scm2int (gh_cdr (fr));
       
index f21f8aebbad05f320f81f4a8f437a3f5b6d69ddc..a6a9bbd7ba21b83d8b784ac3eedd5b9fa29c20fa 100644 (file)
@@ -173,7 +173,7 @@ Volta_engraver::stop_translation_timestep ()
 {
   if (end_volta_span_p_)
     {
-      Side_position::add_staff_support (end_volta_span_p_);
+      Side_position_interface::add_staff_support (end_volta_span_p_);
       
       typeset_grob (end_volta_span_p_ );
       end_volta_span_p_ =0;
index df0d1e63493a63e86d5828169f9b71c736be2339..0385af35c246e13874fceb53f236a6a7aa431f5c 100644 (file)
@@ -111,12 +111,12 @@ void
 Volta_spanner::add_bar  (Grob *me, Item* b)
 {
   Pointer_group_interface::add_element(me, "bars",b);
-  Side_position::add_support (me,b);
+  Side_position_interface::add_support (me,b);
   add_bound_item (dynamic_cast<Spanner*>(me), b); 
 }
 
 void
 Volta_spanner::add_column (Grob*me, Grob* c)
 {
-  Side_position::add_support (me,c);
+  Side_position_interface::add_support (me,c);
 }
index c3ba784beaa22be9395adbcc81ceb0514244cc6a..04456979a1d69ead25cca3e7880771fc017c5397 100644 (file)
@@ -7,8 +7,8 @@ StaffContext = \translator {
        \accepts Voice;
 
        \consists "Key_performer";
-       \consists "Time_signature_performer";
        \consists "Tempo_performer";
+       \consists "Time_signature_performer";
        dynamicStyle = #"dynamic"
 };
 \translator { \StaffContext }
index f2ab5bc8003def6163a9a4e6b299229c7e3ee0da..d3045fbb3955e38c951e3622b6435a58a9ee127b 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.133
-Entered-date: 27FEB01
+Version: 1.3.134
+Entered-date: 02MAR01
 Description: @BLURB@
 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.133.tar.gz 
+       1000k lilypond-1.3.134.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.133.tar.gz 
+       1000k lilypond-1.3.134.tar.gz 
 Copying-policy: GPL
 End
index 9af8e61b1b2a6943b9b9c60f553e25dae9164100..54502513a3d31c447fe148eb23fb0f7aad5952e9 100644 (file)
@@ -1,11 +1,11 @@
 %define info yes
 
 Name: lilypond
-Version: 1.3.133
+Version: 1.3.134
 Release: 1
 License: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.133.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.134.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 # Icon: lilypond-icon.gif
diff --git a/mutopia/Coriolan/c-midi.ly b/mutopia/Coriolan/c-midi.ly
deleted file mode 100644 (file)
index e69de29..0000000
index 5cdad802bee48505f6c0bba2abfd9c6e3c3db889..ace2bec64f93c2b6de5c7e9c6618a197ba4cfb54 100644 (file)
 
 (use-modules (ice-9 string-fun))
 
-(define interface-file-str (string-append (ly-gulp-file "interface-description.scm") "\n(define "))
-
-;;(define (list-interface-names)
-(define (ugh-standalone-list-interface-names)
-  (let* ((text interface-file-str)
-        (t1 (regexp-substitute/global #f "\n" text 'pre 'post))
-        (t (regexp-substitute/global #f "[^\t ]define[ \t]*([a-z-]+interface)" 
-                                     t1 1 " " 'post))
-        (ugh (regexp-substitute/global #f "  .*" t 'pre 'post))
-        (l (separate-fields-discarding-char #\  ugh list)))
-    (reverse (cdr (reverse l)))))
-
 (if standalone
   (begin
     (display "(define (list-interface-names) '") 
     (display ")")
     (exit 0)))
 
-;; Ugh
-;; This list is generated manually, by doing:
-;; guile
-;; guile> (load "backend-documentation-lib.scm")
-;; For some reason, this can't be generated when lilypond is loaded;
-;; the regexp stuff behaves weird.
-(define (list-interface-names) '("general-grob-interface" "beam-interface" "clef-interface" "axis-group-interface" "note-column-interface" "stem-interface" "slur-interface" "side-position-interface" "accidentals-interface" "line-of-score-interface" "note-head-interface" "note-name-interface" "rhythmic-head-interface" "rest-interface" "tuplet-bracket-interface" "align-interface" "aligned-interface" "break-aligned-interface" "chord-name-interface" "time-signature-interface" "bar-line-interface" "hairpin-interface" "arpeggio-interface" "note-collision-interface" "custos-interface" "dot-interface" "font-interface" "text-interface" "dot-column-interface" "dynamic-interface" "finger-interface" "separation-spanner-interface" "text-script-interface" "grace-alignment-interface" "hara-kiri-group-interface" "line-spanner-interface" "lyric-hyphen-interface" "key-signature-interface" "lyric-extender-interface" "lyric-syllable-interface" "mark-interface" "multi-measure-rest-interface" "paper-column-interface" "spaceable-element-interface" "rest-collision-interface" "script-interface" "script-column-interface" "spacing-spanner-interface" "staff-symbol-interface" "stem-tremolo-interface" "separation-item-interface" "sustain-pedal-interface" "system-start-delimiter-interface" "text-spanner-interface" "tie-interface" "tie-column-interface" "volta-bracket-interface" "span-bar-interface"))
-
-
-(eval-string (ly-gulp-file "interface-description.scm"))
 
 (define interface-description-alist
   (map (lambda (x) (cons (string->symbol x) (eval-string x)))
-            (list-interface-names)))
+            (interface-names)))
 
 (set! interface-description-alist (sort interface-description-alist alist<?))
 
index c7fd1745b03b582aa2179d0b434733b35b66e827..32e7a677057bc5fa8f397dc11e7dbaf02cf03262 100644 (file)
@@ -14,7 +14,7 @@
               (Y-extent-callback . #f)        
               (molecule-callback . ,Arpeggio::brew_molecule)
               (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
-              (X-offset-callbacks . (,Side_position::aligned_side))
+              (X-offset-callbacks . (,Side_position_interface::aligned_side))
               (direction . -1)
               (staff-position . 0.0)
               (meta . ,(grob-description "Arpeggio" arpeggio-interface side-position-interface font-interface))
@@ -49,7 +49,7 @@
                (direction . 1)
                 (font-family . roman)
                (font-relative-size . -1)
-               (Y-offset-callbacks . (,Side_position::aligned_side))
+               (Y-offset-callbacks . (,Side_position_interface::aligned_side))
                (meta . ,(grob-description "BarNumber"
                                           side-position-interface
                        text-interface  font-interface break-aligned-interface))
                (dash-thickness . 1.2)
                (dash-length . 4.0)
                (self-alignment-Y . 0)
-               (Y-offset-callbacks . (,Side_position::aligned_on_self))
+               (Y-offset-callbacks . (,Side_position_interface::aligned_on_self))
                (meta . ,(grob-description "Hairpin" hairpin-interface))
        ))
 
                (dot-count . 1)
                (staff-position . 0.0)
                (Y-offset-callbacks  . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback))
-               (meta . ,(grob-description "Dots"  font-interface dot-interface ))
+               (meta . ,(grob-description "Dots"  font-interface dots-interface ))
        ))
        
        (DynamicText . (
-               (Y-offset-callbacks . (,Side_position::aligned_on_self))
+               (Y-offset-callbacks . (,Side_position_interface::aligned_on_self))
                (molecule-callback . ,Text_item::brew_molecule)
                (script-priority . 100)
                (font-series . bold)
                (axes . ( 1))
                (padding . 0.6)
                (minimum-space . 1.2)
+               (direction . -1)
                (meta . ,(grob-description "DynamicLineSpanner" dynamic-interface axis-group-interface side-position-interface))
        ))
        
        
        (Fingering . (
                (molecule-callback . ,Text_item::brew_molecule)
-               (X-offset-callbacks . (,Side_position::centered_on_parent ,Side_position::aligned_on_self))
+               (X-offset-callbacks . (,Side_position_interface::centered_on_parent ,Side_position_interface::aligned_on_self))
                (padding . 0.6)
+               (direction . -1)
                (self-alignment-X . 0)
                (font-family . number)
                (font-relative-size . -3)
        
        (InstrumentName . (
                (breakable . #t)
-               (Y-offset-callbacks . (,Side_position::centered_on_parent
-                                      ,Side_position::aligned_on_self))
+               (Y-offset-callbacks . (,Side_position_interface::aligned_on_self
+                                      ,Side_position_interface::aligned_on_support_refpoints
+))
+               (direction . 0)
                (self-alignment-Y . 0)
                (molecule-callback . ,Text_item::brew_molecule)         
                (break-align-symbol . Instrument_name)
        
        (Accidentals . (
                (molecule-callback . ,Local_key_item::brew_molecule)
-               (X-offset-callbacks . (,Side_position::aligned_side))
+               (X-offset-callbacks . (,Side_position_interface::aligned_side))
                (after-line-breaking-callback . ,Local_key_item::after_line_breaking)
                (direction . -1)
                (left-padding . 0.2)
        
        (LyricText . (
                (molecule-callback . ,Text_item::brew_molecule)
-               (X-offset-callbacks . (,Side_position::aligned_on_self))
+               (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
                (self-alignment-X . 0)
                (non-rhythmic . #t)
                (word-space . 0.6)
        
        (RehearsalMark . (
                (molecule-callback . ,Text_item::brew_molecule)
-               (X-offset-callbacks . (,Side_position::aligned_on_self))
+               (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
                (self-alignment-X . 0)
 
                (direction . 1)
                (self-alignment-X . 0)
                (text . "8")
                (visibility-lambda . ,begin-of-line-visible)
-               (X-offset-callbacks . (,Side_position::centered_on_parent ,Side_position::aligned_on_self))
-               (Y-offset-callbacks . (,Side_position::aligned_side))
+               (X-offset-callbacks . (,Side_position_interface::centered_on_parent ,Side_position_interface::aligned_on_self))
+               (Y-offset-callbacks . (,Side_position_interface::aligned_side))
                (molecule-callback . ,Text_item::brew_molecule)
                 (font-shape . italic)
                (font-family . roman)
                (X-extent-callback . ,Rest::extent_callback)
                (Y-extent-callback . ,Rest::extent_callback)            
                (molecule-callback . ,Rest::brew_molecule)
+               (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) 
                (minimum-beam-collision-distance . 1.5)
                (meta . ,(grob-description  "Rest"
                        rhythmic-head-interface
+                       staff-symbol-referencer-interface
                        rest-interface))
        ))
        (RestCollision . (
 
        (Script . (
                (molecule-callback . ,Script::brew_molecule)
-               (X-offset-callbacks . (,Side_position::centered_on_parent))
+               (X-offset-callbacks . (,Side_position_interface::centered_on_parent))
                (after-line-breaking-callback . ,Script::after_line_breaking)
                (meta . ,(grob-description "Script" script-interface side-position-interface font-interface))
        ))
        ))
        (SostenutoPedal . (
                (molecule-callback . ,Text_item::brew_molecule)
-               (X-offset-callbacks . (,Side_position::aligned_on_self))
+               (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
                (Y-offset-callbacks .
-                (,Side_position::aligned_side
-                 ,Side_position::centered_on_parent))
+                (,Side_position_interface::aligned_side
+                 ,Side_position_interface::centered_on_parent))
                (no-spacing-rods . #t)
                 (font-shape . italic)
                (self-alignment-X . 0)
                (no-spacing-rods . #t)
                (molecule-callback . ,Sustain_pedal::brew_molecule)
                (self-alignment-X . 0)
-               (X-offset-callbacks . (,Side_position::aligned_on_self))
+               (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
                (Y-offset-callbacks .
-                                   (,Side_position::aligned_side
-                                    ,Side_position::centered_on_parent))
+                                   (,Side_position_interface::aligned_side
+                                    ,Side_position_interface::centered_on_parent))
 
                (meta . ,(grob-description "SustainPedal" sustain-pedal-interface side-position-interface font-interface))
        ))
                 (font-shape . italic)
                (no-spacing-rods . #t)
                (self-alignment-X . 0)
-               (X-offset-callbacks . (,Side_position::aligned_on_self))
+               (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
                (Y-offset-callbacks .
-                (,Side_position::aligned_side
-                 ,Side_position::centered_on_parent))
+                (,Side_position_interface::aligned_side
+                 ,Side_position_interface::centered_on_parent))
                (meta . ,(grob-description "UnaChordaPedal" text-interface font-interface))
        ))
 
                (direction . 1)
                (padding . 1)
                 (font-style . volta)
-               (Y-offset-callbacks . (,Side_position::aligned_side))
+               (Y-offset-callbacks . (,Side_position_interface::aligned_side))
                (thickness . 1.6)  ;  stafflinethickness
                (height . 2.0) ; staffspace;
                (minimum-space . 5)
index 1305a01d21aa75acbacf39681476821833f77806..0c3306f56e127c1d88396f51b200d1425ba3eabc 100644 (file)
@@ -209,6 +209,7 @@ Also works as a scaling parameter for the length of hyphen. .")
 (grob-property-description 'no-spacing-rods boolean? "read from grobs: boolean that makes Separation_item ignore this item (MOVE ME TO ITEM).")
 (grob-property-description 'no-stem-extend boolean? "should stem not be extended to middle staff line?.")
 (grob-property-description 'non-default boolean? "not set because of existence of a bar?.")
+(grob-property-description 'note-character string? "character to print in a note head.")
 (grob-property-description 'note-width number? "unit for horizontal translation, measured in staff-space.")
 (grob-property-description 'number-gap number? "size of the gap for the number in a tuplet.")
 (grob-property-description 'old-accidentals list? "list of (pitch, accidental) pairs.")
index d6571b3a80a7715eba00977bf5c1c7bfe71797da..8087d3e8b32229b77ef74504ece5dc7554b5e7f0 100644 (file)
 ;;; and `objects'.
 
 
+(define all-interfaces '())
+
 (define (lily-interface symbol description props)
-  (list symbol
-       description
-       props
+  (set! all-interfaces (acons symbol (list symbol
+                                          description
+                                          props) all-interfaces)
        )
   )
 
-
 (define (grob-description name . interfaces)
   (let* ((ifs (cons general-grob-interface interfaces))
         (props (map caddr ifs))
 ;        (cons 'properties prop-typep-pairs)
   )))
 
-(define general-grob-interface
-  (lily-interface
-   'general-grob-interface
-   "All grobs support this"
-   '(
-    X-offset-callbacks 
-    Y-offset-callbacks 
-    X-extent-callback 
-    Y-extent-callback 
-    font-relative-size 
-    extra-offset 
-    interfaces  
-    dependencies 
-    no-spacing-rods 
-    extra-extent-X 
-    extra-extent-Y 
-    minimum-extent-X 
-    minimum-extent-Y 
-    origin 
-    transparent 
-    ))
-  )
 
-(define beam-interface
-  (lily-interface
-   'beam-interface
-   "A beam.
+(lily-interface
+ 'general-grob-interface
+ "All grobs support this"
+ '(
+   X-offset-callbacks 
+   Y-offset-callbacks 
+   X-extent-callback 
+   Y-extent-callback
+   molecule-callback
+   font-relative-size 
+   extra-offset 
+   interfaces  
+   dependencies 
+   no-spacing-rods 
+   extra-extent-X 
+   extra-extent-Y 
+   minimum-extent-X 
+   minimum-extent-Y 
+   origin 
+   transparent 
+   ))
+
+
+(lily-interface
+ 'beam-interface
+ "A beam.
 
 #'thickness= weight of beams, in staffspace
   "
-   '(auto-knee-gap
-     staff-position
-    height
-    flag-width-function 
-    damping 
-    default-neutral-direction 
-    thickness 
-    space-function 
-    beamed-stem-shorten 
-    height-quants 
-    vertical-position-quant-function 
-    damping 
-    outer-stem-length-limit 
-    slope-limit 
-    auto-knee-gap
-    )
+ '(auto-knee-gap
+   staff-position
+   height
+   flag-width-function 
+   damping 
+   default-neutral-direction 
+   thickness 
+   space-function 
+   beamed-stem-shorten 
+   height-quants 
+   vertical-position-quant-function 
+   damping 
+   outer-stem-length-limit 
+   slope-limit 
+   auto-knee-gap
+   )
+ )
+
+
+(lily-interface
+ 'clef-interface
+ "A clef sign"
+ '(
+   non-default 
+   full-size-change 
+   glyph 
    ))
 
-(define clef-interface
-  (lily-interface
-   'clef-interface
-   "A clef sign"
-   '(
-    non-default 
-    full-size-change 
-    glyph 
-    ))
-  )
 
-(define axis-group-interface
-  (lily-interface
-   'axis-group-interface
-   "a group of coupled grobs"
-   '(
-    axes 
-   )))
 
-(define note-column-interface
-  (lily-interface
-   'note-column-interface
-   "Stem and noteheads combined"
-   '(
-    horizontal-shift 
-    force-hshift 
-    ))
-  )
+(lily-interface
+ 'axis-group-interface
+ "a group of coupled grobs"
+ '(
+   axes 
+   ))
 
-(define stem-interface
-  (lily-interface
-   'stem-interface
-   "A stem"
-   '(
-    thickness 
-    beamed-lengths 
-    beamed-minimum-lengths 
-    stem-centered 
-    lengths 
-    beam 
-    stem-shorten 
-    duration-log 
-    beaming 
-    default-neutral-direction 
-    stem-end-position 
-    support-head 
-    heads 
-    direction 
-    stem-length 
-    style 
-    flag-style 
-    dir-forced 
-    )))
 
+(lily-interface
+ 'note-column-interface
+ "Stem and noteheads combined"
+ '(
+   horizontal-shift 
+   force-hshift 
+   ))
 
-(define slur-interface
-  (lily-interface
-   'slur-interface
-   "A slur"
-   '(
-    de-uglify-parameters 
-    details 
-    attachment 
-    direction 
+
+(lily-interface
+ 'stem-interface
+ "A stem"
+ '(
+   thickness 
+   beamed-lengths 
+   beamed-minimum-lengths 
+   stem-centered 
+   lengths 
+   beam 
+   stem-shorten 
+   duration-log 
+   beaming 
+   default-neutral-direction 
+   stem-end-position 
+   support-head 
+   heads 
+   direction 
+   stem-length 
+   style 
+   flag-style 
+   dir-forced 
+   ))
+
+
+
+(lily-interface
+ 'slur-interface
+ "A slur"
+ '(
+   de-uglify-parameters 
+   details 
+   attachment 
+   direction 
    attachment-offset 
-     beautiful 
-     y-free 
-     control-points 
-     extremity-rules  
-     extremity-offset-alist 
-     thickness 
-     dashed 
+   beautiful 
+   y-free 
+   control-points 
+   extremity-rules  
+   extremity-offset-alist 
+   thickness 
+   dashed 
 
-    )
    )
 )
+ )
 
-(define side-position-interface
-  (lily-interface
-   'side-position-interface
-   "Position a victim object (this one) next to other objects (the support).
+
+
+(lily-interface
+ 'side-position-interface
+ "Position a victim object (this one) next to other objects (the support).
 #'direction = where to put the victim object (left or right?)
 "
  '(
+ '(
    side-support 
    direction-source 
-    direction 
-    side-relative-direction 
-    minimum-space 
-    padding 
-    self-alignment-X 
-    self-alignment-Y 
-    
-    )
-  ))
+   direction 
+   side-relative-direction 
+   minimum-space 
+   padding 
+   self-alignment-X 
+   self-alignment-Y 
+   
+   )
+ )
+
+
+(lily-interface
+ 'accidentals-interface
+ "Accidentals"
+ '(
+   left-padding 
+   right-padding 
+ ))
 
-(define accidentals-interface
-  (lily-interface
-   'accidentals-interface
-   "Accidentals"
-   '(
-    left-padding 
-    right-padding 
-    )
-   ))
 
-(define line-of-score-interface
-  (lily-interface
  'line-of-score-interface
  "Super grob, parent of all:
+
+(lily-interface
+ 'line-of-score-interface
+ "Super grob, parent of all:
 
 The columns of a score that form one line.  The toplevel grob.  Any
 grob has a Line_of_score as both X and Y reference point. The
 Paper_score contains one grob of this type. Control enters the
 Grob dependency calculation from this single Line_of_score
 object."
-   '(
-    between-system-string 
-    spacing-procedure 
-    before-line-breaking-callback
-    after-line-breaking-callback 
-    all-elements 
-    columns 
-    )))
-
-(define note-head-interface
-  (lily-interface
-   'note-head-interface
-   "Note head"
-   '(
-    style  attachment-angle
-    )
+ '(
+   between-system-string 
+   spacing-procedure 
+   before-line-breaking-callback
+   after-line-breaking-callback 
+   all-elements 
+   columns 
    ))
 
-(define note-name-interface
-  (lily-interface
-   'note-name-interface
-   "Note name"
-   '(
-    style 
-    )
+
+(lily-interface
+ 'note-head-interface
+ "Note head"
+ '(
+   style attachment-angle note-character
+        ))
+
+
+(lily-interface
+ 'note-name-interface
+ "Note name"
+ '(
+   style 
+      ))
+
+
+
+(lily-interface
+ 'rhythmic-head-interface
+ "Note head or rest"
+ '(
+   dot 
+   stem 
+   duration-log 
    ))
 
 
-(define rhythmic-head-interface
-  (lily-interface
-   'rhythmic-head-interface
-   "Note head or rest"
-   '(
-    dot 
-    stem 
-    duration-log 
-    )))
+(lily-interface
+ 'rest-interface
+ "a rest"
+ '(style ))
+
+
+(lily-interface
+ 'tuplet-bracket-interface
+ "A bracket with a number in the middle, used for tuplets." 
+ '(
+   beams 
+   columns 
+   number-gap 
+   delta-y 
+   tuplet-bracket-visibility 
+   tuplet-number-visibility 
+   parallel-beam 
+   thick 
+   ))
 
-(define rest-interface
-  (lily-interface
-   'rest-interface
-   "a rest"
-   '(style )))
 
-(define tuplet-bracket-interface
-  (lily-interface
-   'tuplet-bracket-interface
-   "A bracket with a number in the middle, used for tuplets." 
-   '(
-    beams 
-    columns 
-    number-gap 
-    delta-y 
-    tuplet-bracket-visibility 
-    tuplet-number-visibility 
-    parallel-beam 
-    thick 
-    )
-))
+(lily-interface
+ 'align-interface
+ " Order grobs top to bottom/left to right/right to left etc."
+ '(
+   stacking-dir  
+   align-dir  
+   threshold  
+   alignment-done  
+   center-element 
+   elements  
+   axes  
+   ))
 
-(define align-interface
-  (lily-interface
-   'align-interface
-   " Order grobs top to bottom/left to right/right to left etc."
-   '(
-    stacking-dir  
-    align-dir  
-    threshold  
-    alignment-done  
-    center-element 
-    elements  
-    axes  
-    )))    
-
-(define aligned-interface
-  (lily-interface
-   'aligned-interface
-   "read by align-interface"
-   '(
-    minimum-space 
-    extra-space 
-    )))
 
-(define break-aligned-interface
-  (lily-interface
-   'break-aligned-interface
-   "Items that are aligned in prefatory matter"
-   '(
-    break-align-symbol 
-    visibility-lambda 
-    breakable 
-    )))
+(lily-interface
+ 'aligned-interface
+ "read by align-interface"
+ '(
+   minimum-space 
+   extra-space 
+   ))
 
-(define chord-name-interface
-  (lily-interface
-   'chord-name-interface
-   "generate a chord name"
-   '( pitches inversion bass)))
 
-(define time-signature-interface
-  (lily-interface
-   'time-signature-interface
-   "A time signature, in different styles.
+(lily-interface
+ 'break-aligned-interface
+ "Items that are aligned in prefatory matter"
+ '(
+   break-align-symbol 
+   visibility-lambda 
+   breakable 
+   ))
+
+
+(lily-interface
+ 'chord-name-interface
+ "generate a chord name"
+ '( pitches inversion bass))
+
+
+(lily-interface
+ 'time-signature-interface
+ "A time signature, in different styles.
   The following values for 'style are are recognized:
 
     @table @samp
@@ -332,12 +329,12 @@ object."
 
 See also the test-file @file{input/test/time.ly}.
 "
  '(fraction style )))
'(fraction style ))
 
-(define bar-line-interface
-  (lily-interface
  'bar-line-interface
  "Bar line.
+
+(lily-interface
+ 'bar-line-interface
+ "Bar line.
 
 This is a request to print a special bar symbol. It replaces the 
 regular bar symbol with a special
@@ -367,41 +364,39 @@ If @var{bartype} is set to @code{\"empty\"} then nothing is printed,
 but a line break is allowed at that spot.
 
 "
  '( barsize-procedure kern thin-kern hair-thickness thick-thickness glyph bar-size break-glyph-function )))
'( barsize-procedure kern thin-kern hair-thickness thick-thickness glyph bar-size break-glyph-function ))
 
-(define hairpin-interface
-  (lily-interface
  'hairpin-interface
  "hairpin crescendo.
+
+(lily-interface
+ 'hairpin-interface
+ "hairpin crescendo.
 
 padding -- horizontal padding. This is useful if a crescendo is set next to a text like `mf'
 
 "
-   '( grow-direction thickness height padding )
-   ))
+ '( grow-direction thickness height padding
+                  ))
 
-(define arpeggio-interface
-  (lily-interface
-   'arpeggio-interface
-   "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads."
-   '(stems)
-   )
-  )
 
-(define note-collision-interface
-  (lily-interface
-   'note-collision-interface
-   "An object that handles collisions between notes with different
+(lily-interface
+ 'arpeggio-interface
+ "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads."
+ '(stems))
+
+
+
+(lily-interface
+ 'note-collision-interface
+ "An object that handles collisions between notes with different
 stem directions and horizontal shifts. Most of the interesting
 properties are to be set in @ref{note-column-interface}"
-   '(merge-differently-dotted note-width)
-   ))
+ '(merge-differently-dotted note-width))
 
 
-(define custos-interface
-  (lily-interface
  'custos-interface
  "A custos is a staff context symbol that appears at the end of a
+
+(lily-interface
+ 'custos-interface
+ "A custos is a staff context symbol that appears at the end of a
   staff line with monophonic musical contents (i.e. with a single
   voice).  It anticipates the pitch of the first note of the following
   line and thus helps the player or singer to manage line breaks
@@ -415,112 +410,109 @@ properties are to be set in @ref{note-column-interface}"
 
 [TODO: add to glossary]"
  
-   '(style)
-)
-  )
+   '(style))
+
+
 
 
 
 
-(define dot-interface
   (lily-interface
    'dots-interface
    "The dots to go with a notehead/rest.  A separate interface, since they
-  are a party in collision resolution.
- #'direction is the Direction to handle staff-line collisions in."
-   '(direction dot-count)
+are a party in collision resolution.
+#'direction is the Direction to handle staff-line collisions in."
+   '(direction dot-count))
 
-   )) 
 
-(define font-interface
   (lily-interface
    'font-interface
    "Any symbol that is typeset through fixed sets of glyphs (ie. fonts)"
    '(font-style font-series font-shape font-family font-name
 font-point-size font-relative-size)
-   ))
+   )
+
 
 
-(define text-interface
   (lily-interface
    'text-interface
    "A scheme markup text"
-   '(text align baseline-skip lookup raise kern magnify)))
+   '(text align baseline-skip lookup raise kern magnify))
+
 
-(define dot-column-interface
   (lily-interface
    'dot-column-interface
    "Interface that groups dots so they form a column"
    '( )
-   ))
+   )
+
 
-(define dynamic-interface
   (lily-interface
    'dynamic-interface
    "Any kind of loudness sign"
    '()
-    ))
+    )
+
 
 
-(define finger-interface
   (lily-interface
    'finger-interface
    "A fingering instruction"
    '()
-    ))
+    )
+
 
-(define separation-spanner-interface
   (lily-interface
    'separation-spanner-interface
    "Spanner that containing @code{separation-item-interface} grobs to calculate rods"
    '()
-  ))
-(define text-script-interface
+  )
+
   (lily-interface
    'text-script-interface
    "Any text script"
    '()
-    ))
+   )
+
 
-(define grace-alignment-interface
   (lily-interface
    'grace-alignment-interface
    "put grace notes in line"
    '(
     horizontal-space 
     )
-   ))
+   )
+
 
-(define hara-kiri-group-interface
   (lily-interface
    'hara-kiri-group-interface
    "  As Vertical_group_spanner, but keep track of interesting items.  If
-  we don't contain any interesting items after linebreaking, then
-  gracefully commit suicide.  Objective: don't disgrace Lily by
-  typesetting empty lines in orchestral scores."
+we don't contain any interesting items after linebreaking, then
+gracefully commit suicide.  Objective: don't disgrace Lily by
+typesetting empty lines in orchestral scores."
    '( items-worth-living )
-))
+)
+
 
-(define line-spanner-interface
   (lily-interface
    'line-spanner-interface
    "Generic line drawn between two objects, eg. for use with glissandi.
 gap is measured in staff-spaces.   "
 
-   '(gap dash-period dash-length line-thickness type )
+   '(gap dash-period dash-length line-thickness type 
    ))
 
-(define lyric-hyphen-interface
+
   (lily-interface
    'lyric-hyphen-interface
    "A centred hyphen is a simple line between lyrics used to divide
 syllables.   The length of the hyphen line should stretch based on the
-  size of the gap between syllables."
+size of the gap between syllables."
 
-   '( thickness height minimum-length word-space )
+   '( thickness height minimum-length word-space 
    ))
 
-(define key-signature-interface
+
   (lily-interface
    'key-signature-interface
    "A group of  accidentals."
@@ -528,50 +520,48 @@ syllables.   The length of the hyphen line should stretch based on the
     c0-position  
     old-accidentals  
     new-accidentals  
-    )))
+    ))
+
 
-(define lyric-extender-interface
   (lily-interface
    'lyric-extender-interface
    "The extender is a simple line at the baseline of the lyric
-  that helps show the length of a melissima (tied/slurred note)."
+that helps show the length of a melissima (tied/slurred note)."
    '(
     word-space  
     height  
     right-trim-amount  
-    )))
+    ))
+
 
 
-(define lyric-syllable-interface
   (lily-interface
    'lyric-syllable-interface
    "a single piece of lyrics"
    '(
     word-space  
-    )))
+    ))
+
 
 
-(define mark-interface
   (lily-interface
    'mark-interface
    "a rehearsal mark"
    '(
-    )))
+    ))
+
 
-(define multi-measure-rest-interface
   (lily-interface
    'multi-measure-rest-interface
    "A rest that spans a whole number of measures.  For typesetting the
 numbers, fields from font-interface may be used.
 
 padding is the space between number and rest. Measured in staffspace.
+
 "
-   '(    columns expand-limit minimum-width padding )
+   '(    columns expand-limit minimum-width padding))
 
-   ))
 
-(define paper-column-interface
   (lily-interface
    'paper-column-interface
    ""
@@ -581,9 +571,8 @@ stem-spacing-correction before-grace-spacing-factor when bounded-by-me
 dir-list shortest-playing-duration shortest-starter-duration
 contains-grace extra-space stretch-distance ))
 
-  )
 
-(define spaceable-element-interface
+
   (lily-interface
    'spaceable-element-interface
    "An grob (generally a Paper_column) that takes part in the
@@ -592,9 +581,9 @@ spacing problem. "
      minimum-distances 
      ideal-distances  
      dir-list 
-     )))
+     ))
+
 
-(define rest-collision-interface
   (lily-interface
    'rest-collision-interface
    "Move around ordinary rests (not multi-measure-rests) to avoid
@@ -603,36 +592,36 @@ conflicts."
     maximum-rest-count 
     minimum-distance 
     elements 
-    )))
+    ))
+
 
-(define script-interface
   (lily-interface
    'script-interface
    ""
    '(
     script-priority 
-    )))
+    ))
+
 
-(define script-column-interface
   (lily-interface
    'script-column-interface
    "An interface that sorts scripts according to their @code{script-priority}"
-   '( )))
+   '( ))
+
 
 
-(define spacing-spanner-interface
   (lily-interface
    'spacing-spanner-interface
    " SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
 The space taken by a note is determined by the formula 
 
-  
+
 
 where TIME is the amount of time a note occupies.  The value of C is
 chosen such that the smallest space within a measure is
 arithmetic_basicspace:
 
-  C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) 
+C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) 
 
 The smallest space is the one following the shortest note in the
 measure, or the space following a hypothetical 1/8 note.  Typically
@@ -641,28 +630,28 @@ takes about two noteheads of space (ie, is followed by a notehead of
 space):
 
 @example
-   2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
+2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
 
-   @{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @}
-   @{ assuming: SHORTEST <= 1/8 @}
+@{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @}
+@{ assuming: SHORTEST <= 1/8 @}
 
-               = arithmetic_multiplier *
-              ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
+= arithmetic_multiplier *
+( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
 
-               = arithmetic_multiplier * arithmetic_basicspace
+= arithmetic_multiplier * arithmetic_basicspace
 
-   @{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @}
+@{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @}
 
-               = quartwidth * arithmetic_basicspace
+= quartwidth * arithmetic_basicspace
 
-   =>         
+=>            
 
-   arithmetic_basicspace = 2/1 = 2
+arithmetic_basicspace = 2/1 = 2
 
 
 If you want to space your music wider, use something like:
 
-   arithmetic_basicspace = 4.;
+arithmetic_basicspace = 4.;
 
 @end example"
    '(
@@ -670,9 +659,22 @@ If you want to space your music wider, use something like:
     arithmetic-basicspace 
     arithmetic-multiplier 
     
-    )))
+    ))
+
+
+  (lily-interface
+   'staff-symbol-referencer-interface
+   
+   "Object whose Y position is meaning with reference to a staff
+symbol. Objects that have this interface should include
+Staff_symbol_referencer::callback in their Y-offset-callback.
+"
+   '(
+    staff-symbol
+    staff-position
+    ))
+  
 
-(define staff-symbol-interface
   (lily-interface
    'staff-symbol-interface
    "This spanner draws the lines of a staff.  The middle line is
@@ -681,43 +683,43 @@ position 0."
     staff-space 
     line-count
     invisible-staff
-    )))
+    ))
+
 
-(define stem-tremolo-interface
   (lily-interface
    'stem-tremolo-interface
    ""
    '( stem beam-width beam-thickness beam-space-function 
-    )))
+    ))
+
 
-(define separation-item-interface
   (lily-interface
    'separation-item-interface
    "Item that computes widths to generate spacing rods.
 
 Calc dimensions for the Separating_group_spanner; this has to be
-   an item to get dependencies correct.  It can't be an grob_group
-   since these usually are in a different X_group
+an item to get dependencies correct.  It can't be an grob_group
+since these usually are in a different X_group
 "
    '(
     elements 
-     )))
+     ))
+
 
-(define sustain-pedal-interface
   (lily-interface
    'sustain-pedal-interface
    ""
    '(
-    )))
-(define system-start-delimiter-interface
+    ))
+
   (lily-interface
    'system-start-delimiter-interface
    "#'style can be bar-line, bracket or brace"
    '(bar-line-collapse-height brace-collapse-height bracket-collapse-height
                              thickness arch-height arch-angle arch-thick
-                             arch-width bracket-thick glyph )))
+                             arch-width bracket-thick glyph ))
+
 
-(define text-spanner-interface
   (lily-interface
    'text-spanner-interface
    "generic text spanner"
@@ -728,10 +730,9 @@ Calc dimensions for the Separating_group_spanner; this has to be
     edge-height 
     edge-text 
     type 
-    )
 ))
 
-(define tie-interface
+
   (lily-interface
    'tie-interface
    "A tie connecting two noteheads.
@@ -746,18 +747,18 @@ direction = Forced direction for all ties"
     x-gap 
     direction 
     minimum-length 
-    )))
+    ))
+
 
 
 
-(define tie-column-interface
   (lily-interface
    'tie-column-interface
    "that sets tie directions in a tied chord"
-   '(direction)
+   '(direction
    ))
 
-(define volta-bracket-interface
+
   (lily-interface
    'volta-bracket-interface
    "Volta bracket with number"
@@ -765,15 +766,21 @@ direction = Forced direction for all ties"
     bars  
     thickness  
     height  
-    )))
+    ))
+
 
-(define span-bar-interface
   (lily-interface
    'span-bar-interface
    "A bar line that spans other barlines (typically used to get cross-staff barlines."
    '(
-    )))
+    ))
+
+
+(eval (cons
+       'begin
+       (map (lambda (x) (list 'define (car x) (list 'quote (cdr x))))
+           all-interfaces)))
 
-;(define urg-miss-last-interface )
 
+(define interface-names (map (lambda (x) (symbol->string (car x))) all-interfaces))
 
index ed637bfd134d920d93f9704e90e0c21e4e08c311..c2cdabe9e871cdd6f108191a3becb8830c0d7d73 100644 (file)
 ;; 90 == 90/127 == 0.71 is supposed to be the default value
 ;; urg: we should set this at start of track
 (define dynamic-default-volume 0.71)
+
+;; Count number of sharps minus number of flats
+(define (accidentals-in-key pitch-list)
+  (apply + (map cdr pitch-list)))
+
+;; Characterise the key as major if the alteration of the 
+;; third scale note is the same as that of the main note
+;; Note: MIDI cannot handle other tonalities than major/minor.
+(define (major-key pitch-list)
+  (eq? (cdr (list-ref pitch-list 4)) (cdr (list-ref pitch-list 6))))
index ef5d567f9ac632d5ecfc190c76d665833d911c34..aad55f430ceeb0d587df06046811e6ad0ac44fed 100644 (file)
      "}"
      "\\input lilyponddefs\\newdimen\\outputscale \\outputscale=\\lilypondpaperoutputscale pt\\turnOnPostScript"))
 
+  ;; Note: this string must match the string in ly2dvi.py!!!
   (define (header creator generate) 
     (string-append
      "% Generated automatically by: " creator generate "\n"))
index 350aee59c55d69f79aba510a8ed9563e7bd81e86..08d4760326bf195afd37a435776ee4de49a16d7c 100644 (file)
@@ -151,6 +151,8 @@ Staff.defaultBarType will have no effect.
 (translator-property-description 'chordChanges boolean? "Only generate chords
 if they change.
 ")
+(translator-property-description 'easyPlay boolean? "Copy note names into note head grob property")
+
 (translator-property-description 'explicitClefVisibility procedure? "visibility-lambda function for clef changes.")
 
 (translator-property-description 'explicitKeySignatureVisibility
index 8f5d9da30574a1896188941c1f89a336fed43f99..23f38433b66b005336773eeb070e0c5039bd9dfa 100644 (file)
@@ -119,7 +119,7 @@ class Input:
 
         firstline = this.__fd.readline()
         this.__fd.seek(0)
-        if  re.match('%created by: GNU LilyPond [0-9]+[.0-9]+',firstline ):
+        if  re.match('% Generated automatically by: GNU LilyPond [0-9]+[.0-9]+',firstline ):
             return 'output'
         else:
             return 'source'
index 91477809e40cd367035eb21507b58356ec3314c8..acaa11d23ab77e8d93d9d83cd9835fa1520780d4 100644 (file)
@@ -57,7 +57,7 @@
 \fi
 
 \def\EndLilyPondOutput{%
- \vskip 0pt plus 100fill\csname bye\endcsname
+ \vskip 0pt plus \lilypondpaperinterscorelinefill00 fill\csname bye\endcsname
 }
 \def\postheader{}