Abjad / abjad

Abjad is a Python API for building LilyPond files. Use Abjad to make PDFs of music notation.
https://abjad.github.io
GNU General Public License v3.0
234 stars 41 forks source link

Add constante-flared hairpin #1506

Open GregoryREvans opened 1 year ago

GregoryREvans commented 1 year ago

I would like to propose the addition of a new hairpin style. The following style is somewhat redundant, but sometimes flared hairpins (especially in handwritten scores) are notated like this:

flare

I believe that this would be a useful addition to the current hairpin styles because I feel there is a subtle implication of constante as opposed to the current flared hairpin's slight widening. The current flared hairpin appears to be the preference of Brian Ferneyhough (see String Quartet 3, measure 10, violin 1) while I see my proposed addition in the Zayin series by Francisco Guerrero Marín. The addition is solved by appending the following code to solomon-flared-hairpin.ily

#(define-public guerrero-flared-hairpin
  (elbowed-hairpin '((1.0 . 0.0) (1.45 . 1.0)) - #t))

I would write a PR but I'm behind one abjad release. Feel free to tweak and/or rename this hairpin.

In abjad.StartHairpin this shape could easily be referenced by the string "-<" or "-|" depending on whether the string should more closely match the hairpin visually or retain the implied "flare" specifier of the | pipe as seen in "<|". But I think "-|" conflicts with baca.text_spanner. Either way I think borrowing - from the constante hairpin "--" shape would be resourceful.

trevorbaca commented 4 months ago

Hey @GregoryREvans I'm getting a Guile error with LilyPond 2.25.10. This snippet ...

\version "2.25.10"
#(define-public guerrero-flared-hairpin
  (elbowed-hairpin '((1.0 . 0.0) (1.45 . 1.0)) - #t))

... gives this output ...

GNU LilyPond 2.25.10 (running Guile 2.2)
Changing working directory to: `/Users/trevor/.abjad'
Processing `/Users/trevor/.abjad/test.ly'
Parsing...
/Users/trevor/.abjad/test.ly:5:2: error: Guile signaled an error for the expression beginning here
#
 (define-public guerrero-flared-hairpin
Wrong number of arguments to #<procedure elbowed-hairpin (coords mirrored?)>
fatal error: failed files: "/Users/trevor/.abjad/test.ly"

... which makes me wonder if you can check?

I like the idea. And "--<" as an initializer string makes sense.