Re: Understanding how \tag works in \relative pitched music

2017-09-09 Thread David Kastrup
David Wright  writes:

[...]

>> >> Now make-relative is a convenient but quite heavy-handed macro.
>> >> There are situations where it fails, and then it does so
>> >> spectacularly.
>> >> 
>> >> The reason is that it allows creating a more natural "user
>> >> experience" by a totally unnatural and complex actual inner
>> >> operation that has to be defined individually for each music
>> >> function written by the programmer.
>> >
>> > Hey, programming's hard. Glad I'm retired.
>> 
>> It's not that programming is hard but that the concept of \relative
>> does not map well to music functions or other forms of rearranging
>> input since the user expectation with regard to \relative is focused
>> on input order rather than music expression internal order.
>> 
>> In fact, the mess \relative creates was such that issue 2240
>> (changing the music expression internals, various followup issues)
>> was necessary for fixing chord repetition in \relative mode, in order
>> to have issue 2263 for fixing the long-standing issue 1110.
>> 
>> Issue 2240 and all of the followup work took several months of work,
>> and \relative has intervened for additional work several times.  The
>> "Hey, programming is hard.  Glad I'm retired." attitude coupled with
>> the expectation that some sucker is going to do it because you won't
>> is actually pretty offensive considering on how little money I had
>> and have to get by for making such actually inherent problems mostly
>> go away.  What kind of retirement entitles you to have me and other
>> programmers make LilyPond work according to your expectations?
>
> I honestly hadn't realised that, when considering the design and
> documentation of a language construction, one should take into
> consideration the finances of a person who has decided to implement
> it.

[...]

> Now I'm retired, I'm happy to be a user of other people's software,
> and the programming I do is limited pretty much to scripting in bash
> and python on linux, for convenience rather than necessity. The
> pressure's off for me; what's wrong with that? I don't see why you
> should try to make me feel any shame in being retired.

You could stop the gloating.  I don't think you would like to get by
with the kind of payment I get for my programming, so expressing your
opinion that it's time for others to do the programming because you made
enough doing so to be able to retire is not exactly enjoyable to hear.

>> We have warnings in the manual exactly because users in general find
>> the interaction of \relative and the \tag-related commands
>> surprising.  If you lecture users on the same questions year after
>> year after, at some point you ask yourself where the point in being
>> right is when it is so much trouble.
>
> So much trouble for whom?

For the ones having to hand out the same information time and again.

