Re: partcombine and tag
Thank you David, that's clear! g. On Sat, Apr 23, 2016 at 11:08 AM, David Kastrupwrote: > Gianmaria Lari 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
Gianmaria Lariwrites: > 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
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
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 Lariwrote: > 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
Gianmaria Lariwrites: > 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