[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: glissando and how to create concise code
From: |
Thomas Morley |
Subject: |
Re: glissando and how to create concise code |
Date: |
Sat, 6 Oct 2012 03:22:02 +0200 |
2012/10/6 Brad Smith <address@hidden>:
>> your first variable `notea' is coded with ly:music? it should be ly:pitch?
>> Furthermore I think it's useful to have the possibility to adjust the
>> duration of `notea', so I added a new variable `dur' with predicate
>> ly:duration?
>> I hope someone with more english-language-skills could give you more
>> detailed explanations.
>>
>> HTH,
>> Harm
>
>
> Thank you very much. Changing it to ly:pitch takes care of it. I had
> been going by the examples at
> http://lilypond.org/doc/v2.16/Documentation/notation/substitution-function-examples
> and the only one there that had a note used ly:music. When should you
> use ly:pitch and when should you use ly:music? (Is there a place in
> the documentation that is good for learning these things?)
>
> -- Brad Smith
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
Hi Brad,
me again.
The function could be simplified to
\version "2.16.0"
\include "english.ly"
glissin =
#(define-music-function
(parser location notea)
(ly:music?) %!!!!!!
#{
\hideNotes #(make-music 'GlissandoEvent) \grace $notea \unHideNotes
#})
tune = {
c4 d e f |
g \hideNotes \grace \displayMusic { f \glissando } \unHideNotes c' b a |
c4 d e f |
g \glissin f8 c'4 b a |
}
\score {
\new Staff {
\clef "treble_8"
\time 4/4
\tune
}
}
I don't trust my english to give you detailed explanations. Sorry.
But have a look at the output of \displayMusic.
You'll find more definition-stuff in
http://lilypond.org/doc/v2.16/Documentation/snippets-big-page#index
Cheers,
Harm