>> So what do you think
>> 
>> \fixed a'' { c d e f g a b c' }
>> 
>> should map to?
>
> Could, not should.
>
> \absolute { c'' d''' e''' f''' g''' a'' b'' c''' }

Where does the discontinuity between c'' and d''' come from?  You
probably mean

\absolute { c''' d''' e''' f''' g''' a'' b'' c }

>> Maybe
>> 
>> \absolute { c' d' e' f' g' a'' b'' c'' }
>> 
>> ?  So as the argument to \fixed rises, the result gets lower until the
>> octave jumps and then it gets higher?  That's sort-of discontinuous.
>> The continuous result would be
>> 
>> \absolute { c'' d'' e''' f''' g''' a''' b''' c''' }
>> 
>> but you can't really make anybody cheer for that as a user interface
>> even though it would be logical.  So you are likely rooting for the
>> discontinuous approach.

I have no idea actually how either proposal of mine is supposed to make
any sense, so it seems like a concept rather hard to get right.  But
then neither does yours.

> Under a definition I described earlier, \fixed a'' { c d e f g a b c' }
> wouldn't be an octave scale, because the point in a written scale
> where a prime or comma needs to added or removed would be the
> transition between g-a, not b-c. So a scale on c'' would be written
>
> \fixed a'' { c d e f g a' b' c' }

That would be a scale on c''' since it would contain a''' .  See how
_confusing_ this scheme is?

You haven't managed to get a single example consistent/right, and
neither have I on first try.

That's what makes it a bad idea.

> (I've added the x here in case anyone were to read this paragraph later,
> in isolation from the above discussion.)
>
> \fixedx c'' { f, g, a, b, c   d   e   f   g   a   b   c'   d'   e'   f' }
> \absolute {   f' g' a' b' c'' d'' e'' f'' g'' a'' b'' c''' d''' e''' f''' }
>   ↑
>
> \fixedx a' { b, c, d, e, f, g, a  b  c   d   e   f   g   a'  b'  c'   d' }
> \absolute {  b  c' d' e' f' g' a' b' c'' d'' e'' f'' g'' a'' b'' c''' d''' }
>↑
>
> \fixedx fis' { b, c, d, e, f  g  a  b  c   d   e   f'  g'  a'  b'  c'   d' }
> \absolute {b  c' d' e' f' g' 

Re: Understanding how \tag works in \relative pitched music

2017-09-09 Thread David Wright
On Mon 07 Aug 2017 at 22:33:12 (+0200), David Kastrup wrote:
> David Wright  writes:
> 
> > Neither do I. But the post I was commenting on was constructing an
> > Aunt Sally argument, "the unpredictability of \relative with \tag"
> > as a reason to make the change.
> 
> Maybe "unpredictability" was not the best expression.  It's clear that
> Kieren was referring not to non-deterministic but surprising behavior.
> 
> The truth is that \relative does not interact with \tag at all.  But
> that means that you get different results for
> 
> \relative \keepWithTag ...
> 
> and
> 
> \keepWithTag ... \relative
> 
> because then \relative gets to work with different material.

Whether that's a useful distinction, I wouldn't know. I can
see the point of having \tags mixed in with \relative sections
as in the OP's example. I can't see the point in mixing
\relative with \score and \staff constructions, particularly
when they contain commands such as \keepWithTag, except as
an exercise in regression testing or, possibly, obfuscation.

But in any case, if someone is surprised by the behaviour of a
particular construction, one that they are determined to use, then it
behoves them to find out in more depth how it behaves and/or examine
their expectations and whether they are justified.

The flexibility of LP's syntax certainly allows one to obscure
what the final interpretation will be. But it's hardly unique
in that respect.

> > Well, that's what I tried to do by removing the parts of the code
> > that had no bearing on \relative's behaviour but (a) were obscuring
> > the simple relation of the note pitches being input and (b) were
> > believed erroneously by the OP to have some influence on the pitches
> > of those notes.
> 
> At some point of time we have to acknowledge that people and humans are
> wired differently.  The difference might not be all that large when
> looking at me but then you would likely not want to reduce composers to
> that kind of crop.  So it's important to be able to cater to people with
> differing capability of in-depth understanding of mathematical and/or
> programming logic.
> 
> >> So he has
> >> all the necessary information for considering and/or trying and/or
> >> rejecting such a switch.
> >
> > Oh come on. There are contributors here whose words carry far more
> > weight than many of us, and with good reason. Their posts get pasted
> > into archives and consulted later, so their accuracy is all the more
> > important.
> 
> "Accuracy" is not the same as "agrees with David", actually for any
> value of David.

I'm not sure why you focus on "David"s.

> >> \fixed is also pretty good at minimizing fly-shit.  It becomes worse
> >> in that regard for stuff with widely navigated ranges,
> >
> > Agreed. And I was just expressing how it might have been better,
> > in my opinion. As it is, I gain nothing over \relative so I
> > haven't used it.
> 
> That's fine, and you are free to express this opinion just as Kieren is
> free to express his.

Thank you.

> And you have harped over it a lot longer than he
> has.

Both of us are good at splitting a paragraph and commenting on each
part, just as I've done here.

> > But I'm not trying to dissuade anyone from using \absolute and, now,
> > \fixed. In fact, I was contradicted when I expressed an opinion that
> > it would be difficult to _compose_ directly into anything other than
> > \absolute because of all the cutting and pasting involved.
> 
> It's a contrarian list and it doesn't help that I am an active
> participant.

Evidently.

> >> >> It doesn't do that impressively when communicating with other
> >> >> programs, so its main incentive is communication with humans.
> >> >> When humans are confused about what it does, it fails on one of
> >> >> the core tenets of its justification.
> >> >
> >> > That argument fails because not all humans are the same.
> 
> All humans are the same as themselves, and most LilyPond users are
> themselves the most relevant human reader of the LilyPond source they
> write.
> 
> Of course humans are capable of learning to navigate any amount of
> complexity with enough determination, like they can learn to play bad
> instruments well.  But if you find in the long run that fighting your
> instrument is becoming a major drain of your focus and thus is taking
> resources better invested elsewhere, improving or changing your
> instrument might be smarter than trying to become smarter.

I can't see a connection between this and the decision whether to
employ \relative, \fixed or \absolute to define some notes in LP.

> > I didn't say that. I said that you haven't shown it fails on one of
> > the core tenets of its justification merely because some humans have
> > difficulty learning/understanding/retaining the concept.
> 
> It fails for them.  Whether fixing that makes sense is up to them.
> 
> >> Now make-relative is a convenient but quite heavy-handed macro.
> >> There are 

Re: Understanding how \tag works in \relative pitched music

2017-08-07 Thread David Kastrup
David Wright  writes:

> Neither do I. But the post I was commenting on was constructing an
> Aunt Sally argument, "the unpredictability of \relative with \tag"
> as a reason to make the change.

Maybe "unpredictability" was not the best expression.  It's clear that
Kieren was referring not to non-deterministic but surprising behavior.

The truth is that \relative does not interact with \tag at all.  But
that means that you get different results for

\relative \keepWithTag ...

and

\keepWithTag ... \relative

because then \relative gets to work with different material.

> Well, that's what I tried to do by removing the parts of the code
> that had no bearing on \relative's behaviour but (a) were obscuring
> the simple relation of the note pitches being input and (b) were
> believed erroneously by the OP to have some influence on the pitches
> of those notes.

At some point of time we have to acknowledge that people and humans are
wired differently.  The difference might not be all that large when
looking at me but then you would likely not want to reduce composers to
that kind of crop.  So it's important to be able to cater to people with
differing capability of in-depth understanding of mathematical and/or
programming logic.

>> So he has
>> all the necessary information for considering and/or trying and/or
>> rejecting such a switch.
>
> Oh come on. There are contributors here whose words carry far more
> weight than many of us, and with good reason. Their posts get pasted
> into archives and consulted later, so their accuracy is all the more
> important.

"Accuracy" is not the same as "agrees with David", actually for any
value of David.

>> \fixed is also pretty good at minimizing fly-shit.  It becomes worse
>> in that regard for stuff with widely navigated ranges,
>
> Agreed. And I was just expressing how it might have been better,
> in my opinion. As it is, I gain nothing over \relative so I
> haven't used it.

That's fine, and you are free to express this opinion just as Kieren is
free to express his.  And you have harped over it a lot longer than he
has.

> But I'm not trying to dissuade anyone from using \absolute and, now,
> \fixed. In fact, I was contradicted when I expressed an opinion that
> it would be difficult to _compose_ directly into anything other than
> \absolute because of all the cutting and pasting involved.

It's a contrarian list and it doesn't help that I am an active
participant.

>> >> It doesn't do that impressively when communicating with other
>> >> programs, so its main incentive is communication with humans.
>> >> When humans are confused about what it does, it fails on one of
>> >> the core tenets of its justification.
>> >
>> > That argument fails because not all humans are the same.

All humans are the same as themselves, and most LilyPond users are
themselves the most relevant human reader of the LilyPond source they
write.

Of course humans are capable of learning to navigate any amount of
complexity with enough determination, like they can learn to play bad
instruments well.  But if you find in the long run that fighting your
instrument is becoming a major drain of your focus and thus is taking
resources better invested elsewhere, improving or changing your
instrument might be smarter than trying to become smarter.

> I didn't say that. I said that you haven't shown it fails on one of
> the core tenets of its justification merely because some humans have
> difficulty learning/understanding/retaining the concept.

It fails for them.  Whether fixing that makes sense is up to them.

>> Now make-relative is a convenient but quite heavy-handed macro.
>> There are situations where it fails, and then it does so
>> spectacularly.
>> 
>> The reason is that it allows creating a more natural "user
>> experience" by a totally unnatural and complex actual inner operation
>> that has to be defined individually for each music function written
>> by the programmer.
>
> Hey, programming's hard. Glad I'm retired.

It's not that programming is hard but that the concept of \relative does
not map well to music functions or other forms of rearranging input
since the user expectation with regard to \relative is focused on input
order rather than music expression internal order.

In fact, the mess \relative creates was such that issue 2240 (changing
the music expression internals, various followup issues) was necessary
for fixing chord repetition in \relative mode, in order to have issue
2263 for fixing the long-standing issue 1110.

Issue 2240 and all of the followup work took several months of work, and
\relative has intervened for additional work several times.  The "Hey,
programming is hard.  Glad I'm retired." attitude coupled with the
expectation that some sucker is going to do it because you won't is
actually pretty offensive considering on how little money I had and have
to get by for making such actually inherent problems mostly go away.
What 

Re: Understanding how \tag works in \relative pitched music

2017-08-07 Thread David Wright
On Mon 07 Aug 2017 at 08:43:31 (+0200), David Kastrup wrote:
> David Wright  writes:
> 
> > On Sun 06 Aug 2017 at 22:51:57 (+0200), David Kastrup wrote:
> >> David Wright  writes:
> >> 
> >> > (\fixed could have been implemented differently, ie without
> >> > collapsing the meaning of c' through b' as its first argument.
> >> > This might make it more useful for parts having a limited range
> >> > centered close to c.)
> >> 
> >> How so?  The reason we collapsed the meaning is that we had several
> >> different opinions of what the natural behavior of \fixed f' should be
> >> "obviously", so we punted by choosing behavior that did not provide
> >> (possibly shortlived) usefulness for anything rather than c'''.
> >
> > As an example, some hymn tunes have alto parts of very limited range,
> > barely a few notes. However, those notes frequently lie around middle C
> > which means that both \fixed c and \fixed c' will have many octavation
> > marks, either "'" or ",". However, were \fixed g { … } to mean that
> > unmarked notes lie in the absolute range g through f', the number of
> > marks required would be drastically reduced, which is how I was measuring
> > usefulness. (I have no idea whether this methodology was one of the
> > "obvious natural behaviours" that were considered and passed over.)
> 
> So what does \fixed fes' do to { disis e eis feses fes f } ?  What is
> its natural interpretation?

Were I to be deciding that, I would cut and paste this paragraph from
the LM and adjust the wording:
"Exactly the same happens even when any of these notes are sharpened or 
flattened. Acci-
dentals are totally ignored in the calculation of relative position. Precisely 
the same staff space
counting is done from a note at any other position on the staff."

So it would use the unmodified note names just as \relative and the
current implementation of \fixed do. As things are, \fixed effectively
throws away the note name of the reference pitch as well as
accidentals. The syntax could have been \fixed , { … } \fixed { … } \fixed ' { 
… }
with a "c" merely implied, because all it does is add the requisite
amount of poop and cancel out any contradictions.

> >> > Anyway, would the people who like \absolute please be a little less
> >> > evangelical about it.
> >> 
> >> Uh, where is the point?  This is a discussion group.
> >
> > Yes, but there seem to be occasional postings where the opinions come
> > across as attempts at conversion rather than mere discussion.
> 
> So?  When people have problems with a particular construct that is
> working as designed (we are not talking about shortcomings in the
> implementation here) and alternative designs have proven better for
> them, I see nothing wrong with reporting this.

Neither do I. But the post I was commenting on was constructing an
Aunt Sally argument, "the unpredictability of \relative with \tag"
as a reason to make the change.

> It is true that there is a whole lot of repetition going on in this
> mailng list that may be tiring to seasoned readers but may be due to the
> same question coming up again and again and people not resolving it by
> exhaustively searching the archives.  But that's also in the nature of a
> list.

Guilty as charged.

> > I didn't want to be specific, but perhaps it's necessary for you—eg,
> > "There are many, many other reasons I'm glad I switched to absolute
> > (and \fixed), but this was a main one. You might consider doing the
> > same?"
> 
> "you might consider" and "you should" are two different things, and it's
> not like the list did not leave the questioner also with a fine-grained
> explanation of what happens exactly when you use \relative.

Well, that's what I tried to do by removing the parts of the code
that had no bearing on \relative's behaviour but (a) were obscuring
the simple relation of the note pitches being input and (b) were
believed erroneously by the OP to have some influence on the pitches
of those notes.

> So he has
> all the necessary information for considering and/or trying and/or
> rejecting such a switch.

Oh come on. There are contributors here whose words carry far more
weight than many of us, and with good reason. Their posts get pasted
into archives and consulted later, so their accuracy is all the more
important.

> >> > Some of us are happy using \relative, and understand how it
> >> > interacts (or, more usually, doesn't) with other constructions in
> >> > LP. It's odd that one of your main reasons for abandoning \relative
> >> > was merely a misunderstanding of what it does, but I think that
> >> > that could partly be blamed on its documentation. \relative's
> >> > treatment of accidentals merits bold typeface in the LM; perhaps
> >> > its existence as an immediate _input_ method could be similarly
> >> > emphasised where appropriate.
> >> 
> >> \relative is a tool for expressing input.  As such, it should offer
> >> significant clarity with 

Re: Understanding how \tag works in \relative pitched music

2017-08-07 Thread David Kastrup
David Wright  writes:

> On Sun 06 Aug 2017 at 22:51:57 (+0200), David Kastrup wrote:
>> David Wright  writes:
>> 
>> > (\fixed could have been implemented differently, ie without
>> > collapsing the meaning of c' through b' as its first argument.
>> > This might make it more useful for parts having a limited range
>> > centered close to c.)
>> 
>> How so?  The reason we collapsed the meaning is that we had several
>> different opinions of what the natural behavior of \fixed f' should be
>> "obviously", so we punted by choosing behavior that did not provide
>> (possibly shortlived) usefulness for anything rather than c'''.
>
> As an example, some hymn tunes have alto parts of very limited range,
> barely a few notes. However, those notes frequently lie around middle C
> which means that both \fixed c and \fixed c' will have many octavation
> marks, either "'" or ",". However, were \fixed g { … } to mean that
> unmarked notes lie in the absolute range g through f', the number of
> marks required would be drastically reduced, which is how I was measuring
> usefulness. (I have no idea whether this methodology was one of the
> "obvious natural behaviours" that were considered and passed over.)

So what does \fixed fes' do to { disis e eis feses fes f } ?  What is
its natural interpretation?

>> > Anyway, would the people who like \absolute please be a little less
>> > evangelical about it.
>> 
>> Uh, where is the point?  This is a discussion group.
>
> Yes, but there seem to be occasional postings where the opinions come
> across as attempts at conversion rather than mere discussion.

So?  When people have problems with a particular construct that is
working as designed (we are not talking about shortcomings in the
implementation here) and alternative designs have proven better for
them, I see nothing wrong with reporting this.

It is true that there is a whole lot of repetition going on in this
mailng list that may be tiring to seasoned readers but may be due to the
same question coming up again and again and people not resolving it by
exhaustively searching the archives.  But that's also in the nature of a
list.

> I didn't want to be specific, but perhaps it's necessary for you—eg,
> "There are many, many other reasons I'm glad I switched to absolute
> (and \fixed), but this was a main one. You might consider doing the
> same?"

"you might consider" and "you should" are two different things, and it's
not like the list did not leave the questioner also with a fine-grained
explanation of what happens exactly when you use \relative.  So he has
all the necessary information for considering and/or trying and/or
rejecting such a switch.

>> > Some of us are happy using \relative, and understand how it
>> > interacts (or, more usually, doesn't) with other constructions in
>> > LP. It's odd that one of your main reasons for abandoning \relative
>> > was merely a misunderstanding of what it does, but I think that
>> > that could partly be blamed on its documentation. \relative's
>> > treatment of accidentals merits bold typeface in the LM; perhaps
>> > its existence as an immediate _input_ method could be similarly
>> > emphasised where appropriate.
>> 
>> \relative is a tool for expressing input.  As such, it should offer
>> significant clarity with regard to one aspect of input.
>
> And it succeeds in at least two for me. I've already mentioned one,
> the treatment of intervals across b-c. Another is preventing LP code
> looking like fly-shit language (cf Leaning Toothpick Syndrome).

\fixed is also pretty good at minimizing fly-shit.  It becomes worse in
that regard for stuff with widely navigated ranges, but that's exactly
where \relative becomes markedly harder to write and read correctly.

>> It doesn't do that impressively when communicating with other
>> programs, so its main incentive is communication with humans.  When
>> humans are confused about what it does, it fails on one of the core
>> tenets of its justification.
>
> That argument fails because not all humans are the same. The humans
> that are confused are those that don't seem to learn/understand/
> retain your sentence "\relative is a tool for expressing input."

Well, we can't tell them to drop dead, can we?  So both telling them
what \relative does and what alternatives are there seems like a
reasonable approach to me.

>> So its advantages are not without drawbacks, and people weighing in
>> on how those affect them respectively are making for a clearer
>> picture.
>
> I'd be interested to know whether you agree with "the unpredictability
> of \relative with \tag". I don't see it (as I expressed earlier), but
> would value your opinion as you've probably forgotten more about LP
> than I ever knew.

For me it's not "unpredictable" as I'm rather acquainted with its
internals and mechanism.  But that doesn't mean that I don't find it
"getting in the way" of usefully expressing things.

I 

Re: Understanding how \tag works in \relative pitched music

2017-08-06 Thread David Wright
On Sun 06 Aug 2017 at 22:51:57 (+0200), David Kastrup wrote:
> David Wright  writes:
> 
> > (\fixed could have been implemented differently, ie without
> > collapsing the meaning of c' through b' as its first argument.
> > This might make it more useful for parts having a limited range
> > centered close to c.)
> 
> How so?  The reason we collapsed the meaning is that we had several
> different opinions of what the natural behavior of \fixed f' should be
> "obviously", so we punted by choosing behavior that did not provide
> (possibly shortlived) usefulness for anything rather than c'''.

As an example, some hymn tunes have alto parts of very limited range,
barely a few notes. However, those notes frequently lie around middle C
which means that both \fixed c and \fixed c' will have many octavation
marks, either "'" or ",". However, were \fixed g { … } to mean that
unmarked notes lie in the absolute range g through f', the number of
marks required would be drastically reduced, which is how I was measuring
usefulness. (I have no idea whether this methodology was one of the
"obvious natural behaviours" that were considered and passed over.)

> > Anyway, would the people who like \absolute please be a little less
> > evangelical about it.
> 
> Uh, where is the point?  This is a discussion group.

Yes, but there seem to be occasional postings where the opinions
come across as attempts at conversion rather than mere discussion. I
didn't want to be specific, but perhaps it's necessary for you—eg,
"There are many, many other reasons I'm glad I switched to absolute
(and \fixed), but this was a main one. You might consider doing the same?"

> > Some of us are happy using \relative, and understand how it interacts
> > (or, more usually, doesn't) with other constructions in LP. It's odd
> > that one of your main reasons for abandoning \relative was merely a
> > misunderstanding of what it does, but I think that that could partly
> > be blamed on its documentation. \relative's treatment of accidentals
> > merits bold typeface in the LM; perhaps its existence as an immediate
> > _input_ method could be similarly emphasised where appropriate.
> 
> \relative is a tool for expressing input.  As such, it should offer
> significant clarity with regard to one aspect of input.

And it succeeds in at least two for me. I've already mentioned one,
the treatment of intervals across b-c. Another is preventing LP code
looking like fly-shit language (cf Leaning Toothpick Syndrome).

> It doesn't do
> that impressively when communicating with other programs, so its main
> incentive is communication with humans.  When humans are confused about
> what it does, it fails on one of the core tenets of its justification.

That argument fails because not all humans are the same. The humans
that are confused are those that don't seem to learn/understand/
retain your sentence "\relative is a tool for expressing input."

> So its advantages are not without drawbacks, and people weighing in on
> how those affect them respectively are making for a clearer picture.

I'd be interested to know whether you agree with "the unpredictability
of \relative with \tag". I don't see it (as I expressed earlier), but
would value your opinion as you've probably forgotten more about LP
than I ever knew.

Cheers,
David.

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


Re: Understanding how \tag works in \relative pitched music

2017-08-06 Thread David Kastrup
David Wright  writes:

> (\fixed could have been implemented differently, ie without
> collapsing the meaning of c' through b' as its first argument.
> This might make it more useful for parts having a limited range
> centered close to c.)

How so?  The reason we collapsed the meaning is that we had several
different opinions of what the natural behavior of \fixed f' should be
"obviously", so we punted by choosing behavior that did not provide
(possibly shortlived) usefulness for anything rather than c'''.

> Anyway, would the people who like \absolute please be a little less
> evangelical about it.

Uh, where is the point?  This is a discussion group.

> Some of us are happy using \relative, and understand how it interacts
> (or, more usually, doesn't) with other constructions in LP. It's odd
> that one of your main reasons for abandoning \relative was merely a
> misunderstanding of what it does, but I think that that could partly
> be blamed on its documentation. \relative's treatment of accidentals
> merits bold typeface in the LM; perhaps its existence as an immediate
> _input_ method could be similarly emphasised where appropriate.

\relative is a tool for expressing input.  As such, it should offer
significant clarity with regard to one aspect of input.  It doesn't do
that impressively when communicating with other programs, so its main
incentive is communication with humans.  When humans are confused about
what it does, it fails on one of the core tenets of its justification.

So its advantages are not without drawbacks, and people weighing in on
how those affect them respectively are making for a clearer picture.

-- 
David Kastrup

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


Re: Understanding how \tag works in \relative pitched music

2017-08-06 Thread David Wright
On Sat 05 Aug 2017 at 09:07:48 (-0400), Kieren MacMillan wrote:
> Hi,
> 
> > Huh, can't say I've heard of \fixed.
> 
> It may have been a relatively [ha!] recent addition…?
> See 
>  

AFAICT \fixed is not in 2.18.2 but is in 2.19 versions and their NMs.
However, its only appearance in Changes (New Features) seems to be its
use without introduction on the first page.

> > And yeah, absolute mode is a lot easier than relative. If I want to 
> > duplicate a measure, I prefer just duplicating it instead of having to 
> > adjust the octave.
> 
> Agreed. And including variables in multiple scores is immediate, etc.

Well, it doesn't surprise me that you, as a composer, are happier
using \absolute. The situation is quite different for transcribers
of melodic music. The only places where \absolute is useful to me
is with fragmentary parts, generally in the odd keyboard transriptions
or reductions forced on me. (I didn't quite understand your use
of "immediate" above.)

\fixed makes me realise why, as a singer, both \fixed and \absolute
don't fit with my way of thinking about pitch: they are both
"octave-centric". IOW they treat the pitch change from b to c' (in
all octaves) as special, whereas to me they're just two notes that
happen to be next to each other, like e and f. Whether this is also
influenced by possession of perfect pitch (which I don't have), I
don't know.

(\fixed could have been implemented differently, ie without
collapsing the meaning of c' through b' as its first argument.
This might make it more useful for parts having a limited range
centered close to c.)

Anyway, would the people who like \absolute please be a little less
evangelical about it. Some of us are happy using \relative, and
understand how it interacts (or, more usually, doesn't) with other
constructions in LP. It's odd that one of your main reasons for
abandoning \relative was merely a misunderstanding of what it
does, but I think that that could partly be blamed on its
documentation. \relative's treatment of accidentals merits bold
typeface in the LM; perhaps its existence as an immediate _input_
method could be similarly emphasised where appropriate.

Cheers,
David.

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


Re: Understanding how \tag works in \relative pitched music

2017-08-06 Thread David Kastrup
caag...@gmail.com writes:

> Huh, can't say I've heard of \fixed. I always use \transpose c c'',
> which seems to have the same effect. It looks stupid in the code,
> though.

The effect is not the same.

\transpose c c'' \absolute ...

is the same as

\transpose c c'' ...

while

\fixed c'' \absolute ...

is the same as

\transpose c c ...

since \fixed, like \relative and \absolute, does not affect music that
has already been turned into absolute in some manner.

This may be quite relevant when working with music variables.

-- 
David Kastrup

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


Re: Understanding how \tag works in \relative pitched music

2017-08-05 Thread Guy Stalnaker
My thanks to all who responded. There were three suggestions offered to 
"fix" my incorrect code and I confirm that all three produce the 
expected output.


Guy

On 8/5/2017 10:40 AM, David Wright wrote:

On Fri 04 Aug 2017 at 23:51:49 (-0500), Guy Stalnaker wrote:

So it's an Order of Operations issue.

Unfortunately, your capitalisation indicates you haven't really
understood the implications of what I wrote.


Pitches entered using \relative are
first converted to absolute then the selection using \tag conditional.

But the conversion is effectively a lexical one, and is demonstrated
by the attached which is your example in absolute notation. If the
"\absolute evangelists" were to persuade the maintainers to abolish
\relative, a text editor could be persuaded to do the job. As things
are,   $ ly "rel2abs" -o abs.ly rel.ly
does the job.


Which suggests that \tag used with \relative will never work.

They both work perfectly. The problem is that you thought you
could use \relative to do something semantic. There's a cure.
-When you use \relative, look at the pitches only, and treat the
source in strict lexical order in a single pass.
-When you are designing your \tag structure, imagine that all the
"\relative [optional-pitch]" occurrences have evaporated, leaving
behind just their { } and << >> constructs.

You know, sometimes I think it might have been wiser to go the
whole hog and treat relative/absolute/fixed in the same way
as \language is. The only thing I can see that you lose is their
ability to be nested. I wonder how many people rely on that.


On Aug 4, 2017 10:45 PM, "David Wright"  wrote:


On Fri 04 Aug 2017 at 15:41:34 (-0500), Guy Stalnaker wrote:

All,

Why is this output being created? I would expect to get exactly the same
pitches on all three staffs, but since not, my expectations are obviously
wrong.

%% SNIPPET %%
​straightMusic = \relative c' {
   a2 _\markup { no tag, relative pitch } cis4 e |
   fis1 |
}

clarinetOneMusic = \relative c' {
   \set Score.markFormatter = #format-mark-box-numbers
   \tag #'mark { \mark \default a2 _\markup { tag mark, relative pitch }
cis4 e | }
   \tag #'no-mark { a2 _\markup { tag no-mark, relative pitch } cis4 e | }
   fis1 |
}

Here are the pitches you have entered:

straightMusic = \relative c' { a2 cis4 e fis1 }

clarinetOneMusic = \relative c' { a2 cis4 e a2 cis4 e fis1 }

These pitches are interpreted during _input_ of the source and
become absolute pitches as they are read. They are now absolute
and stay that way.

You have then selected a different set of notes (each with an absolute
pitch) for each staff by using tags, and then transposed them.

In other words, \relative { … } is a one-shot, immediate input process
for making melodic input more convenient (for those of us who like it).

Bear in mind that if \relative { … } contains notes that are already
absolute, eg,
\relative { … \absolute { A } … \transpose { T } … \relative { R } … }
the outer \relative does not reprocess A, T and R because they're
already absolute. (R is processed by the inner \relative first.)
Only the "…" notes are processed by the outer \relative.

Cheers,
David.


--
“Happiness is the meaning and the purpose of life, the whole aim and end of 
human existence.”
― Aristotle

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


Re: Understanding how \tag works in \relative pitched music

2017-08-05 Thread David Wright
On Fri 04 Aug 2017 at 23:51:49 (-0500), Guy Stalnaker wrote:
> So it's an Order of Operations issue.

Unfortunately, your capitalisation indicates you haven't really
understood the implications of what I wrote.

> Pitches entered using \relative are
> first converted to absolute then the selection using \tag conditional.

But the conversion is effectively a lexical one, and is demonstrated
by the attached which is your example in absolute notation. If the
"\absolute evangelists" were to persuade the maintainers to abolish
\relative, a text editor could be persuaded to do the job. As things
are,   $ ly "rel2abs" -o abs.ly rel.ly
does the job.

> Which suggests that \tag used with \relative will never work.

They both work perfectly. The problem is that you thought you
could use \relative to do something semantic. There's a cure.
-When you use \relative, look at the pitches only, and treat the
source in strict lexical order in a single pass.
-When you are designing your \tag structure, imagine that all the
"\relative [optional-pitch]" occurrences have evaporated, leaving
behind just their { } and << >> constructs.

You know, sometimes I think it might have been wiser to go the
whole hog and treat relative/absolute/fixed in the same way
as \language is. The only thing I can see that you lose is their
ability to be nested. I wonder how many people rely on that.

> On Aug 4, 2017 10:45 PM, "David Wright"  wrote:
> 
> > On Fri 04 Aug 2017 at 15:41:34 (-0500), Guy Stalnaker wrote:
> > > All,
> > >
> > > Why is this output being created? I would expect to get exactly the same
> > > pitches on all three staffs, but since not, my expectations are obviously
> > > wrong.
> > >
> > > %% SNIPPET %%
> > > ​straightMusic = \relative c' {
> > >   a2 _\markup { no tag, relative pitch } cis4 e |
> > >   fis1 |
> > > }
> > >
> > > clarinetOneMusic = \relative c' {
> > >   \set Score.markFormatter = #format-mark-box-numbers
> > >   \tag #'mark { \mark \default a2 _\markup { tag mark, relative pitch }
> > > cis4 e | }
> > >   \tag #'no-mark { a2 _\markup { tag no-mark, relative pitch } cis4 e | }
> > >   fis1 |
> > > }
> >
> > Here are the pitches you have entered:
> >
> > straightMusic = \relative c' { a2 cis4 e fis1 }
> >
> > clarinetOneMusic = \relative c' { a2 cis4 e a2 cis4 e fis1 }
> >
> > These pitches are interpreted during _input_ of the source and
> > become absolute pitches as they are read. They are now absolute
> > and stay that way.
> >
> > You have then selected a different set of notes (each with an absolute
> > pitch) for each staff by using tags, and then transposed them.
> >
> > In other words, \relative { … } is a one-shot, immediate input process
> > for making melodic input more convenient (for those of us who like it).
> >
> > Bear in mind that if \relative { … } contains notes that are already
> > absolute, eg,
> > \relative { … \absolute { A } … \transpose { T } … \relative { R } … }
> > the outer \relative does not reprocess A, T and R because they're
> > already absolute. (R is processed by the inner \relative first.)
> > Only the "…" notes are processed by the outer \relative.

Cheers,
David.
straightMusic = {
  a2 _\markup { no tag, relative pitch } cis'4 e' |
  fis'1 |
}

clarinetOneMusic = {
  \set Score.markFormatter = #format-mark-box-numbers
  \tag #'mark { \mark \default a2 _\markup { tag mark, relative pitch }
cis'4 e' | }
  \tag #'no-mark { a'2 _\markup { tag no-mark, relative pitch } cis''4 e'' | }
  fis''1 |
}

\score {
  <<
\new Staff {
  \transpose bes c' \straightMusic
}
\new Staff {
  \keepWithTag #'mark
  \transpose bes c' \clarinetOneMusic
}
\new Staff {
  \keepWithTag #'no-mark
  \transpose bes c' \clarinetOneMusic
}
  >>
  \layout { }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Understanding how \tag works in \relative pitched music

2017-08-05 Thread Kieren MacMillan
Hi,

> Huh, can't say I've heard of \fixed.

It may have been a relatively [ha!] recent addition…?
See  

> I always use \transpose c c'', which seems to have the same effect. It looks 
> stupid in the code, though.

A quick find-and-replace should solve that.  =)

> And yeah, absolute mode is a lot easier than relative. If I want to duplicate 
> a measure, I prefer just duplicating it instead of having to adjust the 
> octave.

Agreed. And including variables in multiple scores is immediate, etc.

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Understanding how \tag works in \relative pitched music

2017-08-05 Thread caagr98
Huh, can't say I've heard of \fixed. I always use \transpose c c'', 
which seems to have the same effect. It looks stupid in the code, though.


And yeah, absolute mode is a lot easier than relative. If I want to 
duplicate a measure, I prefer just duplicating it instead of having to 
adjust the octave.


On 08/05/17 14:02, Kieren MacMillan wrote:

Hi Guy,


Which suggests that \tag used with \relative will never work.


Whether or not your conclusion is technically accurate — others will be more 
qualified to confirm or correct — the unpredictability of \relative with \tag 
(which I used to use heavily, before finding the edition-engraver) was one of 
the principal reasons I abandoned the use of \relative in all my music some 
years ago, after almost a decade of using it exclusively. There are many, many 
other reasons I'm glad I switched to absolute (and \fixed), but this was a main 
one.

You might consider doing the same? Editors like Frescobaldi make it easy to 
switch code back and forth between relative and absolute — even so, I've never 
found a reason to go back to relative once I've converted any [legacy] code to 
absolute. (On rare occasions, I'll use \fixed.). I can say with great 
confidence that a measurable chunk of my frustration with Lilypond disappeared 
along with \relative.

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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



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


Re: Understanding how \tag works in \relative pitched music

2017-08-05 Thread Kieren MacMillan
Hi Guy,

> Which suggests that \tag used with \relative will never work.

Whether or not your conclusion is technically accurate — others will be more 
qualified to confirm or correct — the unpredictability of \relative with \tag 
(which I used to use heavily, before finding the edition-engraver) was one of 
the principal reasons I abandoned the use of \relative in all my music some 
years ago, after almost a decade of using it exclusively. There are many, many 
other reasons I'm glad I switched to absolute (and \fixed), but this was a main 
one.

You might consider doing the same? Editors like Frescobaldi make it easy to 
switch code back and forth between relative and absolute — even so, I've never 
found a reason to go back to relative once I've converted any [legacy] code to 
absolute. (On rare occasions, I'll use \fixed.). I can say with great 
confidence that a measurable chunk of my frustration with Lilypond disappeared 
along with \relative.

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Understanding how \tag works in \relative pitched music

2017-08-05 Thread Thomas Morley
2017-08-05 6:51 GMT+02:00 Guy Stalnaker :
> So it's an Order of Operations issue. Pitches entered using \relative are
> first converted to absolute then the selection using \tag conditional.
>
> Which suggests that \tag used with \relative will never work.
>
> Thanks.
>
> On Aug 4, 2017 10:45 PM, "David Wright"  wrote:
>>
>> On Fri 04 Aug 2017 at 15:41:34 (-0500), Guy Stalnaker wrote:
>> > All,
>> >
>> > Why is this output being created? I would expect to get exactly the same
>> > pitches on all three staffs, but since not, my expectations are
>> > obviously
>> > wrong.
>> >
>> > %% SNIPPET %%
>> > straightMusic = \relative c' {
>> >   a2 _\markup { no tag, relative pitch } cis4 e |
>> >   fis1 |
>> > }
>> >
>> > clarinetOneMusic = \relative c' {
>> >   \set Score.markFormatter = #format-mark-box-numbers
>> >   \tag #'mark { \mark \default a2 _\markup { tag mark, relative pitch }
>> > cis4 e | }
>> >   \tag #'no-mark { a2 _\markup { tag no-mark, relative pitch } cis4 e |
>> > }
>> >   fis1 |
>> > }
>>
>> Here are the pitches you have entered:
>>
>> straightMusic = \relative c' { a2 cis4 e fis1 }
>>
>> clarinetOneMusic = \relative c' { a2 cis4 e a2 cis4 e fis1 }
>>
>> These pitches are interpreted during _input_ of the source and
>> become absolute pitches as they are read. They are now absolute
>> and stay that way.
>>
>> You have then selected a different set of notes (each with an absolute
>> pitch) for each staff by using tags, and then transposed them.
>>
>> In other words, \relative { … } is a one-shot, immediate input process
>> for making melodic input more convenient (for those of us who like it).
>>
>> Bear in mind that if \relative { … } contains notes that are already
>> absolute, eg,
>> \relative { … \absolute { A } … \transpose { T } … \relative { R } … }
>> the outer \relative does not reprocess A, T and R because they're
>> already absolute. (R is processed by the inner \relative first.)
>> Only the "…" notes are processed by the outer \relative.
>>
>> Cheers,
>> David.



In NR 3.3.2 Different editions from one source - Using Tags - Known
issues and warnings
http://lilypond.org/doc/v2.19/Documentation/notation/different-editions-from-one-source#using-tags

"Calling \relative on a music expression obtained by filtering music
through \keepWithTag or \removeWithTag might cause the octave
relations to change, as only the pitches actually remaining in the
filtered expression will be considered. Applying \relative first,
before \keepWithTag or \removeWithTag, avoids this danger as \relative
then acts on all the pitches as-input."

Following this advice leads to:

straightMusic = \relative c' {
  a2 cis4 e |
  fis1 |
}

clarinetOneMusic = \relative c' {
  \tag #'mark \relative c' { a2  cis4 e | }
  \tag #'no-mark \relative c' { a2  cis4 e | }
  fis1 |
}

\score {
  <<
\new Staff {
  \transpose bes c' \straightMusic
}
\new Staff {
  \keepWithTag #'mark
  \transpose bes c' \clarinetOneMusic
}
\new Staff {
  \keepWithTag #'no-mark
  \transpose bes c' \clarinetOneMusic
}
  >>
  \layout { }
}

Which is pretty much inline with what David W wrote.

Cheers,
  Harm

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


Re: Understanding how \tag works in \relative pitched music

2017-08-04 Thread Guy Stalnaker
So it's an Order of Operations issue. Pitches entered using \relative are
first converted to absolute then the selection using \tag conditional.

Which suggests that \tag used with \relative will never work.

Thanks.

On Aug 4, 2017 10:45 PM, "David Wright"  wrote:

> On Fri 04 Aug 2017 at 15:41:34 (-0500), Guy Stalnaker wrote:
> > All,
> >
> > Why is this output being created? I would expect to get exactly the same
> > pitches on all three staffs, but since not, my expectations are obviously
> > wrong.
> >
> > %% SNIPPET %%
> > ​straightMusic = \relative c' {
> >   a2 _\markup { no tag, relative pitch } cis4 e |
> >   fis1 |
> > }
> >
> > clarinetOneMusic = \relative c' {
> >   \set Score.markFormatter = #format-mark-box-numbers
> >   \tag #'mark { \mark \default a2 _\markup { tag mark, relative pitch }
> > cis4 e | }
> >   \tag #'no-mark { a2 _\markup { tag no-mark, relative pitch } cis4 e | }
> >   fis1 |
> > }
>
> Here are the pitches you have entered:
>
> straightMusic = \relative c' { a2 cis4 e fis1 }
>
> clarinetOneMusic = \relative c' { a2 cis4 e a2 cis4 e fis1 }
>
> These pitches are interpreted during _input_ of the source and
> become absolute pitches as they are read. They are now absolute
> and stay that way.
>
> You have then selected a different set of notes (each with an absolute
> pitch) for each staff by using tags, and then transposed them.
>
> In other words, \relative { … } is a one-shot, immediate input process
> for making melodic input more convenient (for those of us who like it).
>
> Bear in mind that if \relative { … } contains notes that are already
> absolute, eg,
> \relative { … \absolute { A } … \transpose { T } … \relative { R } … }
> the outer \relative does not reprocess A, T and R because they're
> already absolute. (R is processed by the inner \relative first.)
> Only the "…" notes are processed by the outer \relative.
>
> Cheers,
> David.
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Understanding how \tag works in \relative pitched music

2017-08-04 Thread David Wright
On Fri 04 Aug 2017 at 15:41:34 (-0500), Guy Stalnaker wrote:
> All,
> 
> Why is this output being created? I would expect to get exactly the same
> pitches on all three staffs, but since not, my expectations are obviously
> wrong.
> 
> %% SNIPPET %%
> ​straightMusic = \relative c' {
>   a2 _\markup { no tag, relative pitch } cis4 e |
>   fis1 |
> }
> 
> clarinetOneMusic = \relative c' {
>   \set Score.markFormatter = #format-mark-box-numbers
>   \tag #'mark { \mark \default a2 _\markup { tag mark, relative pitch }
> cis4 e | }
>   \tag #'no-mark { a2 _\markup { tag no-mark, relative pitch } cis4 e | }
>   fis1 |
> }

Here are the pitches you have entered:

straightMusic = \relative c' { a2 cis4 e fis1 }

clarinetOneMusic = \relative c' { a2 cis4 e a2 cis4 e fis1 }

These pitches are interpreted during _input_ of the source and
become absolute pitches as they are read. They are now absolute
and stay that way.

You have then selected a different set of notes (each with an absolute
pitch) for each staff by using tags, and then transposed them.

In other words, \relative { … } is a one-shot, immediate input process
for making melodic input more convenient (for those of us who like it).

Bear in mind that if \relative { … } contains notes that are already
absolute, eg,
\relative { … \absolute { A } … \transpose { T } … \relative { R } … }
the outer \relative does not reprocess A, T and R because they're
already absolute. (R is processed by the inner \relative first.)
Only the "…" notes are processed by the outer \relative.

Cheers,
David.

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


Re: Understanding how \tag works in \relative pitched music

2017-08-04 Thread Martin Neubauer
Maybe someone more well-versed with the inner workings of lilypond might
correct me here, but as I understand it, the pitches depend on the
sequence of notes in the input, regardless of any tags that might be
attached to some of them. Conversely, when \keepWithTag (or any of the
related commands) get evaluated, the pitches are already fixed.

On 04/08/2017 22:41, Guy Stalnaker wrote:
> All,
> 
> Why is this output being created? I would expect to get exactly the same
> pitches on all three staffs, but since not, my expectations are
> obviously wrong.
> 
> %% SNIPPET %%
> ​straightMusic = \relative c' {
>   a2 _\markup { no tag, relative pitch } cis4 e |
>   fis1 |
> }
> 
> clarinetOneMusic = \relative c' {
>   \set Score.markFormatter = #format-mark-box-numbers
>   \tag #'mark { \mark \default a2 _\markup { tag mark, relative pitch }
> cis4 e | }
>   \tag #'no-mark { a2 _\markup { tag no-mark, relative pitch } cis4 e | }
>   fis1 |
> }
Not tested, but this might achieve what you want, while being somewhat
more predictable:

clarinetOneMusic = \relative c' {
  \set Score.markFormatter = #format-mark-box-numbers
  \tag #'mark { \mark \default <> _\markup { tag mark, relative pitch }}
  \tag #'no-mark { <> _\markup { tag no-mark, relative pitch } }
  a2 cis4 e |
  fis1 |
}
> 
> \score {
>   <<
> \new Staff {
>   \transpose bes c' \straightMusic
> }
> \new Staff {
>   \keepWithTag #'mark
>   \transpose bes c' \clarinetOneMusic
> }
> \new Staff {
>   \keepWithTag #'no-mark
>   \transpose bes c' \clarinetOneMusic
> }
>   >>
>   \layout { }
> }
> %% SNIPPET %%​
> 
> ​Inline image 1​
> 
> 
> Guy Stalnaker
> jimmyg...@gmail.com 
> 
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
-- 
Good People Wanted and Managers too!



signature.asc
Description: OpenPGP digital signature
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user