lilypond-devel
[Top][All Lists]
Advanced

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

Re: Adds Ferneyhough hairpins to LilyPond. (issue 7615043)


From: thomasmorley65
Subject: Re: Adds Ferneyhough hairpins to LilyPond. (issue 7615043)
Date: Sun, 10 Mar 2013 00:47:51 +0000

Hi Mike,

decrescendo doesn't work!!

My idea about "drag-hairpin" seems not too hard to implement, ofcourse
there would be need to do a clean definition of the property, currently
LilyPond returns a unsurprisingly warning:


#(define-public ((elbowed-hairpin coords mirrored?) grob)

 (define (normalize-coords cords x y)
    (map
      (lambda (coord)
         (list (* x (car coord)) (* y (cdr coord))))
      coords))

 (define (my-c-p-s points)
 ;; !!!!!!!!!!!!!!!!!!
   (let ((drag-hairpin (ly:grob-property grob 'drag-hairpin 0)))
   (set! points
         (map (lambda (c) (list (car c) (+ drag-hairpin (cadr c))))
points))
 ;; !!!!!!!!!!!!!!!!!!
    (make-connected-path-stencil
      points
      0.1
      1.0
      1.0
      #f
      #f)))

 (let* ((sten (ly:hairpin::print grob))
        (xex (ly:stencil-extent sten X))
        (lenx (interval-length xex))
        (yex (ly:stencil-extent sten Y))
        (leny (interval-length yex))
        (uplist (normalize-coords coords lenx (/ leny 2)))
        (downlist (normalize-coords coords lenx (/ leny -2))))

 (ly:stencil-translate
    (ly:stencil-add
       (my-c-p-s uplist)
       (if mirrored? (my-c-p-s downlist) empty-stencil))
    (cons (car xex) (car yex)))))

#(define-public ferneyhough-hairpin
 (elbowed-hairpin '((0.95 . 0.4) (1.0 . 1.0)) #t))

\relative c'' {
 %% !!!!!!!!!!!!!!!!!!!!!!!!!
 \override Hairpin #'drag-hairpin = #-2.2
 \override Hairpin #'stencil = #ferneyhough-hairpin
 a4\< c e a\f
}


https://codereview.appspot.com/7615043/diff/6001/input/regression/ferneyhough-hairpins.ly
File input/regression/ferneyhough-hairpins.ly (right):

https://codereview.appspot.com/7615043/diff/6001/input/regression/ferneyhough-hairpins.ly#newcode10
input/regression/ferneyhough-hairpins.ly:10: a4\< a a a\f
Please test decrescendo, too.

https://codereview.appspot.com/7615043/diff/6001/scm/output-lib.scm
File scm/output-lib.scm (right):

https://codereview.appspot.com/7615043/diff/6001/scm/output-lib.scm#newcode1032
scm/output-lib.scm:1032: #(define simple-hairpin
It's not clear to me why you give _this_ example.

https://codereview.appspot.com/7615043/diff/6001/scm/output-lib.scm#newcode1067
scm/output-lib.scm:1067: (define-public ferneyhough-hairpin
This defines a crescendo-hairpin for _all_ cases, even for
{ c\> d\! }
!!

https://codereview.appspot.com/7615043/



reply via email to

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