Re: partcombine and tag

2016-04-23 Thread Gianmaria Lari
Thank you David, that's clear!
g.

On Sat, Apr 23, 2016 at 11:08 AM, David Kastrup <d...@gnu.org> wrote:

> Gianmaria Lari <gianmarial...@gmail.com> writes:
>
> > What if I change this
> >
> > note = \partcombine {e'} {\tag #'pdfOut c' \tag #'midiOut c'}
> >
> >
> > in this:
> >
> > note = { \new Voice << {e'}  {\tag #'pdfOut c' \tag #'midiOut c'}>>}
> >
> >
> > Now it works, but should I expect any side effects? It is equivalent?
>
> It's not equivalent.  \partcombine is most useful for piano extracts: it
> will combine notes of same length into chords and keep notes of
> different length separated.
>
> << >> will combine even notes of different length into chords (and
> LilyPond cannot currently deal with them properly either), and << \\ >>
> will keep even notes of the same length in different voices (and
> consequently with different stems).  Which is often what you want in
> partiture in order to be able to tell different voices apart.
>
> --
> David Kastrup
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: partcombine and tag

2016-04-23 Thread David Kastrup
Gianmaria Lari <gianmarial...@gmail.com> writes:

> What if I change this
>
> note = \partcombine {e'} {\tag #'pdfOut c' \tag #'midiOut c'}
>
>
> in this:
>
> note = { \new Voice << {e'}  {\tag #'pdfOut c' \tag #'midiOut c'}>>}
>
>
> Now it works, but should I expect any side effects? It is equivalent?

It's not equivalent.  \partcombine is most useful for piano extracts: it
will combine notes of same length into chords and keep notes of
different length separated.

<< >> will combine even notes of different length into chords (and
LilyPond cannot currently deal with them properly either), and << \\ >>
will keep even notes of the same length in different voices (and
consequently with different stems).  Which is often what you want in
partiture in order to be able to tell different voices apart.

-- 
David Kastrup

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


Re: partcombine and tag

2016-04-23 Thread Gianmaria Lari
What if I change this

note = \partcombine {e'} {\tag #'pdfOut c' \tag #'midiOut c'}


in this:

note = { \new Voice << {e'}  {\tag #'pdfOut c' \tag #'midiOut c'}>>}


Now it works, but should I expect any side effects? It is equivalent?

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


Re: partcombine and tag

2016-04-23 Thread Gianmaria Lari
Ciao David you wrote:

[...]
> \partcombine runs and creates a common score.  Since none of the tags is
> removed, the result contains both c4 and c'4.  This is stored in \note.
>

thank you for you explanation now it is perfectly clear what happens.


> I don't remember: doesn't partcombine complain when given parts of
> different length?


Apparently no :)

[...]

> Basically, you need to use the equivalent of \keepWithTag/\removeWithTag
> _before_ running \partcombine.  Afterwards, you only have a combined
> list of events without any tags left.
>

uhm... I don't think this will work for me. I mean, I could rewrite the
code so that \keepWithTag or \removeWithTag  runs before \partcombine but I
think for this I would be forced to create some multiple variable
containing the result of \keepWithTag etc. This is not very practical and
in case of many tags it will became difficult to handle, isn't it?


> It would be nice if \partcombine were rewritten to run just-in-time.
> The current implementation runs it when encountered, however.  Which
> means that it also has no access to context properties and other
> niceties.
>

Yes it would be!
Thanks, g.

On Fri, Apr 22, 2016 at 5:58 PM, Gianmaria Lari 
wrote:

> Ciao David you wrote:
>
> [...]
>> \partcombine runs and creates a common score.  Since none of the tags is
>> removed, the result contains both c4 and c'4.  This is stored in \note.
>>
>
> thank you for you explanation now it is perfectly clear what happens.
>
>
>> I don't remember: doesn't partcombine complain when given parts of
>> different length?
>
>
> Apparently no :)
>
> [...]
>
>> Basically, you need to use the equivalent of \keepWithTag/\removeWithTag
>> _before_ running \partcombine.  Afterwards, you only have a combined
>> list of events without any tags left.
>>
>
> uhm... I don't think this will work for me. I mean, I could rewrite the
> code so that \keepWithTag or \removeWithTag  runs before \partcombine but I
> think for this I would be forced to create some multiple variable
> containing the result of \keepWithTag etc. This is not very practical and
> in case of many tags it will became difficult to handle, isn't it?
>
>
>> It would be nice if \partcombine were rewritten to run just-in-time.
>> The current implementation runs it when encountered, however.  Which
>> means that it also has no access to context properties and other
>> niceties.
>>
>
> Yes it would be!
> Thanks, g.
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: partcombine and tag

2016-04-22 Thread David Kastrup
Gianmaria Lari <gianmarial...@gmail.com> writes:

> I'm trying to understand how to use partcombine and tag and I don't
> understand why compiling the following code I obtain two measures
>
> 4 4 | 4
>
> instead of just one
>
> 4 4 4
>
> In the attached image the resulting score.
>
> Here it is the code.
> %%%
> \version "2.19.40"
>
> note = \partcombine {e'4} {\tag #'pdfOut c4 \tag #'midiOut c'4}

\partcombine runs and creates a common score.  Since none of the tags is
removed, the result contains both c4 and c'4.  This is stored in \note.

I don't remember: doesn't partcombine complain when given parts of
different length?

> music =
> {
>   \time 3/4
>   \note \note \note
> }

Here you put three instances in a row.


> \score
> {
>   \keepWithTag #'pdfOut \music

The \music has already been partcombined, so there are no traces of any
tags left any more.  \keepWithTag doesn't do a thing on music without
tags.

>   \layout {}
> }

Basically, you need to use the equivalent of \keepWithTag/\removeWithTag
_before_ running \partcombine.  Afterwards, you only have a combined
list of events without any tags left.

It would be nice if \partcombine were rewritten to run just-in-time.
The current implementation runs it when encountered, however.  Which
means that it also has no access to context properties and other
niceties.

-- 
David Kastrup

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


partcombine and tag

2016-04-22 Thread Gianmaria Lari
I'm trying to understand how to use partcombine and tag and I don't
understand why compiling the following code I obtain two measures

4 4 | 4

instead of just one

4 4 4

In the attached image the resulting score.

Here it is the code.
%%%
\version "2.19.40"

note = \partcombine {e'4} {\tag #'pdfOut c4 \tag #'midiOut c'4}

music =
{
  \time 3/4
  \note \note \note
}

\score
{
  \keepWithTag #'pdfOut \music
  \layout {}
}

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


odd behaviour of \partCombine with \tag

2016-04-16 Thread Joseph Chrestien
Hello all,


I think I might have found some kind of bug with \partCombine, hoping this is 
not useless noise. I did find a workaround, so it's no big problem, but maybe 
somebody can shed light on what is wrong.


I'm using a \tag marker in a voice context, because I want the MIDI output to 
behave differently thant the PDF, inserting a slight skip (s4) between note 
groups without changing anything to the \layout score.


So I created this musical variable :

```

cesure = {
  \tag #'audio s4
}

```


Then I used ` \keepWithTag #'otherTag  ` to tell the layout I don't want any of 
these \cesure objects printed in the PDF.

As a strange result, not all notes were printed to the partCombine staff, 
whereas they are printed normally in the separate parts.


Below is my example code (including my workaround), I tried to make it as clear 
as possible.


Hope this can help somebody someday.

Cheers,

Joseph



http://lilybin.com/424sit/3





\version "2.18.2"
cesure = {
  \tag #'audio s4^"I'm invisible"
}

TenorMusic = \relative c' {
  \tempo 4=190
  \time 3/1
  g\breve  a1 \cesure
  b\breve c1 \cesure
  d\breve e1
}

BassMusic = \relative c {
  e\breve f1 \cesure
  g\breve e1 \cesure
  f\breve g1
}

myBuggyScore =  {
<<
   \new Staff << \set Staff.instrumentName = #"Tenor" \clef "G_8" \TenorMusic >>
   \new Staff << \set Staff.instrumentName = #"Bass" \clef bass \BassMusic >>
   \new PianoStaff  <<
  \set PianoStaff.instrumentName = \markup{\bold Buggy}
  \new Staff <<
\clef bass
\set Staff.printPartCombineTexts = ##f

\partcombine
<<
  % \keepWithTag #'visuel {\TenorMusic}
  \TenorMusic
>>
<<
  %\keepWithTag #'visuel {\BassMusic}
  \BassMusic
>>
  >>
>>
>>
}


myWorkaroundScore = {
<<
   \new Staff << \set Staff.instrumentName = #"Tenor" \clef "G_8" \TenorMusic >>
   \new Staff << \set Staff.instrumentName = #"Bass" \clef bass \BassMusic >>
   \new PianoStaff  <<
  \set PianoStaff.instrumentName = \markup{\bold Fine}
  \new Staff <<
\clef bass
\set Staff.printPartCombineTexts = ##f

\partcombine
<<
  \keepWithTag #'visuel {\TenorMusic}
  % \TenorMusic
>>
<<
  \keepWithTag #'visuel {\BassMusic}
  % \BassMusic
>>
  >>
>>
>>
}



\bookpart {
  \score {
\keepWithTag #'visuel \myBuggyScore
\layout { }
  }
  \score {
\keepWithTag #'visuel \myWorkaroundScore
\layout { }
  }
}

\score {

  \keepWithTag #'audio \myBuggyScore  % this midi output is OK

  \midi{ }
}







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