Re: Combining \tag with \quoteDuring does not work

2017-03-27 Thread David Kastrup
Kaj Persson <70147pers...@telia.com> writes:

> David,
>>
>> Since I already explained this in detail in the first reply, it seems
>> like a total waste of effort when you express your complete surprise
>> that things work the way I already explained in the first reply.  Or
>> actually, that the _result_ is the way I explained it.  Because "I
>> thought, that tags always change the source, but obviously I was
>> wrong."  rather suggests that you did not actually consider thinking
>> about the explanation.
>>
>> Particularly in the light of that, you should aim to provide smaller
>> examples in future as your mode of learning seems to be focused
>> _completely_ on looking at examples _without_ considering explanations.
>> So since the dissemination of an example is _mandatory_ for your
>> learning, you really should aim to make at least this step as painless
>> as possible for helpers.
>>
> Of course you are right. In your eyes I am a stupid person who does
> not understand simple relations and explanations.

I might have expressed myself poorly.  In my eyes I wasted time with an
approach that wasn't helping you.  The approach actually able to help
you consisted on working through your example.  One reason that I did
not choose this approach right away but tried with non-example
explanations was that your example was way too complex to explain things
with unless one broke it down into elements suitable for explanation.

Most people aren't fans of wasting their time, so I told you that in the
light of you being someone who benefits significantly from having things
explained by example (most people do, though to somewhat different
degree), you'd do quite better if you made this as easy to do as
possible.

That you different than I do is no value judgment.  Invariably when
people ask how to learn C++, the answer is some "C++ made easy" book
with 1500 pages consisting of handwavy explanations and examples.
This kind of book is totally annoying to me in how it forces me to sift
through lots of irrelevancies to get at the actual information, often
forcing me to deduce it.  I prefer just reading the standard definitions
(or rather, the last public draft standard).  Still bulky enough, but
without all that noise.

I am well aware that very few people do _that_, and that the market for
books written like that is very small.

That doesn't mean that I consider everybody benefitting from more
example-heavy information than I prefer it "stupid": most of the people
ending up doing the heavy lifting are in that category and are much more
likely than myself to deliver a continuous stream of solid work without
getting sidestepped or procrastinating while getting on everybody's
nerves.

> I can also tell, that I have followed your advice from your first
> answer about variable. It was a fruitful solution and much better than
> quoting (this time).

Quoting really is rather limited in its usefulness.  The main feature it
has over music variables is extracting the correct time of a quote from
a longer passage automatically.  That is its principal value.  If you
don't particularly need _that_ or if it even gets in your way because
your referencing music expression is given different timing (like when
removing passages), you tend to be better off with music variables.
Quotes can only work with a single voice and are _tied_ in their timing.
This can often get in the way when using them outside of orchestral
contexts.

-- 
David Kastrup

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


Re: Combining \tag with \quoteDuring does not work

2017-03-27 Thread Kaj Persson

David,

On 2017-03-27 at 20:17, David Kastrup wrote:

Kaj Persson <70147pers...@telia.com> writes:


So the result you show printed is _exactly_ the result according to
my explanation, yet you say it isn't, possibly because of glossing
over half of the explanation, possibly because of misunderstanding
some part of the explanation.

Which is it?
   

You gave the explaination above at "since the tag isn't relevant for
quoting." I thought, that tags always change the source, but obviously
I was wrong.

So let's see when I bothered mentioning it.  In my first reply I wrote:

 That being said, tags are a mechanism for manipulating input and
 quotes are a mechanism for recording input and replaying the
 recorded results (which no longer are input put streams of events).

 So all of your tag manipulations need to be done by the time you use
 \addQuote .  Maybe you don't need quotes here but rather
 straightforward music variables: those contain the input and are
 still susceptible to tag manipulations.

