Re: variable and tie

2018-05-09 Thread David Kastrup
Gianmaria Lari  writes:

> On 9 May 2018 at 10:45, David Kastrup  wrote:
>
>> Gianmaria Lari  writes:
>>
>> > On 13 April 2018 at 09:13, David Kastrup  wrote:
>> >
>> >> Gianmaria Lari  writes:
>> >> >
>> >> > At the moment I do this
>> >> >
>> >> > \version "2.19.81"
>> >> > var = {a b \tag #'lastnote a}
>> >> > {\removeWithTag #'lastnote \var a ~ a}
>> >> >
>> >> > but I would like to know if there are other solution (maybe better?).
>> >>
>> >> 2.21.0 (current master) ac"cepts it as-is.
>> >>
>> >> --
>> >> David Kastrup
>> >>
>> >
>> > What about this David:
>> >
>> > \version "2.19.81"
>> > var = {a b c d}
>> > {\var( \var )}
>> >
>> >
>> > Will it work in the future?

[image equivalent to { a b c d( a b c d) }

>> Probably not what you had in mind.  ( and ) are not treated differently:
>> they are attached to the last note of a preceding phrase, similarly any
>> other post-event.  But you could probably write
>>
>> {<>( \var \var )}
>>
>> instead to get what I presume to be the desired effect.

[which would be equivalent to { a( b c d a b c d) }]

> hihi :)
>
> This is exactly what I wanted. But I don't understand why your code works
> and mine doesn't.
> Isn't "var" a phrase and 'd' the last note of the that phrase?

This sounds like a misunderstanding.  At least it does not make sense to
me.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: variable and tie

2018-05-09 Thread Gianmaria Lari
On 9 May 2018 at 10:45, David Kastrup  wrote:

> Gianmaria Lari  writes:
>
> > On 13 April 2018 at 09:13, David Kastrup  wrote:
> >
> >> Gianmaria Lari  writes:
> >> >
> >> > At the moment I do this
> >> >
> >> > \version "2.19.81"
> >> > var = {a b \tag #'lastnote a}
> >> > {\removeWithTag #'lastnote \var a ~ a}
> >> >
> >> > but I would like to know if there are other solution (maybe better?).
> >>
> >> 2.21.0 (current master) ac"cepts it as-is.
> >>
> >> --
> >> David Kastrup
> >>
> >
> > What about this David:
> >
> > \version "2.19.81"
> > var = {a b c d}
> > {\var( \var )}
> >
> >
> > Will it work in the future?
>
>
>
> Probably not what you had in mind.  ( and ) are not treated differently:
> they are attached to the last note of a preceding phrase, similarly any
> other post-event.  But you could probably write
>
> {<>( \var \var )}
>
> instead to get what I presume to be the desired effect.
>

hihi :)

This is exactly what I wanted. But I don't understand why your code works
and mine doesn't.
Isn't "var" a phrase and 'd' the last note of the that phrase?
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: variable and tie

2018-05-09 Thread David Kastrup
Gianmaria Lari  writes:

> On 13 April 2018 at 09:13, David Kastrup  wrote:
>
>> Gianmaria Lari  writes:
>> >
>> > At the moment I do this
>> >
>> > \version "2.19.81"
>> > var = {a b \tag #'lastnote a}
>> > {\removeWithTag #'lastnote \var a ~ a}
>> >
>> > but I would like to know if there are other solution (maybe better?).
>>
>> 2.21.0 (current master) accepts it as-is.
>>
>> --
>> David Kastrup
>>
>
> What about this David:
>
> \version "2.19.81"
> var = {a b c d}
> {\var( \var )}
>
>
> Will it work in the future?


Probably not what you had in mind.  ( and ) are not treated differently:
they are attached to the last note of a preceding phrase, similarly any
other post-event.  But you could probably write

{<>( \var \var )}

instead to get what I presume to be the desired effect.

-- 
David Kastrup
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: variable and tie

2018-05-09 Thread Gianmaria Lari
On 13 April 2018 at 09:13, David Kastrup  wrote:

> Gianmaria Lari  writes:
>
> > I would like to tie the last note contained in a variable like this
> >
> > \version "2.19.81"
> > var = {a b a}
> > {\var ~ a}
> >
> > but this generates an error. This is just a simple example, the reason
> why
> > I would like to do this is because the variable in the real piece is used
> > many times without the tie except in one case where it has to be tied.
> >
> > At the moment I do this
> >
> > \version "2.19.81"
> > var = {a b \tag #'lastnote a}
> > {\removeWithTag #'lastnote \var a ~ a}
> >
> > but I would like to know if there are other solution (maybe better?).
>
> 2.21.0 (current master) accepts it as-is.
>
> --
> David Kastrup
>

What about this David:

\version "2.19.81"
var = {a b c d}
{\var( \var )}


Will it work in the future?
Thank you, g.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: variable and tie

2018-04-13 Thread Gianmaria Lari
Oh! I will wait for it :)

Thank you David!

On 13 April 2018 at 09:13, David Kastrup  wrote:

> Gianmaria Lari  writes:
>
> > I would like to tie the last note contained in a variable like this
> >
> > \version "2.19.81"
> > var = {a b a}
> > {\var ~ a}
> >
> > but this generates an error. This is just a simple example, the reason
> why
> > I would like to do this is because the variable in the real piece is used
> > many times without the tie except in one case where it has to be tied.
> >
> > At the moment I do this
> >
> > \version "2.19.81"
> > var = {a b \tag #'lastnote a}
> > {\removeWithTag #'lastnote \var a ~ a}
> >
> > but I would like to know if there are other solution (maybe better?).
>
> 2.21.0 (current master) accepts it as-is.
>
> --
> David Kastrup
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: variable and tie

2018-04-13 Thread David Kastrup
Gianmaria Lari  writes:

> I would like to tie the last note contained in a variable like this
>
> \version "2.19.81"
> var = {a b a}
> {\var ~ a}
>
> but this generates an error. This is just a simple example, the reason why
> I would like to do this is because the variable in the real piece is used
> many times without the tie except in one case where it has to be tied.
>
> At the moment I do this
>
> \version "2.19.81"
> var = {a b \tag #'lastnote a}
> {\removeWithTag #'lastnote \var a ~ a}
>
> but I would like to know if there are other solution (maybe better?).

2.21.0 (current master) accepts it as-is.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user