lilypond-user
[Top][All Lists]
Advanced

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

Re: Glissando function


From: Thomas Morley
Subject: Re: Glissando function
Date: Fri, 21 Mar 2014 02:43:17 +0100

2014-03-20 13:41 GMT+01:00 David Kastrup <address@hidden>:
> Benjamin Fluehr <address@hidden> writes:
>
>>> The examples in the manual don't really require Scheme knowledge.
>>
>> Mostly true, but my lack of Scheme knowledge prevents me from fully
>> understanding the error messages when things go wrong. Here is my attempt:
>>
>> \version  "2.18.0"
>>
>> crossGlissando =
>> #(define-music-function
>>   (parser location noteA noteB)
>>   (ly:music? ly:music?)
>>   #{
>>     #noteA \glissando
>>     \change Staff = "up"
>>     #noteB
>>     \change Staff = "down"
>>   #})
>>
>> \score {
>>   \new StaffGroup <<
>>     \new Staff = up
>>     \new Staff = down {
>>       \new Voice {
>>         \crossGlissando c' d'
>>       }
>>     }
>>   >>
>> }
>>
>> And the associated errors:
>> error: syntax error, unexpected EVENT_IDENTIFIER
>> #noteA
>> \glissando
>
> That's actually a different problem: you cannot attach articulations to
> music events in variables.  You can probably futz around this a bit by
> using things like
>
> < $NoteA >\glissando
>
> but of course that only works when NoteA is just a single note.  It is
> true that one can work around some of that by reverting to actual Scheme
> programming.
>
> --
> David Kastrup

Any problem with:
    <>\glissando
    #noteA
?

Seems to work, with chords, too.

Cheers,
  Harm



reply via email to

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