RE: Synchronize music of different length

2013-07-05 Thread Richard Sabey
Hi Urs.
In your example, if you lay the second version out as if the notes had twice 
the durations they actually have, then it looks nice:
\version "16.0"
firstVersion =\relative e'' {e2. e4 | g2. cis,4 |}
secondVersion =\scaleDurations #'(2 . 1)\relative e'' {e4~ e16[ fis] e[ fis] 
g4. cis,8 |}
\score{ <<  \new Staff \firstVersion\new Staff 
\secondVersion   >>}
(Note that I have corrected the beaming in the second version.)
That produces a nice result for your example. Is it what you want?
For other examples this method might be unsatisfactory. If you need to try a 
different method, you might like to try spacer rests ( s4 etc).
> Date: Thu, 04 Jul 2013 16:51:55 +0200
> From: Urs Liska 
> To: LilyPond Users 
> Subject: Synchronize music of different length
> Message-ID: <51d58c0b.7010...@openlilylib.org>
> Content-Type: text/plain; charset=ISO-8859-15; format=flowed
> 
> Hi all,
> 
> what would be an elegant way to synchronize a passage of music that is 
> of different length in two staves?
> 
> I need to make an example where the composer made a second version that 
> compressed two bars into one. At the same time he modified the melody 
> around common anchor notes
> I would like to typeset these measures in two staves so that the 
> corresponding notes are aligned, ignoring the metric situation.
> 
> One would be:
> (\time 4/4)
> 
> \relative e'' {
>  e2. e4 | g2. cis,4 |
> }
> 
> The other one:
> 
> \relative e'' {
>e4~ e16[ fis] e[ fis g4. cis,8 |
> }

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


RE: Synchronize music of different length

2013-07-05 Thread Richard Sabey
Hi Urs.
I tried to send a reply earlier. I don't know if I succeeded, but the method I 
suggested was not good enough anyway. Here's my second attempt at a solution to 
your problem:
\version "16.0"
firstVersion =\relative e'' {e2. e4 | g2. cis,4 |}
secondVersion =\scaleDurations #'(2 . 1)\relative e'' {e4~ e16[ fis] e[ 
fis]\bar ""g4. cis,8 |}
\score{ <<  \new Staff  \firstVersion
\new Staff  \secondVersion  >>  \layout 
{   \context{   \Score  
\remove "Timing_translator" \remove 
"Default_bar_line_engraver" }   \context
{   \Staff  \consists "Timing_translator"   
\consists "Default_bar_line_engraver"   }   }}
Note that I have fixed a bug with the beaming in the second version.
All the business of removing two engravers from the Score context & putting 
them into the Staff context is needed because you have two music expressions 
running alongside each other, and the one has a bar line where the other one 
does not.
Now this is all very well because, musically speaking, all that was needed to 
make the two music expressions correspond was to treat each note in the second 
version as if it lasted twice as long as it actually does. If you had another 
example where the music expressions correspond in a different way from that, 
then you could try spacer rests ( s4 etc ).

