lilypond-user
[Top][All Lists]
Advanced

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

Re: Batch-apply tremolo markings? (Frescobaldi)


From: Ben
Subject: Re: Batch-apply tremolo markings? (Frescobaldi)
Date: Mon, 4 Jun 2018 17:10:43 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 6/4/2018 4:55 PM, Aaron Hill wrote:
On 2018-06-04 12:09, Ben wrote:
Wow. Um, this is awesome. Yes it works beautifully. How difficult
would it be to allow this function to accept chords? Or would that
simply be best served as creating another function like \addTremChords
or something?

Not that hard.  You just need to accept both NoteEvent and EventChord:

%%%%
  \version "2.19.81"
  addTremolos =
  #(define-music-function (number music) (integer? ly:music?)
     (music-map
      (lambda (mus)
        (if (or (eq? 'NoteEvent (ly:music-property mus 'name))
                (eq? 'EventChord (ly:music-property mus 'name)))
            (let ((art (ly:music-property mus 'articulations '())))
              (ly:music-set-property!
               mus
               'articulations
               (cons
                (make-music
                 'TremoloEvent
                 'tremolo-type number)
                art))))
        mus)
      music))
  \addTremolos 16 { b' r a' <e' g'> }
%%%%

-- Aaron Hill

Thank you guys so much. This makes things so much easier on the eyes in input files for those high-density tremolo scores! Much appreciated!

reply via email to

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