]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/define-music-properties.scm (all-music-properties):
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 12 Feb 2006 16:40:03 +0000 (16:40 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 12 Feb 2006 16:40:03 +0000 (16:40 +0000)
create-new property.

* lily/context-specced-music-iterator.cc (construct_children):
inspect 'create-new property iso. magical $uniqueContextId context
id.

* lily/parser.yy (optional_id): allow \new "Bar" = "foo" too.

* lily/context-key-manager.cc (Module): new file. Encapsulate
object key generation.

* lily/include/context-key-manager.hh (Module): new file.

13 files changed:
ChangeLog
input/regression/instrument-name.ly
lily/accidental-engraver.cc
lily/context-key-manager.cc [new file with mode: 0644]
lily/context-specced-music-iterator.cc
lily/context.cc
lily/include/context-key-manager.hh [new file with mode: 0644]
lily/include/context.hh
lily/parser.yy
lily/system-start-delimiter.cc
ly/engraver-init.ly
scm/define-grobs.scm
scm/define-music-properties.scm

index 14a972cd51b6f2a05a75fbaef4b3ebb053783aab..f6c966df0a024ef8ad46239d030ed104d106628a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2006-02-12  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * scm/define-music-properties.scm (all-music-properties):
+       create-new property.
+
+       * lily/context-specced-music-iterator.cc (construct_children):
+       inspect 'create-new property iso. magical $uniqueContextId context
+       id.
+
+       * lily/parser.yy (optional_id): allow \new "Bar" = "foo" too.
+
+       * lily/context-key-manager.cc (Module): new file. Encapsulate
+       object key generation.
+
+       * lily/include/context-key-manager.hh (Module): new file.
+
 2006-02-11  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * scm/define-grobs.scm (all-grob-descriptions): center instrument
index 374b4a9e97743591f067c453fe94677817232197..2d1efa61517de633c02c86c38f9b197a2284b981 100644 (file)
@@ -17,17 +17,20 @@ PianoStaff.
 
 
 
-
-\context PianoStaff <<
-  \context Staff = "treble"    {
-    \set PianoStaff.instrument = "Piano"
-    \set Staff.instrument = "Right" { c''4 }}
-  \context Staff = "bass" {
-    \set Staff.instrument = "Left"
-    \clef bass c4
+\new StaffGroup <<
+  \context PianoStaff <<
+    \context Staff = "treble"    {
+      \set PianoStaff.instrument = "Piano"
+      \set Staff.instrument = "Right" { c''4 }}
+    \context Staff = "bass" {
+      \set Staff.instrument = "Left"
+      \clef bass c4
+    }
+  >>
+
+  \lyrics {
+    \set vocalName = "bert"
+    blah
   }
+  \new Staff { c''4 } 
 >>
-
-
-
-
index 0534eebbd333f0539f92fd6614c2a3cf687c505a..bd088021de646b812a13052e34f79c4a3221c6fa 100644 (file)
@@ -391,6 +391,7 @@ Accidental_engraver::make_standard_accidental (Music *note,
                                               Engraver *trans)
 {
 
+  (void)note;
   /*
     We construct the accidentals at the originating Voice
     level, so that we get the property settings for
@@ -428,7 +429,7 @@ Accidental_engraver::make_suggested_accidental (Music *note,
                                                Grob *note_head,
                                                Engraver *trans)
 {
-
+  (void) note;
   Grob *a
     = make_grob_from_properties (trans,
                                 ly_symbol2scm ("AccidentalSuggestion"),
diff --git a/lily/context-key-manager.cc b/lily/context-key-manager.cc
new file mode 100644 (file)
index 0000000..2f1fbe3
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+  context-key-manager.cc -- implement Context_key_manager 
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+*/
+
+#include "context-key-manager.hh"
+#include "object-key.hh"
+#include "lilypond-key.hh"
+#include "main.hh"
+
+Context_key_manager::Context_key_manager (Object_key const *key)
+{
+  key_ = key;
+}
+
+void
+Context_key_manager::unprotect () const
+{
+  if (key_)
+    ((Object_key *)key_)->unprotect ();
+}
+
+
+Object_key const *
+Context_key_manager::get_context_key (Moment now, string type, string id)
+{
+  if (!use_object_keys)
+    return 0;
+
+  string now_key = type + "@" + id;
+
+  int disambiguation_count = 0;
+  if (context_counts_.find (now_key) != context_counts_.end ())
+    disambiguation_count = context_counts_[now_key];
+
+  context_counts_[now_key] = disambiguation_count + 1;
+
+  return new Lilypond_context_key (key (),
+                                  now,
+                                  type, id,
+                                  disambiguation_count);
+}
+
+
+Object_key const *
+Context_key_manager::get_grob_key (Moment m, string name)
+{
+  if (!use_object_keys)
+    return 0;
+
+  return create_grob_key (m, name);
+}
+
+/*
+  We want to have a key for some objects anyway, so we can invent a
+  unique identifier for each (book,score) tuple.
+*/
+Object_key const *
+Context_key_manager::create_grob_key (Moment now, string name)
+{
+  int disambiguation_count = 0;
+  if (grob_counts_.find (name) != grob_counts_.end ())
+    disambiguation_count = grob_counts_[name];
+  grob_counts_[name] = disambiguation_count + 1;
+
+  Object_key *k = new Lilypond_grob_key (key (),
+                                        now,
+                                        name,
+                                        disambiguation_count);
+
+  return k;
+}
+
+void
+Context_key_manager::gc_mark () const
+{
+  if (key_)
+    scm_gc_mark (key_->self_scm ());
+
+}
+
+void
+Context_key_manager::clear ()
+{
+  if (!use_object_keys)
+    return;
+
+  grob_counts_.clear ();
+  context_counts_.clear ();
+}
+
+Context_key_manager::Context_key_manager (Context_key_manager const &src)
+{
+  (void)src;
+  assert (false);
+}
index 9036d72fb6d616fa90bd2dbac66f9a8b690d169e..86342a5eb422722976d8155ae43d0ffb5af758e9 100644 (file)
@@ -30,8 +30,8 @@ Context_specced_music_iterator::construct_children ()
 
   Context *a = 0;
 
-  if (c_id == "$uniqueContextId")
-    a = get_outlet ()->create_unique_context (ct, ops);
+  if (to_boolean (get_music()->get_property ("create-new")))
+    a = get_outlet ()->create_unique_context (ct, c_id, ops);
   else
     a = get_outlet ()->find_create_context (ct, c_id, ops);
 
index b1e4a6629de9589c28e907ae6cf4d4c3d482912b..2445ea12f38a96c33a71dc17782c776914af4300 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "context-def.hh"
 #include "international.hh"
-#include "lilypond-key.hh"
 #include "ly-smobs.icc"
 #include "main.hh"
 #include "output-def.hh"
@@ -46,7 +45,8 @@ Context::check_removal ()
     }
 }
 
-Context::Context (Context const &)
+Context::Context (Context const &src)
+  : key_manager_ (src.key_manager_)
 {
   assert (false);
 }
@@ -85,8 +85,8 @@ Context::add_context (Context *t)
 
 
 Context::Context (Object_key const *key)
+  : key_manager_ (key)
 {
-  key_ = key;
   daddy_context_ = 0;
   init_ = false;
   aliases_ = SCM_EOL;
@@ -106,26 +106,25 @@ Context::Context (Object_key const *key)
     UGH UGH
     const correctness.
   */
-  if (key_)
-    ((Object_key *)key)->unprotect ();
+  key_manager_.unprotect();
 }
 
 /* TODO:  this shares code with find_create_context ().  */
 Context *
-Context::create_unique_context (SCM n, SCM operations)
+Context::create_unique_context (SCM name, string id, SCM operations)
 {
   /*
     Don't create multiple score contexts.
   */
   if (dynamic_cast<Global_context *> (this)
       && dynamic_cast<Global_context *> (this)->get_score_context ())
-    return get_score_context ()->create_unique_context (n, operations);
+    return get_score_context ()->create_unique_context (name, id, operations);
 
   /*
     TODO: use accepts_list_.
   */
   vector<Context_def*> path
-    = unsmob_context_def (definition_)->path_to_acceptable_context (n, get_output_def ());
+    = unsmob_context_def (definition_)->path_to_acceptable_context (name, get_output_def ());
 
   if (path.size ())
     {
@@ -134,10 +133,15 @@ Context::create_unique_context (SCM n, SCM operations)
       // start at 1.  The first one (index 0) will be us.
       for (vsize i = 0; i < path.size (); i++)
        {
-         SCM ops = (i == path.size () -1) ? operations : SCM_EOL;
-
+         SCM ops = SCM_EOL;
+         string id_str = "\\new";
+         if (i == path.size () - 1)
+           {
+             ops = operations;
+             id_str = id;
+           }
          current = current->create_context (path[i],
-                                            "\\new",
+                                            id_str,
                                             ops);
        }
 
@@ -150,11 +154,11 @@ Context::create_unique_context (SCM n, SCM operations)
   */
   Context *ret = 0;
   if (daddy_context_ && !dynamic_cast<Global_context *> (daddy_context_))
-    ret = daddy_context_->create_unique_context (n, operations);
+    ret = daddy_context_->create_unique_context (name, id, operations);
   else
     {
       warning (_f ("can't find or create new `%s'",
-                  ly_symbol2string (n).c_str ()));
+                  ly_symbol2string (name).c_str ()));
       ret = 0;
     }
   return ret;
@@ -228,7 +232,7 @@ Context::create_context (Context_def *cdef,
                         SCM ops)
 {
   string type = ly_symbol2string (cdef->get_context_name ());
-  Object_key const *key = get_context_key (type, id);
+  Object_key const *key = key_manager_.get_context_key (now_mom(), type, id);
   Context *new_context
     = cdef->instantiate (ops, key);
 
@@ -239,55 +243,6 @@ Context::create_context (Context_def *cdef,
   return new_context;
 }
 
-Object_key const *
-Context::get_context_key (string type, string id)
-{
-  if (!use_object_keys)
-    return 0;
-
-  string now_key = type + "@" + id;
-
-  int disambiguation_count = 0;
-  if (context_counts_.find (now_key) != context_counts_.end ())
-    disambiguation_count = context_counts_[now_key];
-
-  context_counts_[now_key] = disambiguation_count + 1;
-
-  return new Lilypond_context_key (key (),
-                                  now_mom (),
-                                  type, id,
-                                  disambiguation_count);
-}
-
-Object_key const *
-Context::get_grob_key (string name)
-{
-  if (!use_object_keys)
-    return 0;
-
-  return create_grob_key (name);
-}
-
-/*
-  We want to have a key for some objects anyway, so we can invent a
-  unique identifier for each (book,score) tuple.
-*/
-Object_key const *
-Context::create_grob_key (string name)
-{
-  int disambiguation_count = 0;
-  if (grob_counts_.find (name) != grob_counts_.end ())
-    disambiguation_count = grob_counts_[name];
-  grob_counts_[name] = disambiguation_count + 1;
-
-  Object_key *k = new Lilypond_grob_key (key (),
-                                        now_mom (),
-                                        name,
-                                        disambiguation_count);
-
-  return k;
-}
-
 /*
   Default child context as a SCM string, or something else if there is
   none.
@@ -522,12 +477,23 @@ Context::print_smob (SCM s, SCM port, scm_print_state *)
   return 1;
 }
 
+Object_key const *
+Context::get_grob_key (string name)
+{
+  return key_manager_.get_grob_key (now_mom (), name);
+}
+
+Object_key const *
+Context::get_context_key (string name, string id)
+{
+  return key_manager_.get_context_key (now_mom (), name, id);
+}
+
 SCM
 Context::mark_smob (SCM sm)
 {
   Context *me = (Context *) SCM_CELL_WORD_1 (sm);
-  if (me->key_)
-    scm_gc_mark (me->key_->self_scm ());
+  me->key_manager_.gc_mark();
 
   scm_gc_mark (me->context_list_);
   scm_gc_mark (me->aliases_);
@@ -583,8 +549,7 @@ Context::clear_key_disambiguations ()
   if (!use_object_keys)
     return;
 
-  grob_counts_.clear ();
-  context_counts_.clear ();
+  key_manager_.clear ();
   for (SCM s = context_list_; scm_is_pair (s); s = scm_cdr (s))
     unsmob_context (scm_car (s))->clear_key_disambiguations ();
 }
diff --git a/lily/include/context-key-manager.hh b/lily/include/context-key-manager.hh
new file mode 100644 (file)
index 0000000..db7078f
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+  context-key-manager.hh -- declare Context_key_manager
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+*/
+
+#ifndef CONTEXT_KEY_MANAGER_HH
+#define CONTEXT_KEY_MANAGER_HH
+
+#include "lily-proto.hh"
+
+#include <map>
+using namespace std;
+
+class Context_key_manager
+{
+  Object_key const *key_;
+  map<string, int> grob_counts_;
+  map<string, int> context_counts_;
+  
+
+protected:
+  friend class Context;
+  
+  Context_key_manager (Object_key const *);
+  Context_key_manager (Context_key_manager const &src);
+
+
+  void unprotect () const;
+  void gc_mark () const;
+  void clear ();
+  Object_key const *key () const { return key_; }
+  Object_key const *create_grob_key (Moment, string);
+  Object_key const *get_grob_key (Moment, string);
+  Object_key const *get_context_key (Moment, string, string);
+};
+
+#endif /* CONTEXT_KEY_MANAGER_HH */
+
+
index 22e7e142210fa7acf041551a59366a0873199db6..6a2fcb0d22480d8b77e75d8dae64c65c51324cb3 100644 (file)
@@ -9,12 +9,11 @@
 #ifndef CONTEXT_HH
 #define CONTEXT_HH
 
-#include <map>
-using namespace std;
 
 #include "moment.hh"
 #include "lily-proto.hh"
 #include "virtual-methods.hh"
+#include "context-key-manager.hh"
 
 class Context
 {
@@ -30,14 +29,11 @@ private:
   int iterator_count_;
   bool init_;
 
-  map<string, int> grob_counts_;
-  map<string, int> context_counts_;
-
 protected:
-  Object_key const *key_;
   Context *daddy_context_;
   SCM definition_;
-
+  Context_key_manager key_manager_;
+  
   SCM properties_scm_;
   SCM context_list_;
   SCM accepts_list_;
@@ -48,11 +44,10 @@ protected:
   friend class Context_def;
   void clear_key_disambiguations ();
 
+  
 public:
-  Object_key const *key () const { return key_; }
-  Object_key const *create_grob_key (string);
-  Object_key const *get_grob_key (string);
-  Object_key const *get_context_key (string, string);
+  Object_key const *get_grob_key (string name);
+  Object_key const *get_context_key (string name, string id);
 
   Context *create_context (Context_def *, string, SCM);
   string id_string () const { return id_string_; }
@@ -90,7 +85,7 @@ public:
 
   Context *find_create_context (SCM context_name,
                                string id, SCM ops);
-  Context *create_unique_context (SCM context_name,
+  Context *create_unique_context (SCM context_name, string context_id,
                                  SCM ops);
   vector<Context*> path_to_acceptable_context (SCM alias,
                                                  Output_def *) const;
index a85870f17963e6d23c0882264176d2ef01a8f975..02599215fd509d0ad63ee98bf18e2e6be90524ab 100644 (file)
@@ -112,7 +112,7 @@ using namespace std;
 #define MY_MAKE_MUSIC(x)  make_music_by_name (ly_symbol2scm (x))
 
 Music *property_op_to_music (SCM op);
-Music *context_spec_music (SCM type, SCM id, Music *m, SCM ops);
+Music *context_spec_music (SCM type, SCM id, Music *m, SCM ops, bool create_new);
 SCM get_next_unique_context_id ();
 SCM get_next_unique_lyrics_context_id ();
 
@@ -399,6 +399,7 @@ If we give names, Bison complains.
 %type <scm> object_id_setting
 %type <scm> octave_check
 %type <scm> optional_context_mod
+%type <scm> optional_id
 %type <scm> optional_notemode_duration
 %type <scm> pitch
 %type <scm> pitch_also_in_chords
@@ -1045,20 +1046,23 @@ Generic_prefix_music_scm:
        }
        ;
 
+optional_id:
+       /**/ { $$ = SCM_EOL; }
+       | '=' simple_string {
+               $$ = $2;
+       }
+       ;       
+
+
 Prefix_composite_music:
        Generic_prefix_music_scm {
                $$ = run_music_function (THIS, $1);
        }
-       | CONTEXT simple_string '=' simple_string optional_context_mod Music {
-               $$ = context_spec_music ($2, $4, $6, $5);
-
-       }
-       | CONTEXT simple_string optional_context_mod Music {
-               $$ = context_spec_music ($2, SCM_UNDEFINED, $4, $3);
+       | CONTEXT    simple_string optional_id optional_context_mod Music {
+               $$ = context_spec_music ($2, $3, $5, $4, false);
        }
-       | NEWCONTEXT simple_string optional_context_mod Music {
-               $$ = context_spec_music ($2, get_next_unique_context_id (), $4,
-                       $3);
+       | NEWCONTEXT simple_string optional_id optional_context_mod Music {
+               $$ = context_spec_music ($2, $3, $5, $4, true);
        }
 
        | TIMES fraction Music  
@@ -1103,8 +1107,7 @@ Prefix_composite_music:
                THIS->lexer_->pop_state ();
        }
        | mode_changing_head_with_context optional_context_mod Grouped_music_list {
-               $$ = context_spec_music ($1, get_next_unique_context_id (),
-                                        $3, $2);
+               $$ = context_spec_music ($1, SCM_UNDEFINED, $3, $2, true);
                if ($1 == ly_symbol2scm ("ChordNames"))
                {
                  Music *chm = MY_MAKE_MUSIC ("UnrelativableMusic");
@@ -1220,7 +1223,7 @@ re_rhythmed_music:
                        name = get_next_unique_lyrics_context_id ();
                        voice = context_spec_music (scm_makfrom0str ("Voice"),
                                                    name,
-                                                   voice, SCM_EOL);
+                                                   voice, SCM_EOL, false);
                }
 
                SCM context = scm_makfrom0str ("Lyrics");
@@ -1232,7 +1235,7 @@ re_rhythmed_music:
                        Music *music = unsmob_music (scm_car (s));
                        Music *com = make_lyric_combine_music (name, music);
                        Music *csm = context_spec_music (context,
-                               get_next_unique_context_id (), com, SCM_EOL);
+                               SCM_UNDEFINED, com, SCM_EOL, true);
                        lst = scm_cons (csm->self_scm (), lst);
                }
                all->set_property ("elements", scm_cons (voice->self_scm (),
@@ -1328,14 +1331,14 @@ music_property_def:
                        ly_symbol2scm ("push"),
                        scm_cadr ($2),
                        $5, $3));
-               $$ = context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+               $$ = context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL, false);
        }
        | OVERRIDE context_prop_spec embedded_scm  embedded_scm '=' scalar {
                $$ = property_op_to_music (scm_list_5 (
                        ly_symbol2scm ("push"),
                        scm_cadr ($2),
                        $6, $4, $3));
-               $$ = context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+               $$ = context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL, false);
        }
        | REVERT context_prop_spec embedded_scm {
                $$ = property_op_to_music (scm_list_3 (
@@ -1343,20 +1346,20 @@ music_property_def:
                        scm_cadr ($2),
                        $3));
 
-               $$= context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+               $$= context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL, false);
        }
        | SET context_prop_spec '=' scalar {
                $$ = property_op_to_music (scm_list_3 (
                        ly_symbol2scm ("assign"),
                        scm_cadr ($2),
                        $4));
-               $$= context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+               $$= context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL, false);
        }
        | UNSET context_prop_spec {
                $$ = property_op_to_music (scm_list_2 (
                        ly_symbol2scm ("unset"),
                        scm_cadr ($2)));
-               $$= context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+               $$= context_spec_music (scm_car ($2), SCM_UNDEFINED, $$, SCM_EOL, false);
        }
        | ONCE music_property_def {
                SCM e = $2->get_property ("element");
@@ -1622,16 +1625,16 @@ command_element:
                                         sounds_as_c.smobbed_copy());
                $$->set_spot (@$);
                $$ = context_spec_music (ly_symbol2scm ("Staff"), SCM_UNDEFINED,
-                       $$, SCM_EOL);
+                       $$, SCM_EOL, false);
        }
        | PARTIAL duration_length       {
                Moment m = - unsmob_duration ($2)->get_length ();
                Music *p = set_property_music (ly_symbol2scm ( "measurePosition"),m.smobbed_copy ());
                p->set_spot (@$);
                p = context_spec_music (ly_symbol2scm ("Timing"), SCM_UNDEFINED,
-                                       p, SCM_EOL);
+                                       p, SCM_EOL, false);
                p = context_spec_music (ly_symbol2scm ("Score"), SCM_UNDEFINED,
-                                       p, SCM_EOL);
+                                       p, SCM_EOL, false);
                $$ = p;
        }
 