> Date: Thu, 04 Jul 2013 16:51:55 +0200
> From: Urs Liska 
> To: LilyPond Users 
> Subject: Synchronize music of different length
> Message-ID: <51d58c0b.7010...@openlilylib.org>
> Content-Type: text/plain; charset=ISO-8859-15; format=flowed
> 
> Hi all,
> 
> what would be an elegant way to synchronize a passage of music that is 
> of different length in two staves?
> 
> I need to make an example where the composer made a second version that 
> compressed two bars into one. At the same time he modified the melody 
> around common anchor notes
> I would like to typeset these measures in two staves so that the 
> corresponding notes are aligned, ignoring the metric situation.
> 
> One would be:
> (\time 4/4)
> 
> \relative e'' {
>  e2. e4 | g2. cis,4 |
> }
> 
> The other one:
> 
> \relative e'' {
>e4~ e16[ fis] e[ fis g4. cis,8 |
> }

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


Re: Synchronize music of different length

2013-07-05 Thread Urs Liska

Hi Richard,

thanks for your suggestions.
I was just thinking about how to deal with the different timings (I 
would have found that too, but later) when your second suggestion came in.


This works for the given situation.
But as you say I will have situations where it won't be sufficient 
because they don't have that simple 2:1 relation but rather a irrational 
one.
I often come across examples where one line is developed from another 
one, either in the development of the music or in different versions of 
a composition. When trying to visualize the relationship between them I 
can either typeset the versions normally and place diagonal lines 
between the systems, or adjust the spacing accordingly as in the current 
example. This can of course be quite irregular, but I think it would do 
a good job as an illustration.


Maybe I can experiment with \scaleDurations and use them differently for 
both parts.
But then I'd probably have to deal with time signatures and barlines 
some more.


But I'll consider this when needed ...

Thanks again
Urs

Am 05.07.2013 17:01, schrieb Richard Sabey:

\version "16.0"

firstVersion =
\relative e'' {
e2. e4 | g2. cis,4 |
}

secondVersion =
\scaleDurations #'(2 . 1)
\relative e'' {
e4~ e16[ fis] e[ fis]
\bar ""
g4. cis,8 |
}

\score
{
<<
\new Staff
\firstVersion

\new Staff
\secondVersion
>>
\layout
{
\context
{
\Score
\remove "Timing_translator"
\remove "Default_bar_line_engraver"
}
\context
{
\Staff
\consists "Timing_translator"
\consists "Default_bar_line_engraver"
}
}
}


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


Re: Synchronize music of different length

2013-07-05 Thread David Kastrup
Urs Liska  writes:

> Hi Richard,
>
> thanks for your suggestions.
> I was just thinking about how to deal with the different timings (I
> would have found that too, but later) when your second suggestion came
> in.
>
> This works for the given situation.
> But as you say I will have situations where it won't be sufficient
> because they don't have that simple 2:1 relation but rather a
> irrational one.

That's not terribly likely with standard LilyPond input.  Arbitrary
complicated fractions are never irrational even though the _limit_ of a
sequence of fractions may be.

-- 
David Kastrup


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


Re: Synchronize music of different length

2013-07-05 Thread Urs Liska

Am 05.07.2013 17:20, schrieb David Kastrup:

Urs Liska  writes:


Hi Richard,

thanks for your suggestions.
I was just thinking about how to deal with the different timings (I
would have found that too, but later) when your second suggestion came
in.

This works for the given situation.
But as you say I will have situations where it won't be sufficient
because they don't have that simple 2:1 relation but rather a
irrational one.

That's not terribly likely with standard LilyPond input.  Arbitrary
complicated fractions are never irrational even though the _limit_ of a
sequence of fractions may be.

What I wanted to say is not that the relation itself it too complex for 
LilyPond but that it may not be a linear relation.

In my current example.

Let's take an invented example:
\firstversion is what we had, \secondversion is

\relative e'' {

  e4~ \tuplet 3/2 { e8 e fis } g4 cis,

}

but I still want the last e (2nd triplet) and the c sharp be aligned 
with the corresponding notes of the first version then the timing 
relations would change along the way.


Urs




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


Re: Calculate BarLine 'kern to fit with a given stencil-x-extent

2013-07-05 Thread Pierre Perol-Schneider
2013/7/4 Thomas Morley 

>
> So I should ask:
> How to get good results with different global-staff-size?
>
>
Hi Harm,
So here 's what I've found this evening  :

kern = x-length * EXP[ [ [LN(0.13)/LN(20)]*LN(StaffSize) ] - LN(0.13) ]

Works pretty well from staff size = 15 to 30.
Did not test others.

Note :
- LN (0.13) is an approx figure.
- at least hair thickness changes will strongly affect this function.
- I'm leaving tomorrow for vacation. I'm not sure to get the internet over
there, so be patient for my next replies.

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


Re: Calculate BarLine 'kern to fit with a given stencil-x-extent

2013-07-05 Thread Pierre Perol-Schneider
2013/7/5 Pierre Perol-Schneider 

>
> kern = x-length * EXP[ [ [LN(0.13)/LN(20)]*LN(StaffSize) ] - LN(0.13) ]
>
>
Sorry, I forgot one factor..
So here again "the" kern function :

 kern = x-length*10* EXP[ [ [LN(0.13)/LN(20)]*LN(StaffSize) ] - LN(0.13) ]
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Synchronize music of different length

2013-07-05 Thread Carl Peterson
I don't know that Urs was contemplating "irrational" in the mathematical
sense, but in the more logical sense of being something not governed by an
easily understood relationship, such as one measure generating two and the
next two generating one, and then maybe four develops to 10 and 9 to 5, or
something like that.

The thought that I had is that such an arbitrary function would be good in
generated music (such as music generated by recursive functions) where
LilyPond's text-based source files are ideal, and where successive systems
could show the increasing complexity of each generation. So I might have
something like (on an alto clef, for visual symmetry, and using a lisp
structure to illustrate nesting)

System 1: c'
System 2: (c' d' b c')
System 3: ((c' d' b c') (e' d') (a b) (d' c'))
System 4: (((c' d' b c') (e' d') (a b) (d' c')) ((f' e') (c' d')) ((g a)
(c' b)) ((e' d') (b c')))

For those curious, the generating rules are:
(1) first note in a sequence generates itself, the next higher diatonic
note, the next lower diatonic note, then itself again
(2) if note n is higher than note n-1, then the generated notes are the
next higher note followed by the note itself
(3) if note n is lower than note n-1, then the generated notes are the next
lower note followed by the note itself

The result is, as can be seen, a function where generation n+1 always
begins with the notes in generation n.

How might we be able to code for a situation like this? Granted, if we're
already generating the music, we might as well generate some kind of manual
spacing, but would there be a way for LP/Scheme to align matching elements
in these lists recursively, such as by determining the max
natural/proportional spacing of the innermost equivalent musical
expressions and then using that to determine the spacing required for outer
groupings?



On Fri, Jul 5, 2013 at 11:20 AM, David Kastrup  wrote:

> Urs Liska  writes:
> > This works for the given situation.
> > But as you say I will have situations where it won't be sufficient
> > because they don't have that simple 2:1 relation but rather a
> > irrational one.
>
> That's not terribly likely with standard LilyPond input.  Arbitrary
> complicated fractions are never irrational even though the _limit_ of a
> sequence of fractions may be.
>
> --
> David Kastrup
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Calculate BarLine 'kern to fit with a given stencil-x-extent

2013-07-05 Thread Pierre Perol-Schneider
2013/7/5 Pierre Perol-Schneider 

>
>
>  kern = x-length*10* EXP[ [ [LN(0.13)/LN(20)]*LN(StaffSize) ] - LN(0.13) ]
>

Sorry again, i'm righting too fast
so last shot :

kern = x-length*10* EXP[ [ [LN(0.13)/LN(20)]*LN(StaffSize) ] + LN(0.13) ]

this one should be the good one...
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Calculate BarLine 'kern to fit with a given stencil-x-extent

2013-07-05 Thread David Kastrup
Pierre Perol-Schneider  writes:

> 2013/7/5 Pierre Perol-Schneider 
>
>>
>>
>>  kern = x-length*10* EXP[ [ [LN(0.13)/LN(20)]*LN(StaffSize) ] - LN(0.13) ]
>>
>
> Sorry again, i'm righting too fast
> so last shot :
>
> kern = x-length*10* EXP[ [ [LN(0.13)/LN(20)]*LN(StaffSize) ] + LN(0.13) ]
>
> this one should be the good one...

I have my doubts.  The exponential evaluates to
0.13 * Staffsize ** (ln(0.13)/ln(20))

-- 
David Kastrup


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


Re: More post-divisi oddities

2013-07-05 Thread Guy Stalnaker

Gentlemen,

Thanks for your replies.

Vaughan,

Your attachment was filtered out as a binary file by my email server.
The GNU.org archives also shows it as a .bin file so I cannot 'see'
what you've done. If you would, please attach it as a reply to this
email.

David, I think I understand what you mean here:


I have no idea what you mean with "are being picked up by the
reduction" and "are directed at the full score".  His "reduction"
places _everything_ (with the exception of the side voices) into a
single
voice.  Of course, this voice will share stem directions, slur
directions, and every other property.

He might want to look at \partcombine.


Several questions and clarifications. The piano reduction code is what
Frescobaldi creates when one uses its score wizard to create a score.
I confess I do know understand exactly how it does what it does in
getting stems/rests to not collide up to the point where the temporary
polyphonic passage (TPP) is first used, but you can see from the
example that the Frescobaldi code does set things rightly (this
snippet is an extraction from a significantly larger work and the
piano reduction for everything up to the TPP looks as one would expect
it to look). By your comment, to see if I understand, you say that
using \oneVoice following the TPP in each voice causes LP to set both
parts on the piano reduction staff as one which it previously set as
two before the TPP. That makes sense though it is unfortunate as
\oneVoice following the TPP is required for proper steming/rest
placement in the vocal staves and correct setting of lyrics.

I had already taken a look at \partcombine following the examples here:

http://www.lilypond.org/doc/v2.16/Documentation/snippets/vocal-music#vocal-music-vocal-ensemble-template-with-automatic-piano-reduction

and here:

http://lilypond.org/doc/v2.16/Documentation/notation/multiple-voices

Unfortunately using the piano reduction from the first and the
\partcombine expample from the second do the same thing as the piano
reduction that Frescobaldi generates. I think this is so because the
/oneVoice directives are still in the parts for the reasons I stated
above. As using \partcombine seemed no better than the original I did
not include them in my test ly file when I posted to the list.

Guy Stalnaker
jimmyg...@gmail.com

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


Re: Calculate BarLine 'kern to fit with a given stencil-x-extent

2013-07-05 Thread Pierre Perol-Schneider
Copy of some tests enclosed.
<>___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Calculate BarLine 'kern to fit with a given stencil-x-extent

2013-07-05 Thread Pierre Perol-Schneider
2013/7/5 David Kastrup 

> I have my doubts.  The exponential evaluates to
> 0.13 * Staffsize ** (ln(0.13)/ln(20))


Sorry for that, i'm trying to copy formulas from my excel file and doing
mistakes (plus my wife's complaining...)
after few testings, it seems that 0.14 is a better aprox. figure so here we
go :

kern =x-length*1,4*EXP(-(LN(0,14)/LN(20)*LN(Staff-Size)))

(this time I copy-paste it, so should be the goud one).

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


Half-note with a flag

2013-07-05 Thread John Kliewe
Hi,

I am trying to create a measure like the attached, from Chopin's Nocturne #3.

Here is what I have tried, but neither approach is quite right :

\version "2.16.0"
upper=
\relative c''
{ \clef treble
  \time 6/8
  \key b \major
r2.
r2.
}

lower=
\relative c'
{ \clef bass
  \time 6/8
  \key b \major
<< {cis,2 s8} \\ { 
\once 
\override NoteHead #'transparent = ##t
cis8[ e8 b' gis e' b]} >>
<< {cis,2 s8} \\ { 
cis8[ e8 b' gis e' b]} >>
}

\score {
\new PianoStaff <<
\set PianoStaff.instrumentName = #"3."
\new Staff = "upper" \upper
\new Staff = "lower" \lower
>>
\layout { }
\midi { }
}

Any advice?  <>___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Calculate BarLine 'kern to fit with a given stencil-x-extent

2013-07-05 Thread Thomas Morley
Hi Pierre,

thanks again for your work.
I'll work on it the upcoming weekend.

2013/7/5 Pierre Perol-Schneider :
> 2013/7/5 David Kastrup 
>>
>> I have my doubts.  The exponential evaluates to
>> 0.13 * Staffsize ** (ln(0.13)/ln(20))
>
>
> Sorry for that, i'm trying to copy formulas from my excel file and doing
> mistakes (plus my wife's complaining...)

Don't annoy your wife, a bad start of vacations. ;)

> after few testings, it seems that 0.14 is a better aprox. figure so here we
> go :
>
> kern =x-length*1,4*EXP(-(LN(0,14)/LN(20)*LN(Staff-Size)))
>
> (this time I copy-paste it, so should be the goud one).
>
> Pierre

Bonnes vacances,
  Harm

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


Re: Half-note with a flag

2013-07-05 Thread Noeck
Hi John,

\mergeDifferentlyHeadedOn is what you are looking for. The approach with
two voices was already right.

\version "2.16.0"

\new Staff \relative c' {
  \clef bass
  \time 6/8
  \key b \major
  \mergeDifferentlyHeadedOn
  << { cis,2 s4 } \\ { cis8[ e8 b' gis e' b] } >>
}

For more details, please look at:
http://lilypond.org/doc/v2.16/Documentation/notation/multiple-voices

Cheers,
Joram


Am 05.07.2013 22:51, schrieb John Kliewe:
> 
> \version "2.16.0"
> upper=
> \relative c''
> { \clef treble
>   \time 6/8
>   \key b \major
> r2.
> r2.
> }
> 
> lower=
> \relative c'
> { \clef bass
>   \time 6/8
>   \key b \major
> << {cis,2 s8} \\ {
> \once
> \override NoteHead #'transparent = ##t
> cis8[ e8 b' gis e' b]} >>
> << {cis,2 s8} \\ {
> cis8[ e8 b' gis e' b]} >>
> }
> 
> \score {
> \new PianoStaff <<
> \set PianoStaff.instrumentName = #"3."
> \new Staff = "upper" \upper
> \new Staff = "lower" \lower
>>>
> \layout { }
> \midi { }
> }

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


Re: Half-note with a flag

2013-07-05 Thread Thomas Morley
2013/7/5 John Kliewe :
> Hi,
>
> I am trying to create a measure like the attached, from Chopin's Nocturne
> #3.
[...]
> Any advice?

Use:
\mergeDifferentlyHeadedOn

Further explanations in the NR.

Cheers,
  Harm

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