lilypond-user
[Top][All Lists]
Advanced

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

Re: breaking chords with \autochange


From: Urs Liska
Subject: Re: breaking chords with \autochange
Date: Fri, 18 Dec 2015 11:05:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0


Am 18.12.2015 um 00:51 schrieb Gilberto Agostinho:
> Hi all,
>
> I created a simple function which helps handle chords when using
> \autochange, but although the function works great I get some warning
> messages. This is the code:
>
> \version "2.19.32"
>
> autochord = #(define-music-function
>      (parser location chordDown chordUp)
>      (ly:music? ly:music?)
>       #{
>         <<
>           {
>             \oneVoice \change Staff = "down" $chordDown 
>           }
>           \\
>           {
>             \oneVoice \change Staff = "up" $chordUp 
>           }
>         >>
>       #}
>      )
>
> \autochange {
>   c c 
>   \autochord   <d' f'>
>   c 
>   c'' c''
>   \autochord   <d' f'>
>   c''
> }
>
> It outputs 4 warning messages, two for each chord, like this one: warning:
> cannot find context to switch to \autochord   <d' f'>
>
> Am I doing something wrong here?

Yes.

Before discussing the warnings we should make clear what you actually
want to do.
Your function expects two arguments but your example code suggests you
give only one.
As it is the function reads <d' f'> as chordDown and "c" as chordUp -
and actually this is what the printed output looks like.

So what do you actually want?

Urs

>
> Cheers,
> Gilberto
>
>
>
> --
> View this message in context: 
> http://lilypond.1069038.n5.nabble.com/breaking-chords-with-autochange-tp184833.html
> Sent from the User mailing list archive at Nabble.com.
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user




reply via email to

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