@@ -2657,7 +2660,7 @@ property_op_to_music (SCM op)
 }
 
 Music*
-context_spec_music (SCM type, SCM id, Music *m, SCM ops)
+context_spec_music (SCM type, SCM id, Music *m, SCM ops, bool create_new)
 {
        Music *csm = MY_MAKE_MUSIC ("ContextSpeccedMusic");
 
@@ -2667,6 +2670,8 @@ context_spec_music (SCM type, SCM id, Music *m, SCM ops)
        csm->set_property ("context-type",
                scm_is_symbol (type) ? type : scm_string_to_symbol (type));
        csm->set_property ("property-operations", ops);
+       if (create_new)
+               csm->set_property ("create-new", SCM_BOOL_T);
 
        if (scm_is_string (id))
                csm->set_property ("context-id", id);
index 5a4e220500519ffbb8f7c9924d11f1fa1c3d4f87..c33180540dbf3e849eb8a21c2bd9ff282a4f3bf0 100644 (file)
@@ -91,9 +91,15 @@ System_start_delimiter::text (Grob *me_grob, Real h)
   SCM scm_stencil = Text_interface::is_markup (t)
     ? Text_interface::interpret_markup (me->layout ()->self_scm (), chain, t)
     : SCM_EOL;
+
   
   if (Stencil *p = unsmob_stencil (scm_stencil))
-    return *p;
+    {
+      SCM align_y  = me_grob->get_property ("self-alignment-Y");
+      if (scm_is_number (align_y))
+       p->align_to (Y_AXIS, robust_scm2double (align_y, 0.0));
+      return *p;
+    }
   return Stencil();
 }
 
