|
From: | Graham Percival |
Subject: | Re: Glissando fall/rises with no termination |
Date: | Thu, 1 Jun 2006 20:53:39 -0700 |
On 1-Jun-06, at 8:12 PM, Benedict Singer wrote:
glissFall = #(define-music-function (parser location note) (ly:music?)#{ $note \once \override NoteHead #'transparent = ##t \once \override Stem #'transparent = ##t \relative c { f,8 } #})varVI = \relative c' { \override Glissando #'style = #'zigzag \glissFall f,4*1/2\glissando r2 }I'm looking for tips from the Scheme/LilyPond pros to make this a bit better.
1) If you always want zigzag gliss, I would move that line (with a \once) inside the glissFall function. 2) Only have one command per line inside the music function. This is good advice for lilypond in general, but particularly inside music functions!
In particular, the ending note is currently hard-coded, so the gliss down from the F is much shorter than the one down from the C. Is there a way to use the note that \glissFall takes as input and modify it to construct the invisible note somehow?
Yes, but I don't know how to do it offhand. See 11.3 Building complicated functions for tips. The basic idea is to use scheme to take the initial note, subtract 9 semitones (or whatever you want), and create a new (invisible) note.
Cheers, - Graham
[Prev in Thread] | Current Thread | [Next in Thread] |