In my second reply I wrote:

 >
 > \addQuote "Q" { \Ma \Mb \Mc \tag #'X \Mb \Md }

 The tag here is ineffective since it is inside of the quote.

So I gave the information two times rather explicitly and still had to
take your complex example apart in the third answer before you actually
considered it.

Since I already explained this in detail in the first reply, it seems
like a total waste of effort when you express your complete surprise
that things work the way I already explained in the first reply.  Or
actually, that the _result_ is the way I explained it.  Because "I
thought, that tags always change the source, but obviously I was wrong."
rather suggests that you did not actually consider thinking about the
explanation.

Particularly in the light of that, you should aim to provide smaller
examples in future as your mode of learning seems to be focused
_completely_ on looking at examples _without_ considering explanations.
So since the dissemination of an example is _mandatory_ for your
learning, you really should aim to make at least this step as painless
as possible for helpers.

Of course you are right. In your eyes I am a stupid person who does not 
understand simple relations and explanations. I cannot deny that. O 
course you are right. I have for quite a long time tried to learn this 
program LilyPond, but still I have not reached your heights. I do not 
know  scheme, but am trying to understand how the program behaves. Yes, 
already in your first answer you gave an explaination, I read it, but at 
that time I was more anxious to come back with a readable code, and did 
not look so hard into your words of wisdom. Then they have been 
repeated, and I have read them, but shame to say, I do not yet 
understand the full essence. I am not the cleverest man walking on this 
earth, and have to use time (and several examples) before the real 
knowledge enters my head.


I am sorry I have irritated you. I am aware of mistakes in my writing an 
example, and, I repeat, I will try to make them not complete but more 
simple, in the future, if I will have to call for help again. I am sorry 
having to admit, I assume I will need that. I know you are a busy 
person, yet willing to help idiots like me. Of course I appreciate that, 
and I am very grateful. So thank you very, very much.


I can also tell, that I have followed your advice from your first answer 
about variable. It was a fruitful solution and much better than quoting 
(this time).


/Kaj


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


Re: Combining \tag with \quoteDuring does not work

2017-03-27 Thread David Kastrup
Kaj Persson <70147pers...@telia.com> writes:

>> So the result you show printed is _exactly_ the result according to
>> my explanation, yet you say it isn't, possibly because of glossing
>> over half of the explanation, possibly because of misunderstanding
>> some part of the explanation.
>>
>> Which is it?
>>   
> You gave the explaination above at "since the tag isn't relevant for
> quoting." I thought, that tags always change the source, but obviously
> I was wrong.

So let's see when I bothered mentioning it.  In my first reply I wrote:

That being said, tags are a mechanism for manipulating input and
quotes are a mechanism for recording input and replaying the
recorded results (which no longer are input put streams of events).

So all of your tag manipulations need to be done by the time you use
\addQuote .  Maybe you don't need quotes here but rather
straightforward music variables: those contain the input and are
still susceptible to tag manipulations.

In my second reply I wrote:

>
> \addQuote "Q" { \Ma \Mb \Mc \tag #'X \Mb \Md }

The tag here is ineffective since it is inside of the quote.

So I gave the information two times rather explicitly and still had to
take your complex example apart in the third answer before you actually
considered it.

Since I already explained this in detail in the first reply, it seems
like a total waste of effort when you express your complete surprise
that things work the way I already explained in the first reply.  Or
actually, that the _result_ is the way I explained it.  Because "I
thought, that tags always change the source, but obviously I was wrong."
rather suggests that you did not actually consider thinking about the
explanation.

Particularly in the light of that, you should aim to provide smaller
examples in future as your mode of learning seems to be focused
_completely_ on looking at examples _without_ considering explanations.
So since the dissemination of an example is _mandatory_ for your
learning, you really should aim to make at least this step as painless
as possible for helpers.

-- 
David Kastrup

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


Re: Combining \tag with \quoteDuring does not work

2017-03-27 Thread Simon Albrecht

Am 27.03.2017 um 19:26 schrieb Kaj Persson:
I agree, that my example is a wee to big and too scattered, which I 
also did comment in my first post. Instead of putting the marks in an 
own voice I could have included them in the code itself. I thought I 
made it more clear, but maybe I was wrong. The same with the  \G which 
now just includes the \time command, but another time perhaps will 
contain more of common definitions. Maybe I should also have given 
them more descriptive names. I will think of that another time.


There’s a reason why it’s recommended to use minimal examples 
 also on the user list. It will 
make your actual problem stand out and save anybody helping the hassle 
of removing the irrelevant parts themselves. Really, that’s the least 
courtesy you should extend for the voluntary helpers around here.


Best, Simon

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


Re: Combining \tag with \quoteDuring does not work

2017-03-27 Thread caagr98

On 03/27/17 19:26, Kaj Persson wrote:

I thought, that tags always change the source, but obviously I was wrong.


Tags don't actually do anything; they just add a new property to the 
tagged music expression. \{remove,with}WithTag then recurses through the 
music expression and removes everything that has(n't) the correct tag.


If you use variables, then that literally inserts the variable's content 
into the music expression. However, if you use \quoteDuring, that 
inserts a QuoteMusic, which is an instruction to insert a quote with a 
specific name and duration. (This has the advantage of being able to 
reference quotes that aren't defined until later.) Since the QuoteMusic 
doesn't actually contain the referenced music expression, 
\{remove,keep}WithTag can't recurse into it.


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


Re: Combining \tag with \quoteDuring does not work

2017-03-27 Thread Kaj Persson



Den 2017-03-27 kl. 18:53, skrev David Kastrup:

Kaj Persson <70147pers...@telia.com> writes:


On 2017-03-27 at. 17:54, David Kastrup wrote:

Kaj Persson <70147pers...@telia.com> writes:


Oh sorry, this was not according to my intention. And yet I embraced
the code with the HTML tags  ... , a methode I have been
using several times before, with good results. Well I take your words

Some of them at least.  I did write an answer.


and send this e-mail again as pure text, which means I cannot paste
the images, why I instead attach them as files. Sorry for the mistake.

Here is the code:

\version "2.18.2"

Ma = \relative g' { c4 c c }
Mb = \relative g' { b4 b b }
Mc = \relative g' { a4 a a a a a \bar "||" }
Md = \relative g' { g4 g g }

Mj = { \Ma \Mb \Mc \tag #'X \Mb \Md }

Mk = \relative g' {
 \quoteDuring "Q" { s1*4*3/4 }
 \tag #'X { \quoteDuring "Q" { s4*3 } }
 \quoteDuring "Q" { s4*3 }
}

That likely doesn't do what you think it does.  If you remove the tagged
expression, what remains will be

Mk = \relative g' {
 \quoteDuring "Q" { s1*4*3/4 }
 \quoteDuring "Q" { s4*3 }
}

This is exactly what I want, but my impression is that I get this:

Mk = \relative g' {
\quoteDuring "Q" { s1*4*3/4 }
\quoteDuring "Q" { s4*3 } }
\quoteDuring "Q" { s4*3 }
}

It just ignores and removes the "\tag #'X {".

My intention is that Mk shall follow Mj, and when the \removewithtag
#'X is active the Mb shall be excluded (the second time) in Mj as well
as in Mk. In Mj this works very well, but Mk ignores the tag and
continues with Mb after Mc.

You know what you actually quote following this?  The following:


instead of

Mk = \relative g' {
 \quoteDuring "Q" { s1*4*3/4 }
 s4*3
 \quoteDuring "Q" { s4*3 }
}