@@ -206,6 +212,7 @@ ADD_INTERFACE (System_start_delimiter, "system-start-delimiter-interface",
               "collapse-height "
               "style "
               "text "
-              "long-text " 
+              "long-text "
+              "self-alignment-Y "
               "thickness "
               );
index 12208d9c108c3486d11a5b26da8a8679cfc7b977..6654a65ccbb62c54eb6dc63e214662e5a7bf1e71 100644 (file)
@@ -350,7 +350,10 @@ printing of a single line of lyrics.  "
   \override VerticalAxisGroup #'remove-first = ##t
   \override VerticalAxisGroup #'remove-empty = ##t
   \override SeparationItem #'padding = #0.2
-  \override InstrumentName #'Y-offset = #0.0 
+  \override InstrumentName #'self-alignment-Y = ##f
+
+  %% sync with define-grobs.scm ;
+  \override InstrumentName #'font-size = #1.0
 
   %% make sure that barlines aren't collapsed, when
   %% Bar_engraver is there.
index 2a267ba39b1feb91aea876d378731a8bd871e642..7157fcba4d6115e184e69567babcd9f5ac0b71ff 100644 (file)
        (stencil . ,ly:system-start-delimiter::print)
        (X-offset . ,ly:side-position-interface::x-aligned-side)
        (direction . ,LEFT)
-       (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
        (self-alignment-Y . ,CENTER)
        (meta . ((class . Spanner)
                 (interfaces . (system-start-text-interface
index 32f6bbdac4468cca47dbfc6279e65900c3077efb..0286f9923fd7a36baa9963ec321ea98b5aecdba1 100644 (file)
@@ -38,6 +38,7 @@ TODO: consider making type into symbol ")
      (compress-procedure ,procedure? "compress this music expression. Argument 1: the music, arg 2: factor")
      (context-id ,string? "name of context")
      (context-type ,symbol?  "type of context")
+     (create-new ,boolean? "Create a fresh context.") 
      (descend-only ,boolean? "If set, this @code{\\context} will only
 descend in the context tree.")
      (denominator ,integer? "denominator in a time signature")