diff options
author | Reinhold Kainhofer <reinhold@kainhofer.com> | 2009-01-30 22:46:02 +0100 |
---|---|---|
committer | Reinhold Kainhofer <reinhold@kainhofer.com> | 2009-03-06 20:38:57 +0100 |
commit | df76c6d3071a89225cd61e1f8ef5149c7b0550b4 (patch) | |
tree | 35dece4ebedd08fa1f49e8b16d8092afd71b0efa | |
parent | e6663f2af5861911fe1ae6ac15e65005feabf14b (diff) |
Add snappizzicato articulation
-) Add "scripts.snappizzicato" glyph to the feta font
-) Add \snappizzicato articulation function
-) Add regtest for snappizzicato
-) Remove custom definition from musicxml2ly and use the new \snappizzicato
-) Add the new articulation to our chart of articulations
-rw-r--r-- | Documentation/topdocs/NEWS.tely | 9 | ||||
-rw-r--r-- | input/manual/script-chart.ly | 4 | ||||
-rw-r--r-- | input/regression/articulation-snappizzicato.ly | 6 | ||||
-rw-r--r-- | ly/script-init.ly | 1 | ||||
-rw-r--r-- | mf/feta-schrift.mf | 50 | ||||
-rw-r--r-- | scm/script.scm | 8 | ||||
-rw-r--r-- | scripts/musicxml2ly.py | 19 |
7 files changed, 76 insertions, 21 deletions
diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely index 8aa218c372..ae899645c2 100644 --- a/Documentation/topdocs/NEWS.tely +++ b/Documentation/topdocs/NEWS.tely @@ -63,10 +63,19 @@ which scares away people. @end ignore @item +A snap-pizzicato (also known as Bartok-pizzicato) articulation was added: +@lilypond[quote] +\relative c'' { + c\snappizzicato +} +@end lilypond + +@item FretBoards now have a chordChanges property to keep repeated FretBoard objects from being typeset. + @end itemize diff --git a/input/manual/script-chart.ly b/input/manual/script-chart.ly index 5dc23d0dae..d8cbd8fa7a 100644 --- a/input/manual/script-chart.ly +++ b/input/manual/script-chart.ly @@ -24,7 +24,7 @@ This chart shows all articulations, or scripts, that feta font contains. c''\upbow c''\downbow c''\flageolet c''\thumb c''^\lheel c''\rheel c''^\ltoe c''\rtoe c''\open - c''\stopped c''\turn c''\reverseturn + c''\stopped c''\snappizzicato c''\turn c''\reverseturn c''\trill c''\prall c''\mordent c''\prallprall c''\prallmordent c''\upprall c''\downprall c''\upmordent c''\downmordent @@ -39,7 +39,7 @@ This chart shows all articulations, or scripts, that feta font contains. upbow__ downbow__ flageolet__ thumb__ lheel__ rheel__ ltoe__ rtoe__ open__ - stopped__ turn__ reverseturn__ + stopped__ snappizzicato__ turn__ reverseturn__ trill__ prall__ mordent__ prallprall__ prallmordent__ upprall__ downprall__ upmordent__ downmordent__ diff --git a/input/regression/articulation-snappizzicato.ly b/input/regression/articulation-snappizzicato.ly new file mode 100644 index 0000000000..90ed805c29 --- /dev/null +++ b/input/regression/articulation-snappizzicato.ly @@ -0,0 +1,6 @@ +\header { + texidoc = "The snappizzicato articulation adds a snappizzicato sign to the note." +} +\version "2.12.3" + +\relative c'' { c4\snappizzicato } diff --git a/ly/script-init.ly b/ly/script-init.ly index d1d28a54af..f54994a307 100644 --- a/ly/script-init.ly +++ b/ly/script-init.ly @@ -52,4 +52,5 @@ downprall = #(make-articulation "downprall") segno = #(make-articulation "segno") coda = #(make-articulation "coda") varcoda = #(make-articulation "varcoda") +snappizzicato = #(make-articulation "snappizzicato") diff --git a/mf/feta-schrift.mf b/mf/feta-schrift.mf index 5bb7c1abdd..7fd09c1341 100644 --- a/mf/feta-schrift.mf +++ b/mf/feta-schrift.mf @@ -1557,4 +1557,54 @@ fet_beginchar ("Straight caesura", "caesura.straight"); labels(1a, 1b, 2a, 2b, 3a, 3b, 4a, 4b); fet_endchar; + +fet_beginchar ("snap pizzicato (Bartok pizzicato)", "snappizzicato"); + save height, width, thickness, superness; + + height# = 4/15 staffsize#; + width# = height#; + thickness# = 1.3 linethickness#; + define_pixels (height, width); + define_whole_blacker_pixels (thickness); + + set_char_box (width# / 2, width# / 2, height# / 2, height# / 2); + + penpos1 (thickness, 90); + penpos2 (thickness, 180); + penpos3 (thickness, 270); + penpos4 (thickness, 0); + + x1 = 0; + y1r = h; + x3 = x1; + y3r = -y1r; + x4r = w; + y4 = 0; + x2r = -x4r; + y2 = y4; + + penlabels (1, 2, 3, 4); + + % mf doesn't handle pixel dropouts in outline objects, so we use + % `draw' if not called by mpost + if known miterlimit: + penstroke z1e + .. z2e + .. z3e + .. z4e + .. cycle; + else: + pickup pencircle scaled thickness; + draw z1 + .. z2 + .. z3 + .. z4 + .. cycle; + fi; + z5 = (0, 0); + z6 = (x5, 1.5*y1r); + pickup pencircle scaled thickness; + draw z5 -- z6; +fet_endchar; + fet_endgroup ("scripts"); diff --git a/scm/script.scm b/scm/script.scm index 2a7bbd9755..966024f2d2 100644 --- a/scm/script.scm +++ b/scm/script.scm @@ -258,4 +258,10 @@ ((script-stencil . (feta . ("varcoda" . "varcoda"))) (padding . 0.20) (avoid-slur . outside) - (direction . 1))))) + (direction . 1))) + ("snappizzicato" . + ((script-stencil . (feta . ("snappizzicato" . "snappizzicato"))) + (padding . 0.20) + (avoid-slur . outside) + (direction . 1))) + )) diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index f6fcaa5cc1..831873bf86 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -45,17 +45,6 @@ def error_message (str): needed_additional_definitions = [] additional_definitions = { - "snappizzicato": """#(define-markup-command (snappizzicato layout props) () - (interpret-markup layout props - (markup #:stencil - (ly:stencil-translate-axis - (ly:stencil-add - (make-circle-stencil 0.7 0.1 #f) - (ly:make-stencil - (list 'draw-line 0.1 0 0.1 0 1) - '(-0.1 . 0.1) '(0.1 . 1))) - 0.7 X))))""", - "eyeglasses": """eyeglassesps = #"0.15 setlinewidth -0.9 0 translate 1.1 1.1 scale @@ -1144,12 +1133,6 @@ def musicxml_fingering_event (mxl_event): ev.type = mxl_event.get_text () return ev -def musicxml_snappizzicato_event (mxl_event): - needed_additional_definitions.append ("snappizzicato") - ev = musicexp.MarkupEvent () - ev.contents = "\\snappizzicato" - return ev - def musicxml_string_event (mxl_event): ev = musicexp.NoDirectionArticulationEvent () ev.type = mxl_event.get_text () @@ -1211,7 +1194,7 @@ articulations_dict = { #"schleifer": "?", #"scoop": "?", #"shake": "?", - "snap-pizzicato": musicxml_snappizzicato_event, + "snap-pizzicato": "snappizzicato", #"spiccato": "?", "staccatissimo": (musicexp.ShortArticulationEvent, "|"), # or "staccatissimo" "staccato": (musicexp.ShortArticulationEvent, "."), # or "staccato" |