lilypond-user
[Top][All Lists]
Advanced

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

Re: Default a sequence of notes to show flageolet


From: Jonathan Kulp
Subject: Re: Default a sequence of notes to show flageolet
Date: Thu, 01 Jan 2009 21:07:00 -0600
User-agent: Thunderbird 2.0.0.18 (X11/20081125)

Nick Payne wrote:
I have about ten bars where every note is a harmonic, which I wish to
indicate with a flageolet above each notehead. Is there a way to change the
default for these ten bars so that I don't have to put ^\flageolet after
every note? The list of note head styles doesn't seem to include a way to do
this.

Nick Payne

I found a snippet in Lilypond Tips & Tricks called "add-staccato.ly" where it showed how to do this with staccato notes using a bit of scheme, and I modified it to put flageolet instead of staccato. Works great! Code below

Jon

--
Jonathan Kulp
http://www.jonathankulp.com

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\version "2.12.0"

#(define (make-script x)
   (make-music 'ArticulationEvent
               'articulation-type x))

#(define (add-script m x)
   (if
     (equal? (ly:music-property m 'name) 'EventChord)
     (set! (ly:music-property m 'elements)
           (cons (make-script x)
                 (ly:music-property m 'elements))))
   m)

#(define (add-flageolet m)
   (add-script m "flageolet"))

addFlag =
#(define-music-function (parser location music)
                                        (ly:music?)
                (music-map add-flageolet music))        


\relative c' {
  c d e d
  \addFlag { c d e f }
}




reply via email to

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