lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding a vertical-end property to VoltaBracket


From: Sven Axelsson
Subject: Adding a vertical-end property to VoltaBracket
Date: Sat, 8 Oct 2005 14:17:12 +0200

I use manual volta brackets a lot for marking alternative bars in the middle of a measure. It would be great if I could force those to have a vertical bar at the end even when not adjacent to a repeat sign. Perhaps something like this? (untested code)

Index: lily/volta-bracket.cc
===================================================================
RCS file: /cvsroot/lilypond/lilypond/lily/volta-bracket.cc,v
retrieving revision 1.50
diff -u -r1.50 volta-bracket.cc
--- lily/volta-bracket.cc    12 Sep 2005 12:46:49 -0000    1.50
+++ lily/volta-bracket.cc    8 Oct 2005 12:10:45 -0000
@@ -54,13 +54,17 @@
   else
     str = "|";
 
-  no_vertical_end
-    |= (str != ":|"
-    && str != "|:"
-    && str != "|."
-    && str != ":|:"
-    && str != ".|");
-
+  SCM vertical_end = me->get_property ("vertical-end");
+  if (scm_is_bool (vertical_end)) {
+    no_vertical_end = !vertical_end;
+  } else {
+    no_vertical_end
+     |= (str != ":|"
+     && str != "|:"
+     && str != "|."
+     && str != ":|:"
+     && str != ".|");
+  }
   Output_def *layout = me->get_layout ();
   Real half_space = 0.5;
 
@@ -128,5 +132,5 @@
 
 ADD_INTERFACE (Volta_bracket_interface, "volta-bracket-interface",
            "Volta bracket with number",
-           "bars thickness height");
+           "bars thickness height vertical-end");


--
Sven Axelsson
reply via email to

[Prev in Thread] Current Thread [Next in Thread]