So what gets removed is the _end_ of the quoted expression rather than
the middle.


\addQuote "Q" { \Ma \Mb \Mc \tag #'X \Mb \Md }

The tag here is ineffective since it is inside of the quote.

I really recommend that you try reading _all_ of my commentary and
understanding it.

This is getting tiresome.  In particular since your "minimal example" is
rather convoluted and does lots of cross-referencing, making it
impossible to follow it.

But let's get through the bulk of it in small parts since there seems no
way to make you apply my comments to your code yourself.

First the definitions:

\version "2.18.2"

Ma = \relative g' { c4 c c }
Mb = \relative g' { b4 b b }
Mc = \relative g' { a4 a a a a a \bar "||" }
Md = \relative g' { g4 g g }

Mj = { \Ma \Mb \Mc \tag #'X \Mb \Md }

Mk = \relative g' {
\quoteDuring "Q" { s1*4*3/4 }
\tag #'X { \quoteDuring "Q" { s4*3 } }
\quoteDuring "Q" { s4*3 }
}

As stated, removing the middle of Mk will result in the equivalent of

Mk = { \quoteDuring "Q" { s1*4*3/4 s4*3 } }

\addQuote "Q" { \Ma \Mb \Mc \tag #'X \Mb \Md }

is equivalent to

\addQuote "Q" { \Ma \Mb \Mc \Mb \Md }

since the tag isn't relevant for quoting.
Yes, this is the explanation! I thought that it takes the source as it 
is after change because of tags, but if it does not (as you say) my 
observations are exactly what you describe.


Then you have

S = {
s1*3/4
\mark \markup { \musicglyph #'"scripts.segno" } s4*3
\mark \markup { \musicglyph #'"scripts.coda" }
s2. s4 \mark \markup \line { "D.S. al" \raise #0.9 \musicglyph
#'"scripts.coda" } s2
\tag #'X { s4*3 } \break
\mark \markup { \musicglyph #'"scripts.coda" }
}

Where removing the tagged code will result in

S = {
s1*3/4
\mark \markup { \musicglyph #'"scripts.segno" } s4*3
\mark \markup { \musicglyph #'"scripts.coda" }
s2. s4 \mark \markup \line { "D.S. al" \raise #0.9 \musicglyph
#'"scripts.coda" } s2
\break
\mark \markup { \musicglyph #'"scripts.coda" }
}

and G = { \time 3/4 } (is there any reason you seem to want to obfuscate
your example as much as possible with trivial music expressions?)

So we get

\score {
   \removeWithTag #'X  % already executed everywhere
   {
 <<
   \new Staff {
 \time 3/4
 <<
\new Voice {
s1*3/4
\mark \markup { \musicglyph #'"scripts.segno" } s4*3
\mark \markup { \musicglyph #'"scripts.coda" }
s2. s4 \mark \markup \line { "D.S. al" \raise #0.9 \musicglyph
 #'"scripts.coda" } s2
\break
\mark \markup { \musicglyph #'"scripts.coda" }
}
\new Voice {
  \voiceOne
  \Ma \Mb \Mc \Md
}
 >>
   }
   \new Staff {
 \time 3/4
 \new Voice { \voiceTwo
   { \quoteDuring "Q" { s1*4*3/4 s4*3 } }
   % Q is \Ma \Mb \Mc \Mb \Md
   % and the quoted parts are 5 bars of 3/4 each, namely
   % \Ma \Mb \Mc \Mb
 }
   }
>>
   }
}

So the result you show printed is _exactly_ the result according to my
explanation, yet you say it isn't, possibly because of glossing over
half of the 

Re: Combining \tag with \quoteDuring does not work

2017-03-27 Thread David Kastrup
Kaj Persson <70147pers...@telia.com> writes:

> On 2017-03-27 at. 17:54, David Kastrup wrote:
>> Kaj Persson <70147pers...@telia.com> writes:
>>
>>> Oh sorry, this was not according to my intention. And yet I embraced
>>> the code with the HTML tags  ... , a methode I have been
>>> using several times before, with good results. Well I take your words
>> Some of them at least.  I did write an answer.
>>
>>> and send this e-mail again as pure text, which means I cannot paste
>>> the images, why I instead attach them as files. Sorry for the mistake.
>>>
>>> Here is the code:
>>>
>>> \version "2.18.2"
>>>
>>> Ma = \relative g' { c4 c c }
>>> Mb = \relative g' { b4 b b }
>>> Mc = \relative g' { a4 a a a a a \bar "||" }
>>> Md = \relative g' { g4 g g }
>>>
>>> Mj = { \Ma \Mb \Mc \tag #'X \Mb \Md }
>>>
>>> Mk = \relative g' {
>>> \quoteDuring "Q" { s1*4*3/4 }
>>> \tag #'X { \quoteDuring "Q" { s4*3 } }
>>> \quoteDuring "Q" { s4*3 }
>>> }
>> That likely doesn't do what you think it does.  If you remove the tagged
>> expression, what remains will be
>>
>> Mk = \relative g' {
>> \quoteDuring "Q" { s1*4*3/4 }
>> \quoteDuring "Q" { s4*3 }
>> }
> This is exactly what I want, but my impression is that I get this:
>
> Mk = \relative g' {
>\quoteDuring "Q" { s1*4*3/4 }
>\quoteDuring "Q" { s4*3 } }
>\quoteDuring "Q" { s4*3 }
> }
>
> It just ignores and removes the "\tag #'X {".
>
> My intention is that Mk shall follow Mj, and when the \removewithtag
> #'X is active the Mb shall be excluded (the second time) in Mj as well
> as in Mk. In Mj this works very well, but Mk ignores the tag and
> continues with Mb after Mc.

You know what you actually quote following this?  The following:

>> instead of
>>
>> Mk = \relative g' {
>> \quoteDuring "Q" { s1*4*3/4 }
>> s4*3
>> \quoteDuring "Q" { s4*3 }
>> }
>>
>> So what gets removed is the _end_ of the quoted expression rather than
>> the middle.
>>
>>> \addQuote "Q" { \Ma \Mb \Mc \tag #'X \Mb \Md }
>> The tag here is ineffective since it is inside of the quote.

I really recommend that you try reading _all_ of my commentary and
understanding it.

This is getting tiresome.  In particular since your "minimal example" is
rather convoluted and does lots of cross-referencing, making it
impossible to follow it.

But let's get through the bulk of it in small parts since there seems no
way to make you apply my comments to your code yourself.

First the definitions:

\version "2.18.2"

Ma = \relative g' { c4 c c }
Mb = \relative g' { b4 b b }
Mc = \relative g' { a4 a a a a a \bar "||" }
Md = \relative g' { g4 g g }

Mj = { \Ma \Mb \Mc \tag #'X \Mb \Md }

Mk = \relative g' {
   \quoteDuring "Q" { s1*4*3/4 }
   \tag #'X { \quoteDuring "Q" { s4*3 } }
   \quoteDuring "Q" { s4*3 }
}

As stated, removing the middle of Mk will result in the equivalent of

Mk = { \quoteDuring "Q" { s1*4*3/4 s4*3 } }

\addQuote "Q" { \Ma \Mb \Mc \tag #'X \Mb \Md }

is equivalent to

\addQuote "Q" { \Ma \Mb \Mc \Mb \Md }

since the tag isn't relevant for quoting.

Then you have

S = {
   s1*3/4
   \mark \markup { \musicglyph #'"scripts.segno" } s4*3
   \mark \markup { \musicglyph #'"scripts.coda" }
   s2. s4 \mark \markup \line { "D.S. al" \raise #0.9 \musicglyph
#'"scripts.coda" } s2
   \tag #'X { s4*3 } \break
   \mark \markup { \musicglyph #'"scripts.coda" }
}

Where removing the tagged code will result in

S = {
   s1*3/4
   \mark \markup { \musicglyph #'"scripts.segno" } s4*3
   \mark \markup { \musicglyph #'"scripts.coda" }
   s2. s4 \mark \markup \line { "D.S. al" \raise #0.9 \musicglyph
#'"scripts.coda" } s2
   \break
   \mark \markup { \musicglyph #'"scripts.coda" }
}

and G = { \time 3/4 } (is there any reason you seem to want to obfuscate
your example as much as possible with trivial music expressions?)

So we get

\score {
  \removeWithTag #'X  % already executed everywhere
  {
<<
  \new Staff {
\time 3/4
<<
   \new Voice {
   s1*3/4
   \mark \markup { \musicglyph #'"scripts.segno" } s4*3
   \mark \markup { \musicglyph #'"scripts.coda" }
   s2. s4 \mark \markup \line { "D.S. al" \raise #0.9 \musicglyph
#'"scripts.coda" } s2
   \break
   \mark \markup { \musicglyph #'"scripts.coda" }
   }
   \new Voice {
 \voiceOne
 \Ma \Mb \Mc \Md
   }
>>
  }
  \new Staff {
\time 3/4
\new Voice { \voiceTwo
  { \quoteDuring "Q" { s1*4*3/4 s4*3 } }
  % Q is \Ma \Mb \Mc \Mb \Md
  % and the quoted parts are 5 bars of 3/4 each, namely
  % \Ma \Mb \Mc \Mb
}
  }
   >>
  }
}

So the result you show printed is _exactly_ the result according to my
explanation, yet you say it isn't, possibly because of glossing over
half of the explanation, possibly because of misunderstanding some part
of the explanation.

Which is it?
 
-- 
David Kastrup


Re: Combining \tag with \quoteDuring does not work - addendum

2017-03-27 Thread Kaj Persson

On 2017-03-27 at. 17:54, David Kastrup wrote:

Kaj Persson <70147pers...@telia.com> writes:


Oh sorry, this was not according to my intention. And yet I embraced
the code with the HTML tags  ... , a methode I have been
using several times before, with good results. Well I take your words

Some of them at least.  I did write an answer.


and send this e-mail again as pure text, which means I cannot paste
the images, why I instead attach them as files. Sorry for the mistake.

Here is the code:

\version "2.18.2"

Ma = \relative g' { c4 c c }
Mb = \relative g' { b4 b b }
Mc = \relative g' { a4 a a a a a \bar "||" }
Md = \relative g' { g4 g g }

Mj = { \Ma \Mb \Mc \tag #'X \Mb \Md }

Mk = \relative g' {
\quoteDuring "Q" { s1*4*3/4 }
\tag #'X { \quoteDuring "Q" { s4*3 } }
\quoteDuring "Q" { s4*3 }
}

That likely doesn't do what you think it does.  If you remove the tagged
expression, what remains will be

Mk = \relative g' {
\quoteDuring "Q" { s1*4*3/4 }
\quoteDuring "Q" { s4*3 }
}

This is exactly what I want, but my impression is that I get this:

Mk = \relative g' {
\quoteDuring "Q" { s1*4*3/4 }
\quoteDuring "Q" { s4*3 } }
\quoteDuring "Q" { s4*3 }
}

It just ignores and removes the "\tag #'X {".

My intention is that Mk shall follow Mj, and when the \removewithtag #'X 
is active the Mb shall be excluded (the second time) in Mj as well as in 
Mk. In Mj this works very well, but Mk ignores the tag and continues 
with Mb after Mc.



===>

Addendum:
My thought was that when \removeWithTag #'X is active, the variables 
would be:

 Mj = { \Ma \Mb \Mc \Md }
 Mk = \relative g' {
  \quoteDuring "Q" { s1*4*3/4 }
  \quoteDuring "Q" { s4*3 }
 }
 \addQuote "Q" { \Ma \Mb \Mc \Md }

so because Mj now does not contain the second \Mb, the quote in Mk 
should copy \Md, but as far as I can see \Mk does not behave so.



instead of

Mk = \relative g' {
\quoteDuring "Q" { s1*4*3/4 }
s4*3
\quoteDuring "Q" { s4*3 }
}

So what gets removed is the _end_ of the quoted expression rather than
the middle.


\addQuote "Q" { \Ma \Mb \Mc \tag #'X \Mb \Md }

The tag here is ineffective since it is inside of the quote.


/Kaj


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


Re: Combining \tag with \quoteDuring does not work

2017-03-27 Thread Kaj Persson

On 2017-03-27 at. 17:54, David Kastrup wrote:

Kaj Persson <70147pers...@telia.com> writes:


Oh sorry, this was not according to my intention. And yet I embraced
the code with the HTML tags  ... , a methode I have been
using several times before, with good results. Well I take your words

Some of them at least.  I did write an answer.


and send this e-mail again as pure text, which means I cannot paste
the images, why I instead attach them as files. Sorry for the mistake.

Here is the code:

\version "2.18.2"

Ma = \relative g' { c4 c c }
Mb = \relative g' { b4 b b }
Mc = \relative g' { a4 a a a a a \bar "||" }
Md = \relative g' { g4 g g }

Mj = { \Ma \Mb \Mc \tag #'X \Mb \Md }

Mk = \relative g' {
\quoteDuring "Q" { s1*4*3/4 }
\tag #'X { \quoteDuring "Q" { s4*3 } }
\quoteDuring "Q" { s4*3 }
}

That likely doesn't do what you think it does.  If you remove the tagged
expression, what remains will be

Mk = \relative g' {
\quoteDuring "Q" { s1*4*3/4 }
\quoteDuring "Q" { s4*3 }
}

This is exactly what I want, but my impression is that I get this:

Mk = \relative g' {
   \quoteDuring "Q" { s1*4*3/4 }
   \quoteDuring "Q" { s4*3 } }
   \quoteDuring "Q" { s4*3 }
}

It just ignores and removes the "\tag #'X {".

My intention is that Mk shall follow Mj, and when the \removewithtag #'X 
is active the Mb shall be excluded (the second time) in Mj as well as in 
Mk. In Mj this works very well, but Mk ignores the tag and continues 
with Mb after Mc.

instead of

Mk = \relative g' {
\quoteDuring "Q" { s1*4*3/4 }
s4*3
\quoteDuring "Q" { s4*3 }
}

So what gets removed is the _end_ of the quoted expression rather than
the middle.


\addQuote "Q" { \Ma \Mb \Mc \tag #'X \Mb \Md }

The tag here is ineffective since it is inside of the quote.


/Kaj

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


Re: Combining \tag with \quoteDuring does not work

2017-03-27 Thread David Kastrup
Kaj Persson <70147pers...@telia.com> writes:

> Oh sorry, this was not according to my intention. And yet I embraced
> the code with the HTML tags  ... , a methode I have been
> using several times before, with good results. Well I take your words

Some of them at least.  I did write an answer.

> and send this e-mail again as pure text, which means I cannot paste
> the images, why I instead attach them as files. Sorry for the mistake.
>
> Here is the code:
>
> \version "2.18.2"
>
> Ma = \relative g' { c4 c c }
> Mb = \relative g' { b4 b b }
> Mc = \relative g' { a4 a a a a a \bar "||" }
> Md = \relative g' { g4 g g }
>
> Mj = { \Ma \Mb \Mc \tag #'X \Mb \Md }
>
> Mk = \relative g' {
>\quoteDuring "Q" { s1*4*3/4 }
>\tag #'X { \quoteDuring "Q" { s4*3 } }
>\quoteDuring "Q" { s4*3 }
> }

That likely doesn't do what you think it does.  If you remove the tagged
expression, what remains will be

Mk = \relative g' {
   \quoteDuring "Q" { s1*4*3/4 }
   \quoteDuring "Q" { s4*3 }
}

instead of

Mk = \relative g' {
   \quoteDuring "Q" { s1*4*3/4 }
   s4*3
   \quoteDuring "Q" { s4*3 }
}

So what gets removed is the _end_ of the quoted expression rather than
the middle.

>
> \addQuote "Q" { \Ma \Mb \Mc \tag #'X \Mb \Md }

The tag here is ineffective since it is inside of the quote.

-- 
David Kastrup

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


Re: Combining \tag with \quoteDuring does not work

2017-03-27 Thread Kaj Persson
Oh sorry, this was not according to my intention. And yet I embraced the 
code with the HTML tags  ... , a methode I have been using 
several times before, with good results. Well I take your words and send 
this e-mail again as pure text, which means I cannot paste the images, 
why I instead attach them as files. Sorry for the mistake.


Here is the code:

\version "2.18.2"

Ma = \relative g' { c4 c c }
Mb = \relative g' { b4 b b }
Mc = \relative g' { a4 a a a a a \bar "||" }
Md = \relative g' { g4 g g }

Mj = { \Ma \Mb \Mc \tag #'X \Mb \Md }

Mk = \relative g' {
   \quoteDuring "Q" { s1*4*3/4 }
   \tag #'X { \quoteDuring "Q" { s4*3 } }
   \quoteDuring "Q" { s4*3 }
}

\addQuote "Q" { \Ma \Mb \Mc \tag #'X \Mb \Md }

S = {
   s1*3/4
   \mark \markup { \musicglyph #'"scripts.segno" } s4*3
   \mark \markup { \musicglyph #'"scripts.coda" }
   s2. s4 \mark \markup \line { "D.S. al" \raise #0.9 \musicglyph 
#'"scripts.coda" } s2

   \tag #'X { s4*3 } \break
   \mark \markup { \musicglyph #'"scripts.coda" }
}

G = {
   \time 3/4
}

\paper { ragged-right = ##t
  indent = #0
}

\score {
   \removeWithTag #'X
   {
 <<
   \new Staff {
 \G
 <<
   \new Voice \S
   \new Voice { \voiceOne \Mj }
 >>
   }
   \new Staff {
 \G
 \new Voice { \voiceTwo \Mk }
   }
 >>
   }

   \layout {}
   % \midi {}
}

Two images attached:
Layout_of_tag-quoteDuring.png
Midi_of_tag-quoteDuring.png


For the preamble, see the original post (also cited below).

/Kaj

On 2017-03-27 at 14:33,  David Kastrup wrote:
> 70147pers...@telia.com writes:
>
>> In movements where the music jumps between different sections marked
>> with segno signs, one has do deal with those in a quite different way
>> in the layout and the midi scores. Then the \tag is of good help to
>> exclude parts in the layout score that has to be there in the midi
>> score. Now, if two voices are almost equal there also a good aid in
>> the \addQuote and \quoteDuring mechanism. However to combine this with
>> the \tag facility does not work for me. The quotes neglect the tags
>> and is running as if they do not exist. I know my snippet is a wee too
>> long, but I will illustrate the whole situation with signs and
>> others. I also know that the construction with "D.S. al coda" is not
>> the cleverest, but it was the shortest I could find out here. To
>> shorten the example I have not doubled the score, but in the real case
>> the layout score is running with the "\removeWithTag #'X" while the
>> midi score has this line removed. Instead of the long \addQuote
>> expression you can write \Mj (which it is) but no difference. Here is
>> my example:
>>
>> \version "2.18.2" Ma = \relative g' { c4 c c } Mb = \relative g' { 
b4 b b } Mc =
>> \relative g' { a4 a a a a a \bar "||" } Md = \relative g' { g4 g g } 
Mj = { \Ma
>> \Mb \Mc \tag #'X \Mb \Md } Mk = \relative g' { \quoteDuring "Q" { 
s1*4*3/4 }
>> \tag #'X { \quoteDuring "Q" { s4*3 } } \quoteDuring "Q" { s4*3 } } 
\addQuote "Q"
>> { \Ma \Mb \Mc \tag #'X \Mb \Md } S = { s1*3/4 \mark \markup { 
\musicglyph

> No, I am not going to figure out this heap of code without line breaks.
> I recommend that you switch off HTML-formatted mails in your mail
> program or at the very least learn how to teach it _not_ to wrap lines
> where no line wraps belong.
>
> That being said, tags are a mechanism for manipulating input and quotes
> are a mechanism for recording input and replaying the recorded results
> (which no longer are input put streams of events).
>
> So all of your tag manipulations need to be done by the time you use
> \addQuote .  Maybe you don't need quotes here but rather straightforward
> music variables: those contain the input and are still susceptible to
> tag manipulations.
>


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


Re: Combining \tag with \quoteDuring does not work

2017-03-27 Thread David Kastrup
70147pers...@telia.com writes:

> In movements where the music jumps between different sections marked
> with segno signs, one has do deal with those in a quite different way
> in the layout and the midi scores. Then the \tag is of good help to
> exclude parts in the layout score that has to be there in the midi
> score. Now, if two voices are almost equal there also a good aid in
> the \addQuote and \quoteDuring mechanism. However to combine this with
> the \tag facility does not work for me. The quotes neglect the tags
> and is running as if they do not exist. I know my snippet is a wee too
> long, but I will illustrate the whole situation with signs and
> others. I also know that the construction with "D.S. al coda" is not
> the cleverest, but it was the shortest I could find out here. To
> shorten the example I have not doubled the score, but in the real case
> the layout score is running with the "\removeWithTag #'X" while the
> midi score has this line removed. Instead of the long \addQuote
> expression you can write \Mj (which it is) but no difference. Here is
> my example:
>
> \version "2.18.2" Ma = \relative g' { c4 c c } Mb = \relative g' { b4 b b } 
> Mc =
> \relative g' { a4 a a a a a \bar "||" } Md = \relative g' { g4 g g } Mj = { 
> \Ma
> \Mb \Mc \tag #'X \Mb \Md } Mk = \relative g' { \quoteDuring "Q" { s1*4*3/4 }
> \tag #'X { \quoteDuring "Q" { s4*3 } } \quoteDuring "Q" { s4*3 } } \addQuote 
> "Q"
> { \Ma \Mb \Mc \tag #'X \Mb \Md } S = { s1*3/4 \mark \markup { \musicglyph

No, I am not going to figure out this heap of code without line breaks.
I recommend that you switch off HTML-formatted mails in your mail
program or at the very least learn how to teach it _not_ to wrap lines
where no line wraps belong.

That being said, tags are a mechanism for manipulating input and quotes
are a mechanism for recording input and replaying the recorded results
(which no longer are input put streams of events).

So all of your tag manipulations need to be done by the time you use
\addQuote .  Maybe you don't need quotes here but rather straightforward
music variables: those contain the input and are still susceptible to
tag manipulations.

-- 
David Kastrup

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


Combining \tag with \quoteDuring does not work

2017-03-27 Thread 70147persson
In movements where the music jumps between different sections marked 
with segno signs, one has do deal with those in a quite different way in 
the layout and the midi scores. Then the \tag is of good help to exclude 
parts in the layout score that has to be there in the midi score. Now, 
if two voices are almost equal there also a good aid in the \addQuote 
and \quoteDuring mechanism. However to combine this with the \tag 
facility does not work for me. The quotes neglect the tags and is 
running as if they do not exist. I know my snippet is a wee too long, 
but I will illustrate the whole situation with signs and others. I also 
know that the construction with "D.S. al coda" is not the cleverest, but 
it was the shortest I could find out here. To shorten the example I have 
not doubled the score, but in the real case the layout score is running 
with the "\removeWithTag #'X" while the midi score has this line 
removed. Instead of the long \addQuote expression you can write \Mj 
(which it is) but no difference. Here is my example:


|\version "2.18.2" Ma = \relative g' { c4 c c } Mb = \relative g' { b*4 
b b } Mc = \relative g' { a4 a a a a a \bar "||" } Md = \relative g' { 
g4 g g } Mj = { \Ma \Mb \Mc \tag #'X \Mb \Md } Mk = \relative g' { 
\quoteDuring "Q" { s1*4*3/4 } \tag #'X { \quoteDuring "Q" { s4*3 } } 
\quoteDuring "Q" { s4*3 } } \addQuote "Q" { \Ma \Mb \Mc \tag #'X \Mb \Md 
} S = { s1*3/4 \mark \markup { \musicglyph #'"scripts.segno" } s4*3 
\mark \markup { \musicglyph #'"scripts.coda" } s2. s4 \mark \markup 
\line { "D.S. al" \raise #0.9 \musicglyph #'"scripts.coda" } s2 \tag #'X 
{ s4*3 } \break \mark \markup { \musicglyph #'"scripts.coda" } } G = { 
\time 3/4 } \paper { ragged-right = ##t indent = #0 } \score { 
\removeWithTag #'X { << \new Staff { \G << \new Voice \S \new Voice { 
\voiceOne \Mj } >> } \new Staff { \G \new Voice { \voiceTwo \Mk } } >> } 
\layout {} % \midi {} } *|


with the layout result:

and the midi:

You can see, that the lower voice in the layout score in the coda 
instead of running music section Md is running the Mb, hence it neglects 
the tag.


/Kaj

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