[Top][All Lists]

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

Re: trills and trill spanners with accidentals

From: Neil Puttock
Subject: Re: trills and trill spanners with accidentals
Date: Tue, 16 Jun 2009 22:16:43 +0100

2009/6/16 Reinhold Kainhofer <address@hidden>:

> Okay, I'm now trying to achieve this with tweaks (because they can be
> incorporated into the actual start command for the spanner, so one doesn't
> have to add one command before the note plus the start of the trill spanner
> after the note). However, how can I change the bound-details -> left -> text
> using \tweak??? All I seem to be able is to set bound-details, but not the
> subproperties... How can I tweak only the text, but leave the other settings
> in bound-details at their current values?

You could get the default bound-details from all-grob-descriptions:

#(define startSharpTrillSpan
   (let* ((m (make-music 'TrillSpanEvent
                         'span-direction START))
          (details (assoc-get 'bound-details
                              (assoc-get 'TrillSpanner
          (left-details (assoc-get 'left details)))
     (set! (ly:music-property m 'tweaks)
           (acons 'extra-offset '(0 . -0.5)
                  (acons 'bound-details
                         (acons 'left
                                (acons 'text
'(0.0 . -1.0)

(make-pitchedtexttrill-markup SHARP))
                         (ly:music-property m 'tweaks))))

> Attached are my current attempts at creating a general function for pitched
> trills (articulations as well as spanners). While articulations seem to work
> okay (using the text-interface::print function and the trill with the
> accidental as text), I'm unable to assign the proper spanner text using a
> tweak. Does anyone have any pointers how to solve this?

(acons 'stencil (lambda (grob) (grob-interpret-markup grob
(make-pitchedtexttrill-markup alter)))

This is also more idiomatic for the music function, since Script and
TrillSpanner don't support text-interface (it also prevents annoying
warnings in the docs).


Description: Text document

reply via email to

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