lilypond-user
[Top][All Lists]
Advanced

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

Re: Custom articulations/pitched single-note trills


From: shutterfreak
Subject: Re: Custom articulations/pitched single-note trills
Date: Fri, 23 Nov 2012 13:25:22 -0800 (PST)

Hi all,

I'm now confronted with an unfamiliar single note pitched trill (a f sharp
trill with a "3za" mark - i.e., one third above f sharp as the trilled
note). In looking for a solution, I came across the following older post:

http://lilypond.1069038.n5.nabble.com/Custom-articulations-pitched-single-note-trills-td40530.html

I tried running convert-ly to update the code from post #4 in that thread
from version 2.11.57 to 2.16.1 but sadly the code doesn't display any
articulation or pitched articulation.

Here's the output from convert-ly:

% BEGIN
\version "2.16.1"

pitchedArtic =
#(define-music-function (parser location str main-note paren next-note)
   (string? ly:music? ly:music? ly:music?)
   (let* ((get-notes (lambda (ev-chord)
                       (filter
                        (lambda (m) (eq? 'NoteEvent (ly:music-property m
'name)))
                        (ly:music-property ev-chord 'elements))))
          (paren-notes (get-notes paren)))

     (if (pair? paren-notes)
         (begin
          (let*
           ((paren-pitch (ly:music-property (car paren-notes) 'pitch))
            (forced (ly:music-property (car paren-notes ) 'force-accidental
#f)))

           (if (ly:pitch? paren-pitch)
               (begin
                (ly:music-set-property! main-note 'elements
                  (cons (make-music
                         'TrillSpanEvent
                         'force-accidental forced
                         'pitch paren-pitch
                         'span-direction START)
                    (ly:music-property main-note 'elements)))

                (ly:music-set-property! next-note 'elements
                  (cons stopTrillSpan
                    (ly:music-property next-note 'elements))))
               (begin
                (ly:warning (_ "Second argument should be single note: "))
                (display paren-notes)))
           )))
     (make-music 'SequentialMusic
       'origin location
       'elements (list #{
         %\once \override TrillSpanner #'style = #'dashed-line
         %\once \override TrillSpanner #'style = #'none
         \once \override TrillSpanner #'(bound-details left text) =
         #(make-musicglyph-markup (format "scripts.~a" str))
                   #}
                   main-note next-note))))

\relative c' {
  \pitchedArtic "mordent" cis b
  \pitchedArtic "prall" c des
  c2
  \pitchedArtic "trill" fis ais
  c2
}
% END

What is missing or what went awry in converting between LilyPond versions
with convert-ly?

Best regards,

Olivier



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Custom-articulations-pitched-single-note-trills-tp40530p136747.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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