Re: Tie between staves of a PianoStaff

2024-05-09 Thread Werner LEMBERG


> Thanks for your contributions. They inspired me to an easy bypass:
> ties may not work between staves, but slurs do, and the difference
> is not really conspicuous.  [...]

By the way, the original problem is an ooold bug:

  https://gitlab.com/lilypond/lilypond/-/issues/555


 Werner



Re: Tie between staves of a PianoStaff

2024-05-09 Thread Knute Snortum
On Thu, May 9, 2024 at 6:27 AM Kris Van Bruwaene  wrote:

> Thanks for your contributions. They inspired me to an easy bypass: ties
> may not work between staves, but slurs do, and the difference is not really
> conspicuous. Result attached.
>

That's great!  I'd change one thing -- not related to cross-staves ties.
In the right-hand set of temporary voices, third voice, I'd start with
\voiceFour instead of \voiceThree.  Now the need for \stemDown \slurDown
goes away:

  \new Voice { \voiceFour % ties (actually slurs) between staves
  s2 b2( \change Staff = "down" \voiceOne b4) \change Staff = "up" s4 %
2
  }

Also, just for future reference, if you just have one slur or tie (or other
things like fematas) to change up or down, you can use the direction
indicators:

  b2_( % slur down
  b2^( % slur up


--
Knute Snortum


Re: Tie between staves of a PianoStaff

2024-05-09 Thread Kris Van Bruwaene
Thanks for your contributions. They inspired me to an easy bypass: ties may not 
work between staves, but slurs do, and the difference is not really 
conspicuous. Result attached.



On Wednesday, 8 May 2024 at 18:44:10 CEST, David Wright 
 wrote: 





On Wed 08 May 2024 at 13:40:23 (+), Kris Van Bruwaene wrote:

> Is there a simple solution for putting a tie between staves of a pianostaff? 
> I need to tie a note of the lower voice on the upper staff to a note of the 
> upper voice on the lower staff. I found this on StackExchange: 
> https://music.stackexchange.com/questions/74383/lilypond-ties-across-staves 
> but it's five years old and seems rather difficult to implement.
> I use version 2.24.2 on Debian.


I'd agree with Knute: you have to bite the bullet and learn \shape.

But in the old stackexchange post, I'd be tempted to make the tie
unambiguous. The result is not publishable, but I don't think it
leaves room for doubt, even with no extra work, and it's \break-
able at either barline. (I'm assuming the lower e /is/ restruck
in measure two.)

Cheers,
David.



myTie.pdf
Description: Adobe PDF document
\version "2.24.2"
organUp = \relative c' {
\clef treble
\key e \minor
r2\mf
<< 
  { \voiceOne
  c4 d | e2( g)
  } 
  \new Voice { \voiceTwo
  s2 | s2 e
  }
  \new Voice { \voiceThree % ties (actually slurs) between staves
  s2 \stemDown \slurDown b2( \change Staff = "down" \voiceOne b4) \change Staff = "up" s4 % 2
  }
>>
}

organDown = \relative c' {
\clef bass
\key e \minor
<< 
  { \voiceOne
  r4 b2 a4 | g2 s4 a
  }
  \new Voice { \voiceTwo
  e1 ~ | e4 d c2
  }
>>
}
\score {
  \new PianoStaff \with { midiInstrument = #"church organ" } <<
\new Staff = "up" \organUp
\new Staff = "down" \organDown
  >>
  \layout { }
}


Re: Tie between staves of a PianoStaff

2024-05-08 Thread David Wright
On Wed 08 May 2024 at 13:40:23 (+), Kris Van Bruwaene wrote:
> Is there a simple solution for putting a tie between staves of a pianostaff? 
> I need to tie a note of the lower voice on the upper staff to a note of the 
> upper voice on the lower staff. I found this on StackExchange: 
> https://music.stackexchange.com/questions/74383/lilypond-ties-across-staves 
> but it's five years old and seems rather difficult to implement.
> I use version 2.24.2 on Debian.

I'd agree with Knute: you have to bite the bullet and learn \shape.

But in the old stackexchange post, I'd be tempted to make the tie
unambiguous. The result is not publishable, but I don't think it
leaves room for doubt, even with no extra work, and it's \break-
able at either barline. (I'm assuming the lower e /is/ restruck
in measure two.)

Cheers,
David.
\version "2.18.2"
\language "deutsch"

\header { tagline = ##f } \layout { indent = 0 ragged-right = ##t }

global = {
  \key c \major
  \numericTimeSignature
  \time 3/4
  \set Timing.beamExceptions = #'()
}

right = \relative c'' {
  \global
  2 (4~~2^~< e cis'>)r4
}

left = {
  \global
  << { s2. s2. gis'8_(fis' e' dis' e' fis') } \\
 { \stemUp dis'2( e'4^~e')( \showStaffSwitch \change Staff = "right" \stemDown cis'2_~) cis' } >>
}

\score {
  \new PianoStaff <<
\new Staff = "right" \right
\new Staff = "left" { \clef treble \left }
  >>
  \layout { }
}


tie.pdf
Description: Adobe PDF document


Re: Tie between staves of a PianoStaff

2024-05-08 Thread Knute Snortum
On Wed, May 8, 2024 at 6:41 AM Kris Van Bruwaene  wrote:

> Is there a simple solution for putting a tie between staves of a
> pianostaff? I need to tie a note of the lower voice on the upper staff to a
> note of the upper voice on the lower staff. I found this on StackExchange:
> https://music.stackexchange.com/questions/74383/lilypond-ties-across-staves
> but it's five years old and seems rather difficult to implement.
> I use version 2.24.2 on Debian.
>

 As far as I know, there is no easy way to do this.  The StackExchange
answer is the way I'd do it.  It involves two ideas: changing staves and
temporary voices.  I use staff changes so much I always have this setup for
my LilyPond code:

%%%
\version "2.24.3"

% Put somewhere near the top of the file, or in an include file
staffUp   = \change Staff = "upper"
staffDown = \change Staff = "lower"

% Create rightHand and leftHand variables
rightHand = \relative {
  c''2 \staffDown \voiceOne c, \staffUp c'1
}

leftHand = \relative {
  \clef bass
  c2 \voiceTwo c c1
}

% Label the two staves upper and lower
\score {
  \new PianoStaff <<
\new Staff = "upper" \rightHand
\new Staff = "lower" \leftHand
  >>
}
%%%

The other part is knowing how to create temporary voices in LilyPond.  The
way used in the StackExchange example looks like this:

<<

{

% music here

}

\\

{

% music here

}

>>


The idea is that one voice will overlap the other as the two voices will
render simultaneously. Putting these two ideas together gives you the
ability to tie across staves. If the tie does not look the way you want it
to, you can control its shape with the shape command, which looks like this:


\shape #'((0 . 0) (0 . 0) (0 . 0) (0 . 0)) Tie


So it is complex, but hopefully this has been instructive for you.


--
Knute Snortum


Re: Tie an afterGrace note produces warning

2024-03-22 Thread Knute Snortum
On Fri, Mar 22, 2024 at 8:38 AM Aaron Hill  wrote:

>
> 
> \version "2.25.13"
>
> \relative {
>\afterGrace c''4\trill { b16 \set tieWaitForNote = ##t c~ } c4
> }
> 
>

Works great!  Thanks.

-- 
Knute Snortum


Re: Tie an afterGrace note produces warning

2024-03-22 Thread Aaron Hill

On 2024-03-22 8:24 am, Knute Snortum wrote:

Hi all,

I am trying to tie an afterGrace note to the next note and I get a
warning.  This code:

\version "2.25.13"

\relative {
  \afterGrace c''4\trill { b16 c~ } c4
}

...produces this warning:

/tmp/frescobaldi-ieh3nrny/tmpq4qpjmjp/document.ly:4:33 <0>: warning:
unterminated tie

\afterGrace c''4\trill { b16 c

~ } c4


Is there any way around this, as I need this for my current project?




\version "2.25.13"

\relative {
  \afterGrace c''4\trill { b16 \set tieWaitForNote = ##t c~ } c4
}



-- Aaron Hill



Re: Tie from nowhere

2023-10-30 Thread David Zelinsky
Jean Abou Samra  writes:

> Check \repeatTie.

Thanks Jean, that's it!

-David



Re: Tie from nowhere

2023-10-30 Thread Jean Abou Samra
Check \repeatTie.




Re: Tie not working as expected

2023-01-31 Thread Jean Abou Samra
On 31/01/2023 23:06, Steve Carlock wrote:
> Jean,
> 
> Thank you for approving my email - I did subscribe using the website and 
> confirmed the email (and have logged into my account page successfully) prior 
> to sending my email to the list. Maybe I was impatient and needed to wait a 
> day for the account setup to completely process.


Now I realize that your post wasn't held for "Post
by non-members to a members-only list", as usual for
spam on the list, but for "Post to moderated list",
which means that you were indeed subscribed but
I just had to approve your membership on your first
post. Should be OK now, sorry.

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: Tie not working as expected

2023-01-31 Thread Steve Carlock
Jean,

Thank you for approving my email - I did subscribe using the website and
confirmed the email (and have logged into my account page successfully)
prior to sending my email to the list. Maybe I was impatient and needed to
wait a day for the account setup to completely process.

Thank you all for catching my silly typo - it frequently takes a second set
of eyes to catch those types of errors.

The reason I was using the ties inside the chord instead of on the chord as
a whole is that, in the piece I am working on, there are frequently chords
where not all notes are tied, so I was trying to be consistent in my coding
pattern for all tied chords.  I may rethink that decision.

Thanks again.


On Tue, Jan 31, 2023 at 1:13 PM Jean Abou Samra  wrote:

> Hello,
>
> Welcome to this list. I had to approve your message manually
> because you are not subscribed to the list yet. Please fix this
> by subscribing on https://lists.gnu.org/mailman/listinfo/lilypond-user
>
>
> On 31/01/2023 22:04, Steve Carlock wrote:
> > New Lilypond user here.  The following code is not working as I expect:
> >
> > \version "2.24.0"
> > \language "english"
> >
> > \score {
> >   <<
> >   \new Staff {
> > \key d \major
> > \time 4/4
> > \relative c' {
> >   1 | 1 | g~1 | g2 2 |
> > }
> >   }
> >   >>
> >   \layout { }
> > }
> >
> >
> > I expect to see 4 measures with ties between measures 1 and 2, and then
> 3 and 4.  Instead I am seeing 5 measures with an extra whole note in
> measure 4 tied to measure 3.  (Image attached).
> >
> > What am I doing wrong?
>
>
>
> The order of elements for a note is
>
>   
>
>
> In "g~1", you have
>
>   
>
> Thus the "g~" part is understood as a g note that implicitly
> inherits the duration of the previous note, with a tie, and
> the "1" part is the duration of a new note, which inherits
> the pitch of the previous note. You want "g1~" instead.
>
> By the way, you can simplify
>
> 1
>
> into
>
> 1~
>
> Jean
>
>


Re: Tie not working as expected

2023-01-31 Thread Leo Correia de Verdier
The tie ~ and number 1 in measure 3 are in the wrong order, the tie should 
come after the number. 

What happens is that Lilypond, when it sees a pitch or duration alone 
interprets it as a new note, with the missing pitch or duration carried over 
from the previous note. So g~1 becomes a g with the duration 1 carried over 
from the chord before, then a tie and then a whole note (1) with the pitch g 
carried over from the note before the tie. 
HTH
/Leo

> 31 jan. 2023 kl. 22:07 skrev Steve Carlock :
> 
> New Lilypond user here.  The following code is not working as I expect:
> 
> \version "2.24.0"
> \language "english"
> 
> \score {
>   <<
>   \new Staff {
> \key d \major
> \time 4/4
> \relative c' {
>   1 | 1 | g~1 | g2 2 |
> }
>   }
>   >>
>   \layout { }
> }
> 
> I expect to see 4 measures with ties between measures 1 and 2, and then 3 and 
> 4.  Instead I am seeing 5 measures with an extra whole note in measure 4 tied 
> to measure 3.  (Image attached).
> 
> What am I doing wrong?
> 
> Version info:
> LilyPond 2.24.0 (running Guile 2.2)
> Frescobaldi Version 3.0.0
> Linux Mint 20.3 (in a virtual machine if it matters).
> 
> Thanks!
> 
> 
> 


Re: Tie not working as expected

2023-01-31 Thread K. Blum

Hi Steve,

welcome to the group!

In your third measure, Instead of
    g~1
you should write
    g1~

Your sequence means the following:
- g without a duration uses the last duration specified, i.e. whole note
from the measure before.
- ~ produces a tie to the following note.
- 1 without a pitch produces a new note with the length specified and
the pitch repeated from the note before.

Cheers,
Klaus


Am 31.01.2023 um 22:06 schrieb lilypond-user-requ...@gnu.org:

New Lilypond user here.  The following code is not working as I expect:

\version "2.24.0"
\language "english"

\score {
   <<
   \new Staff {
 \key d \major
 \time 4/4
 \relative c' {
   1 | 1 | g~1 | g2 2 |
 }
   }
   >>
   \layout { }
}


I expect to see 4 measures with ties between measures 1 and 2, and then 3
and 4.  Instead I am seeing 5 measures with an extra whole note in measure
4 tied to measure 3.  (Image attached).

What am I doing wrong?

Version info:
LilyPond 2.24.0 (running Guile 2.2)
Frescobaldi Version 3.0.0
Linux Mint 20.3 (in a virtual machine if it matters).

Thanks!





Re: Tie not working as expected

2023-01-31 Thread Jean Abou Samra
Hello,

Welcome to this list. I had to approve your message manually
because you are not subscribed to the list yet. Please fix this
by subscribing on https://lists.gnu.org/mailman/listinfo/lilypond-user


On 31/01/2023 22:04, Steve Carlock wrote:
> New Lilypond user here.  The following code is not working as I expect:
> 
> \version "2.24.0"
> \language "english"
> 
> \score {
>   <<
>   \new Staff {
>     \key d \major
>     \time 4/4
>     \relative c' {
>       1 | 1 | g~1 | g2 2 |
>     }
>   }
>   >>
>   \layout { }
> }
> 
> 
> I expect to see 4 measures with ties between measures 1 and 2, and then 3 and 
> 4.  Instead I am seeing 5 measures with an extra whole note in measure 4 tied 
> to measure 3.  (Image attached).
> 
> What am I doing wrong?



The order of elements for a note is

  


In "g~1", you have

  

Thus the "g~" part is understood as a g note that implicitly
inherits the duration of the previous note, with a tie, and
the "1" part is the duration of a new note, which inherits
the pitch of the previous note. You want "g1~" instead.

By the way, you can simplify

1

into

1~

Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: Tie in markup (lyrics)

2023-01-18 Thread Fernando Gil
You may try:

\markup \concat {
   \tied-lyric "he~yo"
}

El mié, 18 ene 2023 a las 17:50, David Kastrup () escribió:

> Stephan Schöll  writes:
>
> > Hi everybody
> >
> > I have stanzas 2..n put as markup below the score. In one stanza there
> > are two syllables on one note. In lyricmode I'd write the ~, but this
> > doesn't work in regular markup. Is there a way to add that kind of text
> > syllable tie to markup as well? Or should I simply look for some
> > tie-like unicode character?
> >
> > \version "2.24.0"
> > \relative c' {
> >   c d e f
> > }
> > \addlyrics {
> >   he~yo he -- yo hey
> > }
> > \markup {
> >   "he~yo"
> > }
>
> Try
>
> \markup \concat {
>h \undertie "e y" o
> }
>
> --
> David Kastrup
>
>


Re: Tie in markup (lyrics)

2023-01-18 Thread David Kastrup
Stephan Schöll  writes:

> Hi everybody
>
> I have stanzas 2..n put as markup below the score. In one stanza there
> are two syllables on one note. In lyricmode I'd write the ~, but this
> doesn't work in regular markup. Is there a way to add that kind of text
> syllable tie to markup as well? Or should I simply look for some
> tie-like unicode character?
>
> \version "2.24.0"
> \relative c' {
>   c d e f
> }
> \addlyrics {
>   he~yo he -- yo hey
> }
> \markup {
>   "he~yo"
> }

Try

\markup \concat {
   h \undertie "e y" o
}

-- 
David Kastrup



Re: Tie with slash (caesura) on the curve

2022-11-10 Thread Pierre Perol-Schneider
Hi Jean,

Le jeu. 10 nov. 2022 à 11:23, Jean Abou Samra  a écrit :
...

> This is nice! Just a thought: why use after-line-breaking
> here?

...

Bad habit? Respond without thinking long enough? Too proud it'd worked?
Missing knowledge? All?... Yeah, probably all...


> This is the sort of thing that can cause mysterious bugs
> if something else reads the stencil property before your
> after-line-breaking callback is executed. In general, it's
> good practice to stick with normal callbacks in most cases,
> and only use after-line-breaking if you really need it.
> Also, you can use grob-transformer to get the default value.
> This way, if the default changes in a future version, the code
> will still work. (grob-transformer is documented here:
> https://lilypond.org/doc/v2.22/Documentation/extending/callback-functions)
>

Thanks for the tip Jean, I'll keep that in mind ;)
Cheers,
Pierre


Re: Tie with slash (caesura) on the curve

2022-11-10 Thread Jean Abou Samra

Le 10/11/2022 à 04:31, Pierre Perol-Schneider a écrit :


How about:

\version "2.22.0"

oldTie = \once \override Tie.after-line-breaking =
     #(lambda (grob)
        (let*
         ((stencil (ly:tie::print grob))
          (dir (ly:grob-property grob 'direction))
          (markup-stencil
           (grob-interpret-markup grob
             (markup #:scale (cons .8 0.5)
                     (#:musicglyph "scripts.caesura.straight"
          (shift (- (interval-center (ly:stencil-extent stencil X))
                   (interval-center (ly:stencil-extent markup-stencil 
X

          (new-stencil
           (ly:stencil-combine-at-edge stencil
            Y dir
            (ly:stencil-translate-axis markup-stencil shift X)
            -.63)))
         (ly:grob-set-property! grob 'stencil new-stencil)))

{
  \clef"G_8"
  f'16 16
  \oldTie
  8~ 16 16 8
}





Hi Pierre,

This is nice! Just a thought: why use after-line-breaking
here? This is the sort of thing that can cause mysterious bugs
if something else reads the stencil property before your
after-line-breaking callback is executed. In general, it's
good practice to stick with normal callbacks in most cases,
and only use after-line-breaking if you really need it.
Also, you can use grob-transformer to get the default value.
This way, if the default changes in a future version, the code
will still work. (grob-transformer is documented here:
https://lilypond.org/doc/v2.22/Documentation/extending/callback-functions)
So, I'd do:


\version "2.22.2"

oldTie =
\once \override Tie.stencil =
  #(grob-transformer
    'stencil
    (lambda (grob default-stencil)
  (let* ((dir (ly:grob-property grob 'direction))
 (caesura-stencil
  (grob-interpret-markup grob
    (markup #:scale (cons .8 0.5)
    (#:musicglyph "scripts.caesura.straight"
 (shift (- (interval-center (ly:stencil-extent 
default-stencil X))
   (interval-center (ly:stencil-extent 
caesura-stencil X)

    (ly:stencil-combine-at-edge
 default-stencil
 Y dir
 (ly:stencil-translate-axis caesura-stencil shift X)
 -.63

{
  \clef"G_8"
  f'16 16
  \oldTie
  8~ 16 16 8
}


Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: Tie with slash (caesura) on the curve

2022-11-09 Thread Dirck Nagy
Hi Pierre

It works!

Thank you SO much!  I would never have been able to do that on my own.

Good to see you are still around Lilypond!

Andrew, yes it is for guitar

Thanks again!

dirck



From: lilypond-user-bounces+dnagy=uwlax@gnu.org 
 on behalf of Pierre 
Perol-Schneider 
Sent: Wednesday, November 9, 2022 9:31 PM
To: Andrew Bernard 
Cc: lilypond-user@gnu.org 
Subject: Re: Tie with slash (caesura) on the curve

Hi Andrew, Hi Dirck,

Le jeu. 10 nov. 2022 à 02:40, Andrew Bernard 
mailto:andrew.bern...@mailbox.org>> a écrit :

Never say anything is technically unplayable for pianists. Some of the 
technical ability of contemporary players leaves me breathless.

...
Actually it's for guitarists ;)

On 10/11/2022 12:02 pm, Dirck Nagy wrote:
...
I am trying to notate ties with a double-slash (caesura) along the curve.
 ...

How about:

\version "2.22.0"

oldTie = \once \override Tie.after-line-breaking =
 #(lambda (grob)
(let*
 ((stencil (ly:tie::print grob))
  (dir (ly:grob-property grob 'direction))
  (markup-stencil
   (grob-interpret-markup grob
 (markup #:scale (cons .8 0.5)
 (#:musicglyph "scripts.caesura.straight"
  (shift (- (interval-center (ly:stencil-extent stencil X))
   (interval-center (ly:stencil-extent markup-stencil X
  (new-stencil
   (ly:stencil-combine-at-edge stencil
Y dir
(ly:stencil-translate-axis markup-stencil shift X)
-.63)))
 (ly:grob-set-property! grob 'stencil new-stencil)))

{
  \clef"G_8"
  f'16 16
  \oldTie
  8~ 16 16 8
}

HTH, cheers,
Pierre


Re: Tie with slash (caesura) on the curve

2022-11-09 Thread Pierre Perol-Schneider
Hi Andrew, Hi Dirck,

Le jeu. 10 nov. 2022 à 02:40, Andrew Bernard  a
écrit :

> Never say anything is technically unplayable for pianists. Some of the
> technical ability of contemporary players leaves me breathless.
>
...
Actually it's for guitarists ;)

On 10/11/2022 12:02 pm, Dirck Nagy wrote:
>
...

> I am trying to notate ties with a double-slash (caesura) along the curve.
>
>  ...

How about:

\version "2.22.0"

oldTie = \once \override Tie.after-line-breaking =
 #(lambda (grob)
(let*
 ((stencil (ly:tie::print grob))
  (dir (ly:grob-property grob 'direction))
  (markup-stencil
   (grob-interpret-markup grob
 (markup #:scale (cons .8 0.5)
 (#:musicglyph "scripts.caesura.straight"
  (shift (- (interval-center (ly:stencil-extent stencil X))
   (interval-center (ly:stencil-extent markup-stencil X
  (new-stencil
   (ly:stencil-combine-at-edge stencil
Y dir
(ly:stencil-translate-axis markup-stencil shift X)
-.63)))
 (ly:grob-set-property! grob 'stencil new-stencil)))

{
  \clef"G_8"
  f'16 16
  \oldTie
  8~ 16 16 8
}

HTH, cheers,
Pierre


Re: Tie with slash (caesura) on the curve

2022-11-09 Thread Andrew Bernard
Never say anything is technically unplayable for pianists. Some of the 
technical ability of contemporary players leaves me breathless.



What you are after perhaps is an editorial tie. Dorico has them, with a 
single bar through the middle. I know its not exactly the same. I'm sure 
I have come across editorial ties in Lilypond but just right now I can't 
find anything,



Sorry this does not help much,  but searching for editorial tie may 
help. I'll keep having a look around.



Speaking as a player and an engraver, I'd just use a plain tie. If it 
cant be done, then a player wont do it - fairly straightforward and very 
common occurrence.




Andrew


On 10/11/2022 12:02 pm, Dirck Nagy wrote:

Hi all

I am trying to notate ties with a double-slash (caesura) along the curve.

This is to indicate a tie in the original manuscript which is 
technically unplayable.


Re: Tie almost invisible before line break

2022-09-17 Thread Knute Snortum
On Sat, Sep 17, 2022 at 11:30 AM Jean Abou Samra  wrote:
>
>
>
> Le 17/09/2022 à 20:24, Knute Snortum a écrit :
[snip]
> > Is this a bug?  Is there a better way to deal with it?
> >
> > --
> > Knute Snortum
>
>
> Yeah, known long-standing issue.
>
> https://gitlab.com/lilypond/lilypond/-/issues/298
>
> The workaround is increasing minimum-length.
>
>
> \version "2.23.12"
>
> \paper {
>ragged-right = ##t
>indent = 0
> }
>
> \relative {
>\voiceOne
>d''8( c4 b a e'8\tweak minimum-length 5 ~ | \break
>e8)
> }
>
> Jean
>

Thanks, Jean, that's exactly what I was hoping for!

--
Knute Snortum



Re: Tie almost invisible before line break

2022-09-17 Thread Jean Abou Samra




Le 17/09/2022 à 20:24, Knute Snortum a écrit :

I have run into a situation that may be a bug or it may be I'm not
doing something correctly.  I have a \voiceOne note at a line break
where the tie becomes nearly invisible.

%%%
\version "2.23.12"

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

\relative {
   \voiceOne
   d''8( c4 b a e'8~ | \break
   e8)
}
%%%

If you zoom way in on the tie of the e note, you can see a tiny bump;
that is the tie.  The only way I found to fix this is with
\alterBroken and control-points, but this is a very brittle solution
that will need to change if the measures get realigned.

%%%
createBrokenTie =
   \alterBroken control-points #'(
   ((1.5 . 2) (2 . 2.5) (2.5 . 2.5) (3 . 2))
   ((4 . 2) (4.5 . 2.5) (5 . 2.5) (5.5 . 2))
 ) \etc

\relative {
   \voiceOne
   d''8( c4 b a e'8-\createBrokenTie ~ | \break
   e8)
}
%%%

Is this a bug?  Is there a better way to deal with it?

--
Knute Snortum



Yeah, known long-standing issue.

https://gitlab.com/lilypond/lilypond/-/issues/298

The workaround is increasing minimum-length.


\version "2.23.12"

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

\relative {
  \voiceOne
  d''8( c4 b a e'8\tweak minimum-length 5 ~ | \break
  e8)
}

Jean




Re: Tie in alternate

2022-05-19 Thread Kieren MacMillan
Hi Christel,

> If you think of a way: I'm definitely interested!

I do this kind of thing all the time: just use an arrow markup, disconnect it 
from the spacing engine (there are a number of ways of doing this), and tack it 
on to the repeat barline!

If you need more than that hint, I can whip up a MWE you can adapt.

Cheers,
Kieren.


Re: Tie in alternate

2022-05-19 Thread Jean Abou Samra

Le 19/05/2022 à 17:43, Christel le Pair a écrit :

Hello David,

Thank you for the quick response!
I'm working on a tablet, so I'm always on one page.
Indeed that would not be possible -> could give an error, like it more 
often does ;-)

If you think of a way: I'm definitely interested!




Hi Christel,

It's not entirely clear to me what you want to
achieve. How does the arrow look like? If there
are several systems between the beginning and
the end of the repeat, does the line cross the
intermediate systems? Does it bend somehow to
avoid them? If you can post a picture of what
you want to achieve (draw it roughly by hand and
take a photograph, or use an image editing tool
like GIMP), that would be helpful.

By the way, judging from your name, it might
interest you that there is also a French-speaking
list similar to this one, called lilypond-user-fr
(so the address is lilypond-user...@gnu.org).
Information is found at http://lilypond.org/contact.fr.html.

Best,
Jean




Re: Tie in alternate

2022-05-19 Thread Christel le Pair
Hello David,

Thank you for the quick response!
I'm working on a tablet, so I'm always on one page.
Indeed that would not be possible -> could give an error, like it more
often does ;-)
If you think of a way: I'm definitely interested!

Thanks again,
Christel



On Thu, May 19, 2022 at 4:03 PM David Kastrup  wrote:

> Christel le Pair  writes:
>
> > Hello Lilypond,
> >
> > I'm so happy with your tool.
> > Just using it for my own use, have all b and # notes in red.
> > But here is my question... or actually I have 2:
> >
> > Question 1:
> >   \repeat volta 2 { c1 *(* }
> >   \alternative
> >   {
> > { e1*)* }
> > { d1*)* }
> >   }
> > So I want to end the tie in the alternative options, but the 2nd one ends
> > with an error.
>
> Use \repeatTie instead of )
>
> > Question 2:
> > I would like to have an arrow from the end to the beginning of a repeat,
> > normally when it is some lines above. Is that possible?
>
> Not easily.  What would you do if it's on a different page?
>
> --
> David Kastrup
>


Re: Tie in alternate

2022-05-19 Thread David Kastrup
Christel le Pair  writes:

> Hello Lilypond,
>
> I'm so happy with your tool.
> Just using it for my own use, have all b and # notes in red.
> But here is my question... or actually I have 2:
>
> Question 1:
>   \repeat volta 2 { c1 *(* }
>   \alternative
>   {
> { e1*)* }
> { d1*)* }
>   }
> So I want to end the tie in the alternative options, but the 2nd one ends
> with an error.

Use \repeatTie instead of )

> Question 2:
> I would like to have an arrow from the end to the beginning of a repeat,
> normally when it is some lines above. Is that possible?

Not easily.  What would you do if it's on a different page?

-- 
David Kastrup



Re: Tie between words

2021-12-17 Thread Valentin Petzel
Hello Adrian,

as Aaron said there are some arguments to defining functions to give access to 
the parser and the layout that have been made optional since 2.20. That being 
said, 2.18.2 is now nearly 8 years old. Unless there is a good reason for the 
old version consider switching to a recent version. In these 8 years Lilypond 
has gained a lot of functionality, improvements to existing functionality and 
bug fixes while also making the language easier to work with.

Cheers,
Valentin

17.12.2021 10:12:19 Aaron Hill :

> On 2021-12-17 12:37 am, Adrian Oehm wrote:
>> I’ve tried the code you supplied, but unfortunately I keep getting the
>> following error:
>> "ly-syntax-constructors.scm:56:23: Wrong number of arguments to
>> #"
>> I get this trying to compile both with the code in my document and
>> also trying to compile yours.  One important thing I didn’t mention is
>> I’m still using 2.18.2 - I’m not sure if the code is trying to
>> reference things that are in later versions.
> 
> The define-*-function procedures changed between 2.18 and 2.20.  You will 
> need to explicitly name the parser and location arguments if you are running 
> an older version:
> 
> 
> addTieStart =
> #(define-music-function (parser location m) (ly:music?)
>   ^^^
> 
> 
> 
> -- Aaron Hill



Re: Tie between words

2021-12-17 Thread Aaron Hill

On 2021-12-17 12:37 am, Adrian Oehm wrote:

I’ve tried the code you supplied, but unfortunately I keep getting the
following error:

"ly-syntax-constructors.scm:56:23: Wrong number of arguments to
#"

I get this trying to compile both with the code in my document and
also trying to compile yours.  One important thing I didn’t mention is
I’m still using 2.18.2 - I’m not sure if the code is trying to
reference things that are in later versions.


The define-*-function procedures changed between 2.18 and 2.20.  You 
will need to explicitly name the parser and location arguments if you 
are running an older version:



addTieStart =
#(define-music-function (parser location m) (ly:music?)
 ^^^



-- Aaron Hill



Re: Tie between words

2021-12-17 Thread Adrian Oehm
Hi Valentin

Thanks for your reply.

I’ve tried the code you supplied, but unfortunately I keep getting the 
following error:

"ly-syntax-constructors.scm:56:23: Wrong number of arguments to #"

I get this trying to compile both with the code in my document and also trying 
to compile yours.  One important thing I didn’t mention is I’m still using 
2.18.2 - I’m not sure if the code is trying to reference things that are in 
later versions.

(and yes, I know I should update but I have no experience in doing the whole 
building thing and not sure where to start, and which version I can go to 
(running MacOS 10.14.6))

Regards

Adrian


> On 17 Dec 2021, at 6:08 am, Valentin Petzel  wrote:
> 
> Hello Adrian,
> 
> How about this?
> 
> Cheers,
> Valentin
> 
> Am Donnerstag, 16. Dezember 2021, 05:10:21 CET schrieb Adrian Oehm:
>> Hi
>> 
>> Can anyone point me in the right direction to solve this:
>> 
>> I have the below, using a lyric tie,
>> 
>> 
>> but what i really want is what looks like a tie between notes that goes
>> fully between the ‘high’ and ‘in’, like I have drawn crudely below
>> 
>> 
>> 
>> Thanks
>> 
>> Adrian
> 




Re: Tie between words

2021-12-16 Thread Valentin Petzel
That line at the bottom came from testing, so it should be ignored.

signature.asc
Description: This is a digitally signed message part.


Re: Tie between words

2021-12-16 Thread Valentin Petzel
Hello Adrian,

How about this?

Cheers,
Valentin

Am Donnerstag, 16. Dezember 2021, 05:10:21 CET schrieb Adrian Oehm:
> Hi
> 
> Can anyone point me in the right direction to solve this:
> 
> I have the below, using a lyric tie,
> 
> 
> but what i really want is what looks like a tie between notes that goes
> fully between the ‘high’ and ‘in’, like I have drawn crudely below
> 
> 
> 
> Thanks
> 
> AdrianaddTieStart =
#(define-music-function (m) (ly:music?)
   (make-music 'SimultaneousMusic
   'elements
   (list 
  (make-music
 'NoteEvent
 'tweaks
 (list (cons 'transparent #t))
 'articulations
 (list (make-music 'TieEvent 'direction DOWN))
 'pitch
 (ly:make-pitch 1 0)
 'duration
 (ly:make-duration 2))
  m)))

addTieStop =
#(define-music-function (m) (ly:music?)
   (make-music 'SimultaneousMusic
   'elements
   (list 
  (make-music
 'NoteEvent
 'tweaks
 (list (cons 'transparent #t))
 'pitch
 (ly:make-pitch 1 0)
 'duration
 (ly:make-duration 2))
  m)))

<<
\new Staff \new Voice = "notes" { c' c'2 c'4 c' c' c' c' c' c' c' c' }
\new Lyrics \with { \consists Tie_engraver \consists Note_heads_engraver }
 \lyricsto "notes" { \set tieWaitForNote = ##t Tis \addTieStart a \addTieStop Test 
 \addTieStart Test \addTieStop Test Test Test \addTieStart Test Test Test \addTieStop Test }
>>

\displayMusic { \lyricmode { Tis } <>( \lyricmode  { a test  } <>) }

signature.asc
Description: This is a digitally signed message part.


Re: tie from multiple voice?

2021-12-03 Thread Tom Sgouros
Great, I think I understand. Thank you very much.

 -Tom

On Fri, Dec 3, 2021 at 12:48 PM Lukas-Fabian Moser  wrote:

> Hi Tom,
>
> Am 03.12.21 um 16:02 schrieb Tom Sgouros:
> > Thanks, but I'm not sure I completely understand. What you're saying
> > is that if you don't define a voice immediately, you still get one,
> > but its name is nothing ("")? So in my multi-voice segment I can
> > explicitly reference the voice-with-no-name as you are showing with
> > the \voices construct? That makes sense, if that's correct.
>
> Yes, that's basically correct (I'm just not sure if the sentence "its
> name is nothing" is technically correct, but anyway it's what the
> situation amounts to).
>
> If you do \new Staff, then the music you enter is still in a "Voice"
> context that is created implicitly. We could create it explicitly and
> also give it a name:
>
> \new Staff \new Voice = main {
>
>   % bla
>
> }
>
> and then use \voices main,2 << \\ >> for multi-voice music where the
> first voice is a continuation of the "main" voice (and hence can be tied
> to notes outside of << \\ >>).
>
> But notice what Akikazu wrote: If we use \voices with non-number id's,
> LilyPond does not do the \voiceOne / \voiceOne automatically that's
> responsible for stem directions, shifting etc. So we have to add them
> manually, which I forgot to do in my example, unfortunately.
>
> Best
> Lukas
>
>


Re: tie from multiple voice?

2021-12-03 Thread Lukas-Fabian Moser

Hi Tom,

Am 03.12.21 um 16:02 schrieb Tom Sgouros:
Thanks, but I'm not sure I completely understand. What you're saying 
is that if you don't define a voice immediately, you still get one, 
but its name is nothing ("")? So in my multi-voice segment I can 
explicitly reference the voice-with-no-name as you are showing with 
the \voices construct? That makes sense, if that's correct.


Yes, that's basically correct (I'm just not sure if the sentence "its 
name is nothing" is technically correct, but anyway it's what the 
situation amounts to).


If you do \new Staff, then the music you enter is still in a "Voice" 
context that is created implicitly. We could create it explicitly and 
also give it a name:


\new Staff \new Voice = main {

 % bla

}

and then use \voices main,2 << \\ >> for multi-voice music where the 
first voice is a continuation of the "main" voice (and hence can be tied 
to notes outside of << \\ >>).


But notice what Akikazu wrote: If we use \voices with non-number id's, 
LilyPond does not do the \voiceOne / \voiceOne automatically that's 
responsible for stem directions, shifting etc. So we have to add them 
manually, which I forgot to do in my example, unfortunately.


Best
Lukas




Re: tie from multiple voice?

2021-12-03 Thread Lukas-Fabian Moser

Hi Akikazu,

It seems that grob directions are not set implicitly in non-number ID 
context.


Yes, that's true - I forgot to mention that. Thanks for your examples, 
both of which I'd recommend as "good practice".


Lukas




Re: tie from multiple voice?

2021-12-03 Thread Tom Sgouros
Thanks, but I'm not sure I completely understand. What you're saying is
that if you don't define a voice immediately, you still get one, but
its name is nothing ("")? So in my multi-voice segment I can explicitly
reference the voice-with-no-name as you are showing with the \voices
construct? That makes sense, if that's correct.

Thank you,

 -Tom

On Fri, Dec 3, 2021 at 2:17 AM Lukas-Fabian Moser  wrote:

> Hi Tom,
>
> > This does not work:   << { d1~ } \\ {g1} >> | d1 |   No tie appears
> > and I don't see anything like an error or warning that I can do
> > anything with. I can rewrite to have an empty second voice in that
> > second measure, but maybe it's feasible to do it some other way?
>
> If the un-named implicit voice already exists (i.e. if you're not right
> at the beginning of a piece, or if you did an explicit \new Voice { ...
> }), then you can do:
>
> \version "2.22"
>
> \new Staff {
>a'1
>\voices "",2 <<
>  d''1~ \\
>  { g'2 g' }
>>>
>d''1
> }
>
> With "\voices" you can define the names of the voices used by the <<  \\
>  >> construct.
>
> Lukas
>
>


Re: tie from multiple voice?

2021-12-03 Thread Masaki, Akikazu

Hi Lukas,

It seems that grob directions are not set implicitly in non-number ID context.
See:
%%
\new Staff {
  a'1
  \voices "",2 <<
{ d''4 e'' d''2~ } \\
{ g'2 g' }
  >>
  d''2 c''
}
%%

In that case, the direction of Voice "" should be specified, and restored with 
\oneVoice.
%%
\new Staff {
  a'1
  \voices "",2 <<
{ \voiceOne d''4 e'' d''2~ } \\
{ g'2 g' }
  >>
  \oneVoice d''2 c''
}
%%

I often make an explicit new context without \\, and specify each direction.
This is verbose a little but clear.
%%
\new Staff \new Voice = "main" {
  a'1
  <<
{ \voiceOne d''4 e'' d''2~ } % succession of "main"
\new Voice = "temporary" { \voiceTwo g'2 g' }
  >>
  \oneVoice d''2 c''
}
%%

Akikazu


On 2021/12/03 16:17, Lukas-Fabian Moser wrote:

Hi Tom,


This does not work:   << { d1~ } \\ {g1} >> | d1 |   No tie appears and I don't 
see anything like an error or warning that I can do anything with. I can rewrite to have an 
empty second voice in that second measure, but maybe it's feasible to do it some other way?


If the un-named implicit voice already exists (i.e. if you're not right at the 
beginning of a piece, or if you did an explicit \new Voice { ... }), then you 
can do:

\version "2.22"

\new Staff {
   a'1
   \voices "",2 <<
     d''1~ \\
     { g'2 g' }
   >>
   d''1
}

With "\voices" you can define the names of the voices used by the <<  \\ >> 
construct.

Lukas






Re: tie from multiple voice?

2021-12-02 Thread Lukas-Fabian Moser

Hi Tom,

This does not work:   << { d1~ } \\ {g1} >> | d1 |   No tie appears 
and I don't see anything like an error or warning that I can do 
anything with. I can rewrite to have an empty second voice in that 
second measure, but maybe it's feasible to do it some other way?


If the un-named implicit voice already exists (i.e. if you're not right 
at the beginning of a piece, or if you did an explicit \new Voice { ... 
}), then you can do:


\version "2.22"

\new Staff {
  a'1
  \voices "",2 <<
    d''1~ \\
    { g'2 g' }
  >>
  d''1
}

With "\voices" you can define the names of the voices used by the <<  \\ 
>> construct.


Lukas




Re: Tie not appearing

2020-09-12 Thread Claire Meyer
Thank you very much, Aaron ! It works.

Cheers,
Claire

On Sat, Sep 12, 2020 at 12:35 AM Aaron Hill 
wrote:

> On 2020-09-11 3:25 pm, Claire Meyer wrote:
> > Hi,
> >
> > I've got a problem with a tie not appearing. My problematic bar is as
> > follows :
> >
> > upperHighB = \relative c'' {
> > d8   bes |
> > }
>
> Try forcing the Tie downwards:
>
> ...   ...
>
>
> -- Aaron Hill
>
>


Re: Tie not appearing

2020-09-11 Thread Aaron Hill

On 2020-09-11 3:25 pm, Claire Meyer wrote:

Hi,

I've got a problem with a tie not appearing. My problematic bar is as
follows :

upperHighB = \relative c'' {
d8   bes |
}


Try forcing the Tie downwards:

...   ...


-- Aaron Hill



Re: Tie position with sharps

2020-07-23 Thread Aaron Hill

On 2020-07-23 4:38 pm, Aaron Hill wrote:

On 2020-07-23 3:14 pm, Lukas-Fabian Moser wrote:

Hi,

consider:

\version "2.21.0"

\relative {
  g'1~ \break
  g^"normal tie"
}

\relative {
  ges'1~ \break
  ges^"low tie"
}

\relative {
  gis'1~ \break
  gis^"low tie"
}

I understand why the tie at the beginning of the second system of each
example has to sit a little bit lower if there is an accidental in the
way; but isn't the tie position in the third example (with sharp) a
trifle _too_ far down?


Attached is an image that compares the distance relative to the tie.
You can see the flat sits a little more snugly.

It would seem the tie is preferring to vertically align to staff
lines/positions.  After manually overlaying the ties in my image
editor, the staff lines are perfectly overlapping as well, albeit one
staff space lower.

The sharp extends low enough forcing the tie down an entire staff
space.  But this results in a slightly larger gap, because there is
slightly less than a staff space difference between the flat and
sharp's lower extent.


Now with the correct attachment.  (I *hate* email... no ability to edit 
without making noise.)



-- Aaron Hill

Re: Tie position with sharps

2020-07-23 Thread Aaron Hill

On 2020-07-23 3:14 pm, Lukas-Fabian Moser wrote:

Hi,

consider:

\version "2.21.0"

\relative {
  g'1~ \break
  g^"normal tie"
}

\relative {
  ges'1~ \break
  ges^"low tie"
}

\relative {
  gis'1~ \break
  gis^"low tie"
}

I understand why the tie at the beginning of the second system of each
example has to sit a little bit lower if there is an accidental in the
way; but isn't the tie position in the third example (with sharp) a
trifle _too_ far down?


Attached is an image that compares the distance relative to the tie.  
You can see the flat sits a little more snugly.


It would seem the tie is preferring to vertically align to staff 
lines/positions.  After manually overlaying the ties in my image editor, 
the staff lines are perfectly overlapping as well, albeit one staff 
space lower.


The sharp extends low enough forcing the tie down an entire staff space. 
 But this results in a slightly larger gap, because there is slightly 
less than a staff space difference between the flat and sharp's lower 
extent.



-- Aaron Hill

Re: Tie suicide location

2020-07-20 Thread Thomas Morley
Hi Andrew,

did it help?

Cheers,
  Har,

Am So., 19. Juli 2020 um 11:12 Uhr schrieb Thomas Morley
:
>
> Am So., 19. Juli 2020 um 10:38 Uhr schrieb Kevin Barry :
> >
> > On Sun, 2020-07-19 at 18:08 +1000, Andrew Bernard wrote:
> > > What is this error really about? Is there any way to perform a
> > > textual
> > > search to pin it down?
> >
> > The error occurs when LilyPond tries to find the points to attach a tie
> > to and can't find a notehead. The two situations in which this might
> > occur would be:
> > - you've removed the noteheads
> > - the tie spans 3 or more systems (each system will have a part of the
> > tie, but since there are only notes at the beginning and the end, the
> > system in the middle has a tie with no noteheads)
> >
> > Kevin
>
> Hi Kavin, Andrew,
>
> I don't think the first mentioned case happens here, at least
> { \omit NoteHead b1~ b }
> returns
> lilypond: /home/hermann/lilypond-git/build/../flower/include/interval.hh:256:
> T Interval_t::center() const [with T = double]: Assertion
> `!is_empty ()' failed.
> Aborted (core dumped)
> Not the problem Andrew reported.
>
> For the second case below may help:
>
> foo =
>   \override Tie.after-line-breaking =
>   #(lambda (grob)
> ;; For a dead Tie return the measure number and moment within
> the measure
> ;; of the starting point. Additionally color the remaining parts red.
> (let* ((orig (ly:grob-original grob))
>  (siblings (if (ly:grob? orig) (ly:spanner-broken-into orig) '()))
>  (dead-tie
>(if (pair? siblings)
>(remove grob::is-live? siblings)
>'(
>   (if (pair? dead-tie)
>   (begin
> (format #t
>   "\n\tThe broken Tie starting here: ~a has a dead part.\n"
>   (grob::rhythmic-location (ly:spanner-bound orig LEFT)))
> (map
>   (lambda (tie) (ly:grob-set-property! tie 'color red))
>   siblings)
>
> \layout {
>   \context {
>   \Voice
>   \remove "Forbid_line_break_engraver"
>   }
> }
>
> \new Staff
> <<
>   { \foo b1~ b b1*2~ b1 }
>   { s1 \break s1 s1 \break s1 \break s1 }
> >>
>
> If you already have some procedure set to Tie.after-line-breaking, it
> will get disturbed ofcourse.
>
> HTH,
>   Harm



Re: Tie suicide location

2020-07-19 Thread Thomas Morley
Am So., 19. Juli 2020 um 10:38 Uhr schrieb Kevin Barry :
>
> On Sun, 2020-07-19 at 18:08 +1000, Andrew Bernard wrote:
> > What is this error really about? Is there any way to perform a
> > textual
> > search to pin it down?
>
> The error occurs when LilyPond tries to find the points to attach a tie
> to and can't find a notehead. The two situations in which this might
> occur would be:
> - you've removed the noteheads
> - the tie spans 3 or more systems (each system will have a part of the
> tie, but since there are only notes at the beginning and the end, the
> system in the middle has a tie with no noteheads)
>
> Kevin

Hi Kavin, Andrew,

I don't think the first mentioned case happens here, at least
{ \omit NoteHead b1~ b }
returns
lilypond: /home/hermann/lilypond-git/build/../flower/include/interval.hh:256:
T Interval_t::center() const [with T = double]: Assertion
`!is_empty ()' failed.
Aborted (core dumped)
Not the problem Andrew reported.

For the second case below may help:

foo =
  \override Tie.after-line-breaking =
  #(lambda (grob)
;; For a dead Tie return the measure number and moment within
the measure
;; of the starting point. Additionally color the remaining parts red.
(let* ((orig (ly:grob-original grob))
 (siblings (if (ly:grob? orig) (ly:spanner-broken-into orig) '()))
 (dead-tie
   (if (pair? siblings)
   (remove grob::is-live? siblings)
   '(
  (if (pair? dead-tie)
  (begin
(format #t
  "\n\tThe broken Tie starting here: ~a has a dead part.\n"
  (grob::rhythmic-location (ly:spanner-bound orig LEFT)))
(map
  (lambda (tie) (ly:grob-set-property! tie 'color red))
  siblings)

\layout {
  \context {
  \Voice
  \remove "Forbid_line_break_engraver"
  }
}

\new Staff
<<
  { \foo b1~ b b1*2~ b1 }
  { s1 \break s1 s1 \break s1 \break s1 }
>>

If you already have some procedure set to Tie.after-line-breaking, it
will get disturbed ofcourse.

HTH,
  Harm



Re: Tie suicide location

2020-07-19 Thread Kevin Barry
On Sun, 2020-07-19 at 18:08 +1000, Andrew Bernard wrote:
> What is this error really about? Is there any way to perform a
> textual 
> search to pin it down?

The error occurs when LilyPond tries to find the points to attach a tie
to and can't find a notehead. The two situations in which this might
occur would be:
- you've removed the noteheads
- the tie spans 3 or more systems (each system will have a part of the
tie, but since there are only notes at the beginning and the end, the
system in the middle has a tie with no noteheads)

Kevin




Re: Tie suicide location

2020-07-19 Thread Andrew Bernard

Yes. The binary chop. Will take a week. A disappointing outcome.

Why can't lilypond report the (even approximate) location?

What is this error really about? Is there any way to perform a textual 
search to pin it down?



Andrew


On 19/07/2020 5:28 pm, Kevin Barry wrote:

I think you will unfortunately have to try finding it the old fashioned
way:




Re: Tie suicide location

2020-07-19 Thread Kevin Barry
> Any clues on how to find out the source location of this error?
> 
I think you will unfortunately have to try finding it the old fashioned
way: comment out half your score or so and rerun and see if the error
still appears. Repeat until you've narrowed it down sufficiently to find
the ties in the code. If your score has multiple voices, try commenting
out whole voices to figure out which one contains the problem.

Kevin




Re: Tie/slur variable thickness vs shape

2020-05-22 Thread Pierre Perol-Schneider
Yes it does, thank you Kevin!
Cheers,
Pierre

Le ven. 22 mai 2020 à 09:21, Kevin Barry  a écrit :

> On Fri, 2020-05-22 at 07:16 +0200, Pierre Perol-Schneider wrote:
> > Hi,
> > I'm using Abraham's function: http://lsr.di.unimi.it/LSR/Item?id=1028
> > However, the overrides are killed by the shape adjustment:
> >
> > Any idea how to avoid that?
> > TIA, cheers,
> > Pierre
>
> Hi Pierre,
>
> Does this solve the problem?
>
> %%%
> \version "2.20.0"
>
> #(define (variable-bow-thickness min-l max-l min-t max-t)
>(lambda (grob)
>  (let* (;; get the procedure to calculate the control-points
>  (cpf (assoc-get 'control-points (ly:grob-basic-properties
> grob)))
>  (cpt (cond ((list? cpf) cpf)
> ((procedure? cpf) (cpf grob))
> ((ly:unpure-pure-container? cpf)
>  (ly:unpure-call cpf grob
>  (cp0 (car cpt))
>  (cp3 (cadddr cpt))
>  (dx (- (car cp3) (car cp0)))
>  (dy (- (cdr cp3) (cdr cp0)))
>  (len (magnitude (make-rectangular dx dy)))
>  ;; return a value for thickness
>  ;;   below min-l -> min-l
>  ;;   greater than max-l  -> max-l
>  ;;   between min-l and max-l -> calculate a nice value
>  (thickness
>   (cond ((< len min-l) min-t)
> ((> len max-l) max-t)
> (else
>  (+ min-t
> (* (- len min-l)
>(/ (- max-t min-t)
>   (- max-l min-l
>thickness)))
>
> \layout {
>   ragged-last = ##f
>   \override PhrasingSlur.thickness = #(variable-bow-thickness 6 25 1 3)
>   \override Slur.thickness = #(variable-bow-thickness 6 25 1 3)
>   \override Tie.thickness = #(variable-bow-thickness 6 18 1 2)
> }
>
> %% Test:
> {
>   \shape #'((0 . 0) (0 . 0) (0 . 0) (0 . 0)) Tie
>   \shape #'((0 . 0) (0 . 0) (0 . 0) (0 . 0)) Slur
>   \shape #'((0 . 0) (0 . 0) (0 . 0) (0 . 0)) PhrasingSlur
>   c''1~\(( 1 1 1) 1 1\)
> }
> %%
> %%%
>
> Kevin
>
>


Re: Tie/slur variable thickness vs shape

2020-05-22 Thread Kevin Barry
On Fri, 2020-05-22 at 07:16 +0200, Pierre Perol-Schneider wrote:
> Hi,
> I'm using Abraham's function: http://lsr.di.unimi.it/LSR/Item?id=1028
> However, the overrides are killed by the shape adjustment:
> 
> Any idea how to avoid that?
> TIA, cheers,
> Pierre

Hi Pierre,

Does this solve the problem?

%%%
\version "2.20.0"

#(define (variable-bow-thickness min-l max-l min-t max-t) 
   (lambda (grob)
 (let* (;; get the procedure to calculate the control-points
 (cpf (assoc-get 'control-points (ly:grob-basic-properties
grob)))
 (cpt (cond ((list? cpf) cpf)
((procedure? cpf) (cpf grob))
((ly:unpure-pure-container? cpf)
 (ly:unpure-call cpf grob
 (cp0 (car cpt)) 
 (cp3 (cadddr cpt))
 (dx (- (car cp3) (car cp0)))
 (dy (- (cdr cp3) (cdr cp0)))
 (len (magnitude (make-rectangular dx dy)))
 ;; return a value for thickness
 ;;   below min-l -> min-l
 ;;   greater than max-l  -> max-l
 ;;   between min-l and max-l -> calculate a nice value
 (thickness
  (cond ((< len min-l) min-t)
((> len max-l) max-t)
(else 
 (+ min-t 
(* (- len min-l)
   (/ (- max-t min-t) 
  (- max-l min-l
   thickness)))

\layout { 
  ragged-last = ##f
  \override PhrasingSlur.thickness = #(variable-bow-thickness 6 25 1 3) 
  \override Slur.thickness = #(variable-bow-thickness 6 25 1 3) 
  \override Tie.thickness = #(variable-bow-thickness 6 18 1 2)
}

%% Test:
{
  \shape #'((0 . 0) (0 . 0) (0 . 0) (0 . 0)) Tie
  \shape #'((0 . 0) (0 . 0) (0 . 0) (0 . 0)) Slur
  \shape #'((0 . 0) (0 . 0) (0 . 0) (0 . 0)) PhrasingSlur
  c''1~\(( 1 1 1) 1 1\)
}
%%
%%%

Kevin




Re: tie & tag

2019-11-25 Thread Gianmaria Lari
Dear Aaron, you wrote:

 []

> \pushToTag and \appendToTag only work on things that have an elements
> property.  So that means this expression is valid but useless:
>
>  \pushToTag #'here c' \tag #'here g'


I tried to search "Element property" and I found this:

http://lilypond.org/doc/v2.18/Documentation/extending/internal-music-representation


[...]
A compound music expression is a music object that contains other music
objects in its properties. A list of objects can be stored in the elements
property of a music object, or a single ‘child’ music object in the element
property. For example, SequentialMusic has its children in elements, and
GraceMusic has its single argument in element. The body of a repeat is
stored in the element property of RepeatedMusic, and the alternatives in
elements.


So if I understand correctly, the code:

  \pushToTag #'here c' \tag #'here g'


doesn't work because g', that is a single note and not a compound music
expression does not have an element property. That's the reason why this
instead works:

\pushToTag #'here c' \tag #'here {g'}


Because {g'} is a compound music expression and it has an element property.
Could you please confirm?

Thank you, g.


Re: tie & tag

2019-11-25 Thread Gianmaria Lari
Dear Aaron...


> A \tag is not a location per se, but rather it marks the following bit
> of music with some identifier.

[.]

Thanks a lot for  your examples, now it's perfectly clear!

I post here some other examples inspired by your code. I did my best to
write the easiest as possible examples. I hope they will be useful to
others. The best would be to see them beside a screenshot of score
generated (I don't put the screenshot here because of the mailing list
policy).

% appendTag {} examples
\version "2.19.83"
someMusic = \fixed c' {c1 \tag #'first {} c'}
{\someMusic}
{\appendToTag #'first e'4 \appendToTag #'first f' \appendToTag #'first g'
\appendToTag #'first a' \someMusic}
{\appendToTag #'first {e' f' g' a'} \someMusic}

% pushTag {} examples
\version "2.19.83"
someMusic = \fixed c' {c1 \tag #'first {} c'}
{\someMusic}
{\pushToTag #'first e'4 \pushToTag #'first f' \pushToTag #'first g'
\pushToTag #'first a' \someMusic}
{\pushToTag #'first {e'4 f' g' a'} \someMusic}

% appendTag & pushTag {d2 e} examples
\version "2.19.83"
someMusic = \fixed c' {c1 \tag #'first { d2 e} c'1}
{\someMusic}
{\appendToTag #'first f'4 \appendToTag #'first g' \appendToTag #'first a'
\appendToTag #'first b' \someMusic}
{\appendToTag #'first {f' g' a' b'} \someMusic}
{\pushToTag #'first f' \pushToTag #'first g' \pushToTag #'first a'
\pushToTag #'first b' \someMusic}
{\pushToTag #'first {f' g' a' b'} \someMusic}

% appendTag & pushTag <>
\version "2.19.83"
someMusic = \fixed c' {r4 \tag #'first <> r4}
{\someMusic}
{\appendToTag #'first e'2 \appendToTag #'first g' \appendToTag #'first b'
\someMusic}
% {\appendToTag #'first  \someMusic}  % wrong, doesn't compile
% {\appendToTag #'first {e'2 g' b'} \someMusic}  % wrong, doesn't compile
{\pushToTag #'first e'2 \pushToTag #'first g' \pushToTag #'first
b'\someMusic}
% {\pushToTag #'first  \someMusic} % wrong, doesn't compile
% {\pushToTag #'first {e'2 g' b'} \someMusic} % wrong, doesn't compile
{\appendToTag #'first e'2 \appendToTag #'first g'4 \appendToTag #'first b'4
\someMusic}
{\pushToTag   #'first e'2 \pushToTag #'first   g'4  \pushToTag #'first b'4
\someMusic}

% appendTag & pushTag 
\version "2.19.83"
someMusic = \fixed c' {r4 \tag #'first 2 r4}
{\someMusic}
{\appendToTag #'first g' \appendToTag #'first b' \someMusic}
{\pushToTag #'first g' \pushToTag #'first b' \someMusic}

% appendTag & pushTag  others examples
\version "2.19.83"
someMusic = \fixed c' {\tag #'first  \tag #'first  \tag #'first
 \tag #'first <>}
{\someMusic}
{\appendToTag #'first b' \appendToTag #'first d'' \someMusic}
{\pushToTag   #'first b' \pushToTag   #'first d'' \someMusic}

% appendTag & pushTag <<>>
\version "2.19.83"
someMusic = \tag #'here <<>>
{\someMusic} %this doesn't generate any score
\pushToTag #'here {c'2 d'} \pushToTag #'here {e'2 f'} \someMusic
\appendToTag #'here {c'2 d'} \appendToTag #'here {e'2 f'} \someMusic

% appendTag & pushTag <>
\version "2.19.83"
someMusic = \tag #'here <>
{\someMusic}
\pushToTag #'here {c'2 d'} \pushToTag #'here {e'2 f'} \someMusic
\appendToTag #'here {c'2 d'} \appendToTag #'here {e'2 f'} \someMusic


Re: tie & tag

2019-11-22 Thread Aaron Hill

On 2019-11-22 12:49 pm, Gianmaria Lari wrote:

Your code surprise me, so probably I didn't understand how tag do work.
I thought that this

\pushToTag #'here c' \tag #'here { g' }
would be 'converted' to
c' { g' }

[ . . . ]

Could you please give me some hints?


In part, I think the \tag being named #'here is adding to the confusion.

A \tag is not a location per se, but rather it marks the following bit 
of music with some identifier.  It is then this marked music that may be 
modified by subsequent commands.  Consider:



\version "2.19.83"

someMusic = \fixed c' {
  %%pushTo --. .-- appendTo
  %% v v
  c4 d \tag #'first { e f g } a \tag #'second < b d' > c' d'
  %%   ^^
  %%  pushTo --''-- appendTo
}

{
  \cadenzaOn
  \appendToTag #'second \tweak style #'harmonic f''4-2 %% Last
  \appendToTag #'second \tweak style #'cross f''4-1%%  ^
  \pushToTag #'second \tweak style #'harmonic g'4-2%%  |  Order
  \pushToTag #'second \tweak style #'cross g'4-1   %%  |of
  \appendToTag #'first \tweak style #'harmonic g'4-2   %%  |  Appli-
  \appendToTag #'first \tweak style #'cross g'4-1  %%  |  cation
  \pushToTag #'first \tweak style #'harmonic e'4-2 %%  '
  \pushToTag #'first \tweak style #'cross e'4-1%% First
  \someMusic
}


Hopefully my crude ASCII-art above makes it through intact.


-- Aaron Hill

Re: tie & tag

2019-11-22 Thread Gianmaria Lari
On Fri, 22 Nov 2019 at 18:53, Aaron Hill  wrote:

> On 2019-11-22 7:49 am, Gianmaria Lari wrote:
> > I tried (again) with PushToTag with no success. And I don't understand
> > why
> > it doesn't work. Here it is the code:
>
> \pushToTag and \appendToTag only work on things that have an elements
> property.  So that means this expression is valid but useless:
>
>  \pushToTag #'here c' \tag #'here g'
>
> Instead, consider the following variations:
>
> 
> \version "2.19.83"
> \pushToTag #'here c' \tag #'here { g' }
> \pushToTag #'here c' \tag #'here < g' >
> \pushToTag #'here c' \tag #'here << g' >>
> 
>

Your code surprise me, so probably I didn't understand how tag do work.
I thought that this

\pushToTag #'here c' \tag #'here { g' }


would be 'converted' to

c' { g' }


that is not a compound music expression and then should not be compiled. So
if I had write that line of code I would instead wrote:

\pushToTag #'here c' { \tag #'here g' }


I would say the same thing about the other lines of your code that I would
write like this:

\pushToTag #'here c' < \tag #'here g' >
\pushToTag #'here c' << \tag #'here g' >>


Of course I tried your code and works perfectly while my variation doesn't.

Could you please give me some hints?

I will discuss the rest of your mail later after I have studied it.
Thank you, g.

>
>


Re: tie & tag

2019-11-22 Thread Aaron Hill

On 2019-11-22 7:49 am, Gianmaria Lari wrote:
I tried (again) with PushToTag with no success. And I don't understand 
why

it doesn't work. Here it is the code:


\pushToTag and \appendToTag only work on things that have an elements 
property.  So that means this expression is valid but useless:


\pushToTag #'here c' \tag #'here g'

Instead, consider the following variations:


\version "2.19.83"
\pushToTag #'here c' \tag #'here { g' }
\pushToTag #'here c' \tag #'here < g' >
\pushToTag #'here c' \tag #'here << g' >>


Curiously, this means you can use chords as a way to insert post-events 
like the tie, even in version 2.19:



\version "2.19.83"
\include "articulate.ly"
melody = \fixed c' { g8 a \tag #'here  b a \tag #'here  g f }
<< \melody
   \appendToTag #'here ~ \melody
   \articulate \appendToTag #'here ~ \melody >>


Note the above is also \articulate-friendly.

Going back to your code, we could modify it thusly with a few handy 
helpers:



\version "2.19.83"
\include "articulate.ly"

tieHere = \tag #'tieHere \etc
appendTie = \appendToTag #'tieHere ~ \etc

screenOut = \tag #'screenOut \etc
midiOut = \tag #'midiOut \etc
\tagGroup #'(screenOut midiOut)

nc = { \midiOut \tieHere  \screenOut \tieHere  }
nd = { \midiOut \tieHere  \screenOut \tieHere  }
myScore = { \appendTie \nc \nc \nd \nc \appendTie \nd \nd }
\score { << \keepWithTag #'screenOut \myScore
\articulate \keepWithTag #'midiOut \myScore >> }


Mind you, if all you needed was to have MIDI-only notes sprinkled 
throughout, then you can simplify the approach as follows:



\version "2.19.83"
\include "articulate.ly"

tieHere = \tag #'tieHere \etc
appendTie = \appendToTag #'tieHere ~ \etc

midiOnly = \tag #'midiOnly \etc
removeMidiOnly = \removeWithTag #'midiOnly \etc

nc = \tieHere <\midiOnly c c'>
nd = \tieHere <\midiOnly d d'>
myScore = { \appendTie \nc \nc \nd \nc \appendTie \nd \nd }
\score { << \removeMidiOnly \myScore
\articulate \myScore >> }


Note how above we avoid duplicating the c' and d' notes that are to be 
seen and heard.



-- Aaron Hill



Re: tie & tag

2019-11-22 Thread Gianmaria Lari
I tried (again) with PushToTag with no success. And I don't understand why
it doesn't work. Here it is the code:

\version "2.21.00"
\tagGroup #'(screenOut midiOut)
nc = {\tag #'midiOut\tag #'tieTag {} \tag #'screenOut c' }
myScore = {\pushToTag #'tieTag ~ \nc \nc}
\keepWithTag #'screenOut \myScore
\keepWithTag #'midiOut   \myScore


I thought that the previous code would be equivalent to

\keepWithTag #'screenOut \pushToTag #'tieTag ~  {\tag #'midiOut   
\tag #'tieTag {} \tag #'screenOut c' } {\tag #'midiOut\tag
#'tieTag {} \tag #'screenOut c' }
\keepWithTag #'midiOut \pushToTag #'tieTag ~  {\tag #'midiOut\tag
#'tieTag {} \tag #'screenOut c' } {\tag #'midiOut\tag #'tieTag {}
\tag #'screenOut c' }

and then to:

{c' c'}
{~}


Where is my mistake?
Thank you, g.


On Fri, 22 Nov 2019 at 14:01, Gianmaria Lari 
wrote:

> Hello Aaron,
> made some tests and I discovered where are the issues.
>
> Here is our working code (just a bit simplified):
>
> \version "2.21.0"
> \tagGroup #'(screenOut midiOut)
> nc = {\tag #'midiOut\tag #'screenOut c' }
> myScore = {\nc << \nc <>~ >> \nc}
> \keepWithTag #'screenOut \myScore
> \keepWithTag #'midiOut   \myScore
>
> It works as desired (by me). It generates two scores. I attached to this
> email.
>
> Now two issues.
> 1) The code stop to works if I remove the highlighted element from myScore
> = {\nc << \nc <>~ >> \nc}. Here it is the new code
>
>
> \version "2.21.0"
> \tagGroup #'(screenOut midiOut)
> nc = {\tag #'midiOut\tag #'screenOut c' }
> myScore = {<< \nc <>~ >> \nc}
> \keepWithTag #'screenOut \myScore
> \keepWithTag #'midiOut   \myScore
>
>
> I think the issue is related to implicite voice creation but in this
> situation I have not a clear idea how to fix it. Any help?
>
> 2) The code doesn't work with articulate script, it generates a warning
> and the ties disappear (tried with version 2.21.0 and 2.19.83). Here it is
> the code that doesn't work:
>
> \version "2.21.0"
> \include "articulate.ly"
> \tagGroup #'(screenOut midiOut)
> nc = {\tag #'midiOut\tag #'screenOut c' }
> myScore = {\nc {<< \nc <>~ >> \nc}}
> *\articulate *\keepWithTag #'screenOut \myScore
> *\articulate *\keepWithTag #'midiOut   \myScore
>
>
> Is there anything we can do?
>
> Thank you, g.
>
>>


Re: tie & tag

2019-11-22 Thread Gianmaria Lari
Hello Aaron,
made some tests and I discovered where are the issues.

Here is our working code (just a bit simplified):

\version "2.21.0"
\tagGroup #'(screenOut midiOut)
nc = {\tag #'midiOut\tag #'screenOut c' }
myScore = {\nc << \nc <>~ >> \nc}
\keepWithTag #'screenOut \myScore
\keepWithTag #'midiOut   \myScore

It works as desired (by me). It generates two scores. I attached to this
email.

Now two issues.
1) The code stop to works if I remove the highlighted element from myScore
= {\nc << \nc <>~ >> \nc}. Here it is the new code


\version "2.21.0"
\tagGroup #'(screenOut midiOut)
nc = {\tag #'midiOut\tag #'screenOut c' }
myScore = {<< \nc <>~ >> \nc}
\keepWithTag #'screenOut \myScore
\keepWithTag #'midiOut   \myScore


I think the issue is related to implicite voice creation but in this
situation I have not a clear idea how to fix it. Any help?

2) The code doesn't work with articulate script, it generates a warning and
the ties disappear (tried with version 2.21.0 and 2.19.83). Here it is the
code that doesn't work:

\version "2.21.0"
\include "articulate.ly"
\tagGroup #'(screenOut midiOut)
nc = {\tag #'midiOut\tag #'screenOut c' }
myScore = {\nc {<< \nc <>~ >> \nc}}
*\articulate *\keepWithTag #'screenOut \myScore
*\articulate *\keepWithTag #'midiOut   \myScore


Is there anything we can do?

Thank you, g.

>


Re: tie & tag

2019-11-21 Thread Gianmaria Lari
Ciao Aaron, you wrote:


> > Here's something you can do in 2.19.83:
> >
> > 
> > \version "2.19.83"
> >
> > \tagGroup #'(screenOut midiOut)
> > nc = {\tag #'midiOut   \tag #'screenOut c' }
> > nd = {\tag #'midiOut   \tag #'screenOut d' }
> > myScore = {\nc \nd \nc << \nd s~ >> \nd}
> > \score {\keepWithTag #'screenOut \myScore \layout{}}
> > \score {\keepWithTag #'midiOut   \myScore \layout{}}
> > 
>
> And empty chord works in place of the spacer too:
>
> 
> myScore = {\nc \nd \nc << \nd <>~ >> \nd}
> 
>

it works, and it works also on 2.21.00

But it doesn't work in a bit more complex situation. I make some test and I
will be back.
Thanks a lot, g.


Re: tie & tag

2019-11-21 Thread Aaron Hill

On 2019-11-21 3:58 pm, Aaron Hill wrote:

Here's something you can do in 2.19.83:


\version "2.19.83"

\tagGroup #'(screenOut midiOut)
nc = {\tag #'midiOut   \tag #'screenOut c' }
nd = {\tag #'midiOut   \tag #'screenOut d' }
myScore = {\nc \nd \nc << \nd s~ >> \nd}
\score {\keepWithTag #'screenOut \myScore \layout{}}
\score {\keepWithTag #'midiOut   \myScore \layout{}}



And empty chord works in place of the spacer too:


myScore = {\nc \nd \nc << \nd <>~ >> \nd}


-- Aaron Hill



Re: tie & tag

2019-11-21 Thread Aaron Hill

On 2019-11-21 3:11 pm, Gianmaria Lari wrote:

Consider this situation:

\version "2.21.00"
\tagGroup #'(screenOut midiOut)
nc = {\tag #'midiOut   \tag #'screenOut c' }
nd = {\tag #'midiOut   \tag #'screenOut d' }
myScore = {\nc \nd \nc \nd~\nd}
\score {\keepWithTag #'screenOut \myScore \layout{}}
\score {\keepWithTag #'midiOut   \myScore \layout{}} %here should be 
\midi{}


Is there any way to have a tie in the score generated for the screen
(screenOut) and also in the score generated for the midi (midiOut)?
Thank you, g.


Here's something you can do in 2.19.83:


\version "2.19.83"

\tagGroup #'(screenOut midiOut)
nc = {\tag #'midiOut   \tag #'screenOut c' }
nd = {\tag #'midiOut   \tag #'screenOut d' }
myScore = {\nc \nd \nc << \nd s~ >> \nd}
\score {\keepWithTag #'screenOut \myScore \layout{}}
\score {\keepWithTag #'midiOut   \myScore \layout{}}



-- Aaron Hill



Re: tie & tag

2019-11-21 Thread Gianmaria Lari
Consider this situation:

\version "2.21.00"
\tagGroup #'(screenOut midiOut)
nc = {\tag #'midiOut   \tag #'screenOut c' }
nd = {\tag #'midiOut   \tag #'screenOut d' }
myScore = {\nc \nd \nc \nd~\nd}
\score {\keepWithTag #'screenOut \myScore \layout{}}
\score {\keepWithTag #'midiOut   \myScore \layout{}} %here should be \midi{}

Is there any way to have a tie in the score generated for the screen
(screenOut) and also in the score generated for the midi (midiOut)?
Thank you, g.

P.S. I tried using \PushToTag but without success.


Re: tie & tag

2019-11-21 Thread Gianmaria Lari
On Thu, Nov 21, 2019, 5:35 PM David Kastrup  wrote:

> Gianmaria Lari  writes:
>
> > I would expect this code
> >
> >
> > \version "2.21.00"
> > test = {\tag #'first c'
> > \tag #'second e'}
> > \keepWithTag #'first {\test~\test}
> > \keepWithTag #'second {\test~\test}
> >
> > ... generates two scores
> >
> > c~c
> >
> > and
> >
> > e~e
> >
> > but it doesn't! It generates
> >
> > c c
> >
> > and
> >
> > e~e
> >
> > Why no ties in the first score?
>
> Why would there be a tie?  This is:
>
> \keepWithTag #'first {\tag #'first c' \tag #'second e'~ ... }
>

Uhm... Ok. The tie is a postevent attached only to e.

>
> > Any "fix"?
>
> { \keepwithTag #'first \test ~ \keepwithTag #'first \test }
>

No, I can't do like this in the code I have.
But I remember something about push tag that maybe could work.
Now I can't try, I'll do it later and I if I found something useful I'll
post it here.

Thank you David



> --
> David Kastrup
>


Re: tie & tag

2019-11-21 Thread David Kastrup
Gianmaria Lari  writes:

> I would expect this code
>
>
> \version "2.21.00"
> test = {\tag #'first c'
> \tag #'second e'}
> \keepWithTag #'first {\test~\test}
> \keepWithTag #'second {\test~\test}
>
> ... generates two scores
>
> c~c
>
> and
>
> e~e
>
> but it doesn't! It generates
>
> c c
>
> and
>
> e~e
>
> Why no ties in the first score?

Why would there be a tie?  This is:

\keepWithTag #'first {\tag #'first c' \tag #'second e'~ ... }

> Any "fix"?

{ \keepwithTag #'first \test ~ \keepwithTag #'first \test }

-- 
David Kastrup



Re: Tie multiple voice music contained in variable

2019-11-13 Thread Aaron Hill

On 2019-11-13 3:37 am, Gianmaria Lari wrote:

Ciao Aaron,

[]


And you can use tags if you need the tie to be conditional:


\version "2.19.83"

multipleVoiceConditionalTie = \fixed c' {
   << { g4 \tag #'tie a~ \tag #'noTie a } \\ { e2 } >>
}



Yes, I didn't forget tags; but to me they are syntactically difficult 
to
use. I always make million of mistakes before my code compiles 
correctly so

I keep them as a last resort.


Well, it turns out I forgot that \tag can be used as a post-event, which 
means my earlier snippet can be simplified:



\version "2.19.83"

multipleVoiceConditionalTie = \fixed c' {
  << { g4 a-\tag #'tie ~ } \\ { e2 } >>
}
multipleVoiceFollowingPhraseI = \fixed c' {
  << { a2 } \\ { d4 f } >>
}
multipleVoiceFollowingPhraseII = \fixed c' {
  << { a4 b } \\ { f2 } >>
}
multipleVoiceFollowingPhraseIII = \fixed c' {
  << { b2 } \\ { g2 } >>
}

{ \multipleVoiceConditionalTie \multipleVoiceFollowingPhraseI
  \multipleVoiceConditionalTie \multipleVoiceFollowingPhraseII
  \removeWithTag #'tie \multipleVoiceConditionalTie
\multipleVoiceFollowingPhraseIII }


The advantage here is that you do not have to duplicate the final 
note/chord when defining the variable since only the tie itself is 
tagged.  Also, it is not needed to use \keepWithTag since the tie would 
come along for the ride anyway.  So then you only need to use 
\removeWithTag in the case when you want to omit the tie.



-- Aaron Hill



Re: Tie multiple voice music contained in variable

2019-11-13 Thread Gianmaria Lari
Ciao Aaron,

[]

> And you can use tags if you need the tie to be conditional:
>
> 
> \version "2.19.83"
>
> multipleVoiceConditionalTie = \fixed c' {
><< { g4 \tag #'tie a~ \tag #'noTie a } \\ { e2 } >>
> }
>

Yes, I didn't forget tags; but to me they are syntactically difficult to
use. I always make million of mistakes before my code compiles correctly so
I keep them as a last resort.

Thanks a lot!
Ciao, Gianmaria


Re: Tie multiple voice music contained in variable

2019-11-13 Thread Gianmaria Lari
Ciao Harm,


P.S. My apologies if I included the images in the email and not attached it
> it's for clarity. Please let me know if you lilypond email users always
> prefer to attach images at the end of the messages.
>
> Please always attach and use plain text ;)
>

Well, I saw my beard well grown and clearly gray so I hoped it was time to
try again to include images. I'm joking Harm
Ciao, Gianmaria


Re: Tie multiple voice music contained in variable

2019-11-13 Thread Aaron Hill

On 2019-11-13 2:37 am, Aaron Hill wrote:

On 2019-11-13 2:16 am, Gianmaria Lari wrote:

Probably it doesn't exist a simple solution and the best would to keep
the last measure outside the variable.


Embedding the tie within the variable seems to work:


\version "2.19.83"

multipleVoiceWithUnterminatedTie = \fixed c' {
  << { g4 a~ } \\ { e2 } >>
}
multipleVoiceFollowingPhraseI = \fixed c' {
  << { a2 } \\ { d4 f } >>
}
multipleVoiceFollowingPhraseII = \fixed c' {
  << { a4 b } \\ { f2 } >>
}

{ \multipleVoiceWithUnterminatedTie
  \multipleVoiceFollowingPhraseI
  \multipleVoiceWithUnterminatedTie
  \multipleVoiceFollowingPhraseII }



(Fixed typo in quoted code above, which may help with future searches.)

And you can use tags if you need the tie to be conditional:


\version "2.19.83"

multipleVoiceConditionalTie = \fixed c' {
  << { g4 \tag #'tie a~ \tag #'noTie a } \\ { e2 } >>
}

multipleVoiceFollowingPhraseI = \fixed c' {
  << { a2 } \\ { d4 f } >>
}
multipleVoiceFollowingPhraseII = \fixed c' {
  << { a4 b } \\ { f2 } >>
}
multipleVoiceFollowingPhraseIII = \fixed c' {
  << { b2 } \\ { g2 } >>
}

{ \keepWithTag #'tie \multipleVoiceConditionalTie
  \multipleVoiceFollowingPhraseI
  \keepWithTag #'tie \multipleVoiceConditionalTie
  \multipleVoiceFollowingPhraseII
  \keepWithTag #'noTie \multipleVoiceConditionalTie
  \multipleVoiceFollowingPhraseIII }



-- Aaron Hill



Re: Tie multiple voice music contained in variable

2019-11-13 Thread Thomas Morley
Am Mi., 13. Nov. 2019 um 11:17 Uhr schrieb Gianmaria Lari <
gianmarial...@gmail.com>:
P.S. My apologies if I included the images in the email and not attached it
it's for clarity. Please let me know if you lilypond email users always
prefer to attach images at the end of the messages.

Please always attach and use plain text ;)

Cheers,
  Harm

>


Re: Tie multiple voice music contained in variable

2019-11-13 Thread Aaron Hill

On 2019-11-13 2:16 am, Gianmaria Lari wrote:

Probably it doesn't exist a simple solution and the best would to keep
the last measure outside the variable.


Embedding the tie within the variable seems to work:


\version "2.19.83"

multipleVoiceWithUnterimnatedTie = \fixed c' {
  << { g4 a~ } \\ { e2 } >>
}
multipleVoiceFollowingPhraseI = \fixed c' {
  << { a2 } \\ { d4 f } >>
}
multipleVoiceFollowingPhraseII = \fixed c' {
  << { a4 b } \\ { f2 } >>
}

{ \multipleVoiceWithUnterimnatedTie
  \multipleVoiceFollowingPhraseI
  \multipleVoiceWithUnterimnatedTie
  \multipleVoiceFollowingPhraseII }



-- Aaron Hill



Re: Tie multiple voice music contained in variable

2019-11-13 Thread Gianmaria Lari
Michael you gave me the solution! Or at least you gave me the solution for
my simple example. The following works!

\version "2.21.0"
pa = {<< {e'1*~*}\\{c'1*~*}>>}
{ \pa \pa }


Now I have to try in my real file code but I don't see any reason why it
should not work

Thank you!
g.


On Wed, 13 Nov 2019 at 11:16, Gianmaria Lari 
wrote:

>
> On Wed, 13 Nov 2019 at 10:01, Michael Käppler  wrote:
>
>> Hi Gianmaria,
>> Interesting, for me running 2.19.80 the first example does not compile,
>> either.
>>
>
> Yes, I vaguely remember that version 2.21 manage differently
> ties/variable. And probably that was the reason why I decided to use it :)
>
>
>> Was there a recent change regarding post-event handling?
>>
>
> No idea about post-event handling.
>
>
> The problem is that the tie is not a separate expression that you could
>> concatenate with other
>> musical expressions like
>>
> [.]
> Thank you Michael for the explanations!
>
>
>> What are you trying to achieve? Your second example does not make much
>> sense to me,
>> because if you want to tie two equally long notes you would normally use
>> chords []
>>
>
> You're right Michael; to tie two equally long notes I would use a chord.
> But my code was just a very simple example.
>
> Here it is the real situation. My phrase is in a variable. The end of the
> phrase is the following:
>
> [image: image.png]
> and that should be connected once with this
>
> [image: image.png]
>
> and once with this
> [image: image.png]
>
> Probably it doesn't exist a simple solution and the best would to keep the
> last measure outside the variable.
> Thank you Michael!!
>
> P.S. My apologies if I included the images in the email and not attached
> it it's for clarity. Please let me know if you lilypond email users always
> prefer to attach images at the end of the messages.
>


Re: Tie multiple voice music contained in variable

2019-11-13 Thread Gianmaria Lari
On Wed, 13 Nov 2019 at 10:01, Michael Käppler  wrote:

> Hi Gianmaria,
> Interesting, for me running 2.19.80 the first example does not compile,
> either.
>

Yes, I vaguely remember that version 2.21 manage differently ties/variable.
And probably that was the reason why I decided to use it :)


> Was there a recent change regarding post-event handling?
>

No idea about post-event handling.


The problem is that the tie is not a separate expression that you could
> concatenate with other
> musical expressions like
>
[.]
Thank you Michael for the explanations!


> What are you trying to achieve? Your second example does not make much
> sense to me,
> because if you want to tie two equally long notes you would normally use
> chords []
>

You're right Michael; to tie two equally long notes I would use a chord.
But my code was just a very simple example.

Here it is the real situation. My phrase is in a variable. The end of the
phrase is the following:

[image: image.png]
and that should be connected once with this

[image: image.png]

and once with this
[image: image.png]

Probably it doesn't exist a simple solution and the best would to keep the
last measure outside the variable.
Thank you Michael!!

P.S. My apologies if I included the images in the email and not attached it
it's for clarity. Please let me know if you lilypond email users always
prefer to attach images at the end of the messages.


Re: Tie multiple voice music contained in variable

2019-11-13 Thread Michael Käppler

Hi Gianmaria,
Interesting, for me running 2.19.80 the first example does not compile,
either.
Was there a recent change regarding post-event handling?

The problem is that the tie is not a separate expression that you could 
concatenate with other
musical expressions like

bla = { e'1 }
foo = { ~ }
bar = { e'2 }

{ \bla \foo \bar }

(AFAIK with 2.19.x, not sure for more recent versions)
Instead it is a post-event which is internally added to the
'articulations property of the NoteEvent to which the tie belongs.
Compare:

\version "2.19.80"

foo = {
  e'1 ~
}

bar = {
  e'1
}

\displayMusic \foo
\displayMusic \bar

What are you trying to achieve? Your second example does not make much
sense to me,
because if you want to tie two equally long notes you would normally use
chords for it I think:

foo = {
  1 ~ q1
}

{ \foo }

Of course you could do:

foo = {
  1~
}

bar = {
  1
}

{ \foo \bar }

Have a nice day,
Michael

Am 13.11.2019 um 08:38 schrieb Gianmaria Lari:

The following code containing a tie between variables, compiles and
works perfectly:

\version "2.21.0"
pa = {e'1}
*{ \pa~\pa } * %here is the tie!


Is there any way to do the same in case the variable contains two
voices like in the following code?

\version "2.21.0"
pa = {<< {e'1}\\{c'1}>>}
{ \pa~ \pa } %this does not compile


Thank you, g.





Re: tie four 8 note to 4 chord

2019-05-18 Thread MING TSANG
 Stefano & Andrew:
Thank you for the solution and explanation. 
Thanks,Ming.
On Saturday, May 18, 2019, 11:00:41 a.m. EDT, Stefano Troncaro 
 wrote:  
 
 Hi Ming, it depends on the music you are working with and your preference. I 
personally have it set to ##t as my personal default. I don't see the downside 
to having it turned on: if this happens often in your music it's cumbersome to 
keep setting and resetting it, and I also find that it helps to instantly spot 
input mistakes (if you have a tie flying all the way through your score you 
know you messed up somewhere).
Hope that helps,Stéfano

El vie., 17 may. 2019 a las 11:59, MING TSANG () escribió:

 Andrew:
Thank you very much.
Once the tieWaitForNote = ##t is set, it continues to work. Is this the 
intention?  Is it necessary to reset to it's default?
Thanks,Ming 
On Thursday, May 16, 2019, 7:41:14 p.m. EDT, Andrew Bernard 
 wrote:  
 
 Hi Ming,
\set tieWaitForNote = ##t
It's in the Notation Reference manual.
Andrew

  ___
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: tie four 8 note to 4 chord

2019-05-18 Thread Stefano Troncaro
Hi Ming, it depends on the music you are working with and your preference.
I personally have it set to ##t as my personal default. I don't see the
downside to having it turned on: if this happens often in your music it's
cumbersome to keep setting and resetting it, and I also find that it helps
to instantly spot input mistakes (if you have a tie flying all the way
through your score you know you messed up somewhere).

Hope that helps,
Stéfano

El vie., 17 may. 2019 a las 11:59, MING TSANG ()
escribió:

> Andrew:
>
> Thank you very much.
>
> Once the tieWaitForNote = ##t is set, it continues to work. Is this the
> intention?  Is it necessary to reset to it's default?
>
> Thanks,
> Ming
>
> On Thursday, May 16, 2019, 7:41:14 p.m. EDT, Andrew Bernard <
> andrew.bern...@gmail.com> wrote:
>
>
> Hi Ming,
>
> \set tieWaitForNote = ##t
>
> It's in the Notation Reference manual.
>
> Andrew
>
>
> ___
> 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: tie four 8 note to 4 chord

2019-05-17 Thread MING TSANG
 Andrew:
Thank you very much.
Once the tieWaitForNote = ##t is set, it continues to work. Is this the 
intention?  Is it necessary to reset to it's default?
Thanks,Ming 
On Thursday, May 16, 2019, 7:41:14 p.m. EDT, Andrew Bernard 
 wrote:  
 
 Hi Ming,
\set tieWaitForNote = ##t
It's in the Notation Reference manual.
Andrew

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


Re: tie four 8 note to 4 chord

2019-05-16 Thread Andrew Bernard
Hi Ming,

\set tieWaitForNote = ##t

It's in the Notation Reference manual.

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


Re: tie

2019-01-21 Thread Valentin Villenave
On 1/21/19, Gianmaria Lari  wrote:
> Is there any simple way to tie the last note contained in a variable?
> Here it is an example (that doesn't work).

It doesn’t work _yet_, but it will with the upcoming 2.21 release.
(You may already build a pre-release from the source code, but it’s a
bit technical. What’s your operating system?)

Cheers,
V.

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


Re: Tie minimum length

2019-01-18 Thread David Kastrup
David Kastrup  writes:

> Andrew Bernard  writes:

[...]

>> Is this a mistake in the manual for the name?
>
> Yes and no.
>
> dak@lola:/usr/local/tmp/lilypond$ git grep min-length
> Documentation/included/font-table.ly:   (define (min-length lst n)
> Documentation/included/font-table.ly:(1+ (min-length (cdr lst) (1- n)
> Documentation/included/font-table.ly: (let* ((n (min-length names 2))
> Documentation/misc/ChangeLog-2.10:  sliding score for min-length.
> lily/tie-details.cc:  min_length_ = get_real_detail ("min-length", 1.0);
> lily/tie-details.cc: min_length_penalty_factor_ = get_real_detail
> ("min-length-penalty-factor", 1.0);
> lily/tie.cc:   "@item min-length\n"
> lily/tie.cc:   "@item min-length-penalty-factor\n"
> lily/tie.cc:   " @code{min-length}.\n"
> scm/define-grobs.scm:(min-length-penalty-factor . 26)
>
> Part of the code uses it but it is not properly defined.  It's not as
> much a "mistake in the manual" as completely broken code.

Ah, Trevor explained it.  I should have looked more carefully: my
statement is wrong.

-- 
David Kastrup

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


Re: Tie minimum length

2019-01-18 Thread Trevor




Andrew, you wrote 18/01/2019 14:19:08
Subject: Tie minimum length


The NR for 2.19.82 in section 3.2.128 'tie interface' states:

I think you mean the IR.


min-length
If the tie is shorter than this amount (in staff-spaces) an 
increasingly large length penalty is incurred.


But if I use this an error is thrown. Using minimum-length works fine.

warning: cannot find property type-check for `min-length' 
(backend-type?). perhaps a typing error?


warning: skipping assignment

Is this a mistake in the manual for the name?


No. min-length is a property in the details list.  It must be set like 
this:


  \override Tie.details.min-length = ...

However, it doesn't do what you expect - it merely feeds into the length 
penalty.


To specify a minimum length for the tie you should use minimum-length, 
as you discovered.

This is defined in the spanner-interface, used by Tie.

Trevor


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


Re: Tie minimum length

2019-01-18 Thread David Kastrup
Andrew Bernard  writes:

> The NR for 2.19.82 in section 3.2.128 'tie interface' states:
>
> min-length
> If the tie is shorter than this amount (in staff-spaces) an increasingly
> large length penalty is incurred.
>
> But if I use this an error is thrown. Using minimum-length works fine.
>
> warning: cannot find property type-check for `min-length' (backend-type?).
> perhaps a typing error?
>
> warning: skipping assignment
>
>
>
> Is this a mistake in the manual for the name?

Yes and no.

dak@lola:/usr/local/tmp/lilypond$ git grep min-length
Documentation/included/font-table.ly:   (define (min-length lst n)
Documentation/included/font-table.ly:(1+ (min-length (cdr lst) (1- n)
Documentation/included/font-table.ly: (let* ((n (min-length names 2))
Documentation/misc/ChangeLog-2.10:  sliding score for min-length.
lily/tie-details.cc:  min_length_ = get_real_detail ("min-length", 1.0);
lily/tie-details.cc:  min_length_penalty_factor_ = get_real_detail 
("min-length-penalty-factor", 1.0);
lily/tie.cc:   "@item min-length\n"
lily/tie.cc:   "@item min-length-penalty-factor\n"
lily/tie.cc:   " @code{min-length}.\n"
scm/define-grobs.scm:(min-length-penalty-factor . 26)

Part of the code uses it but it is not properly defined.  It's not as
much a "mistake in the manual" as completely broken code.

-- 
David Kastrup

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


RE: tie across voices

2018-12-23 Thread Mark Stephen Mrotek
Timothy,

Thank you, exactly what I wanted.

Mark
-Original Message-
From: lilypond-user
[mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of
Timothy Lanfear
Sent: Sunday, December 23, 2018 2:07 PM
To: lilypond-user@gnu.org
Subject: Re: tie across voices

On 23/12/2018 21:35, Mark Stephen Mrotek wrote:
>
> Hello,
>
> Please see attached snippet.
>
> In measure 3 the two e flats should be tied.
>
> I have looked at using transparent as given in
>
> http://lsr.di.unimi.it/LSR/Snippet?id=8
>
> yet that would “collide” with the quarter rest.
>
> Any suggestions would be greatly appreciated.
>
>
How about this?

\version "2.19.81"

{
   \time 6/8
   \clef "bass"
   <<
     \new Voice \relative c {
   \voiceOne
   bes8-5 bes'-1 d-2~ d8 c-1 bes-2 |
   c4. r4 f,8-2 |
   g4. s4.
   d4. s |
     }
     \new Voice \relative c' {
   \voiceTwo
   s4. r4 g8-4~ |
   g f-5 aes-2~ aes g-1 d-4~ |
   d c ees-3^~ \stemUp ees8 d^1 c^2 \stemNeutral  |
     }
     \new Voice \relative c {
   \voiceFour
   s2.*2 |
   s4. r4 a8-4~ |
   a g bes'-1~ bes a-2 g-3 |
     }
   >>
}

\relative c' {
   \time 6/8
   \clef bass
   <<
     {
   bes,8-5 bes'-1 d-2~ d8 c-1 bes-2 |
   c4. r4 f,8-2 | g4. ees8 d-1 c-2 | d4. s |
     } \\
     {
   s4. r4 g8-4~ |
   g f-5 aes-2~ aes g-1 d-4~ |
   d c ees-3  r4 a,8-4~ |
   a g bes'-1~ bes a-2 g-3 |
     }
   >>
}


-- 
Timothy Lanfear, Bristol, UK.


___
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: tie across voices

2018-12-23 Thread Mark Stephen Mrotek
Jay,

 

Beautiful, and it preserves the voice leading!

Thank you!

 

Mark

 

From: Jay Anderson [mailto:horndud...@gmail.com] 
Sent: Sunday, December 23, 2018 3:11 PM
To: Mark Stephen Mrotek 
Cc: lilypond-user 
Subject: Re: tie across voices

 

On Sun, Dec 23, 2018 at 2:40 PM Mark Stephen Mrotek mailto:carsonm...@ca.rr.com> > wrote:

Please see attached snippet.

In measure 3 the two e flats should be tied.

I have looked at using transparent as given in 

http://lsr.di.unimi.it/LSR/Snippet?id=8

yet that would “collide” with the quarter rest.

 

My favorite way to deal with this is to switch the voices.

 

=

\score {

  \relative c' {

\time 6/8

\clef bass

<<

  \new Voice {

\voiceOne

bes,8-5 bes'-1 d-2~ d8 c-1 bes-2 |

c4. r4 f,8-2 |

g4.

\voiceTwo

r4 a,8-4~ |

a g bes'-1~ bes a-2 g-3 |

  }

  \new Voice {

\voiceTwo

s4. r4 g8-4~ |

g f-5 aes-2~ aes g-1 d-4~ |

d c ees-3~

\voiceOne

ees8 d-1 c-2 |

d4. s |

  }

>>

\oneVoice

  }

}

=

 

There's also the spanner-id, but I don't believe that works for ties.

 

-Jay

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


Re: tie across voices

2018-12-23 Thread Jay Anderson
On Sun, Dec 23, 2018 at 2:40 PM Mark Stephen Mrotek 
wrote:

> Please see attached snippet.
>
> In measure 3 the two e flats should be tied.
>
> I have looked at using transparent as given in
>
> http://lsr.di.unimi.it/LSR/Snippet?id=8
>
> yet that would “collide” with the quarter rest.
>

My favorite way to deal with this is to switch the voices.

=
\score {
  \relative c' {
\time 6/8
\clef bass
<<
  \new Voice {
\voiceOne
bes,8-5 bes'-1 d-2~ d8 c-1 bes-2 |
c4. r4 f,8-2 |
g4.
\voiceTwo
r4 a,8-4~ |
a g bes'-1~ bes a-2 g-3 |
  }
  \new Voice {
\voiceTwo
s4. r4 g8-4~ |
g f-5 aes-2~ aes g-1 d-4~ |
d c ees-3~
\voiceOne
ees8 d-1 c-2 |
d4. s |
  }
>>
\oneVoice
  }
}
=

There's also the spanner-id, but I don't believe that works for ties.

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


Re: tie across voices

2018-12-23 Thread Timothy Lanfear

On 23/12/2018 21:35, Mark Stephen Mrotek wrote:


Hello,

Please see attached snippet.

In measure 3 the two e flats should be tied.

I have looked at using transparent as given in

http://lsr.di.unimi.it/LSR/Snippet?id=8

yet that would “collide” with the quarter rest.

Any suggestions would be greatly appreciated.



How about this?

\version "2.19.81"

{
  \time 6/8
  \clef "bass"
  <<
    \new Voice \relative c {
  \voiceOne
  bes8-5 bes'-1 d-2~ d8 c-1 bes-2 |
  c4. r4 f,8-2 |
  g4. s4.
  d4. s |
    }
    \new Voice \relative c' {
  \voiceTwo
  s4. r4 g8-4~ |
  g f-5 aes-2~ aes g-1 d-4~ |
  d c ees-3^~ \stemUp ees8 d^1 c^2 \stemNeutral  |
    }
    \new Voice \relative c {
  \voiceFour
  s2.*2 |
  s4. r4 a8-4~ |
  a g bes'-1~ bes a-2 g-3 |
    }
  >>
}

\relative c' {
  \time 6/8
  \clef bass
  <<
    {
  bes,8-5 bes'-1 d-2~ d8 c-1 bes-2 |
  c4. r4 f,8-2 | g4. ees8 d-1 c-2 | d4. s |
    } \\
    {
  s4. r4 g8-4~ |
  g f-5 aes-2~ aes g-1 d-4~ |
  d c ees-3  r4 a,8-4~ |
  a g bes'-1~ bes a-2 g-3 |
    }
  >>
}


--
Timothy Lanfear, Bristol, UK.


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


Re: tie across voices

2018-12-23 Thread Aaron Hill

On 2018-12-23 1:35 pm, Mark Stephen Mrotek wrote:

In measure 3 the two e flats should be tied.

I have looked at using transparent as given in

http://lsr.di.unimi.it/LSR/Snippet?id=8

yet that would "collide" with the quarter rest.

Any suggestions would be greatly appreciated.


It's not perfect, but \laissezVibrer (instead of ~) on the first E flat 
might work.


-- Aaron Hill

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


RE: Tie and ornaments problem

2018-11-19 Thread Mark Stephen Mrotek
Ethan Sue

 

Suggestion here

http://lilypond.org/doc/v2.19/Documentation/notation/expressive-marks-attached-to-notes

Scroll down to “delayed turn.”

 

Mark

 

From: lilypond-user [mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] 
On Behalf Of Ethan Sue
Sent: Monday, November 19, 2018 1:39 PM
To: lilypond-user@gnu.org
Subject: Tie and ornaments problem

 

I am trying to write something in lilypond and came across this part that I 
can't figure out how to notate.

What I would like to make is D1 with a prallmordent and then a delayed turn 
tied to another D1. 

My problem is that I can't get both the prallmordent and delayed turn outside 
the tie, which I want.

Thanks, 

Ethan

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


Re: Tie and ornaments problem

2018-11-19 Thread Pierre Perol-Schneider
A simple image could also help...
Cheers,
Pierre

Le lun. 19 nov. 2018 à 23:46, Andrew Bernard  a
écrit :

> Hi, MWE please. Then much easier to demonstrate in your context.
>
> Andrew
>
>
> On Tue, 20 Nov 2018 at 08:40, Ethan Sue  wrote:
>
>> I am trying to write something in lilypond and came across this part that
>> I can't figure out how to notate.
>> What I would like to make is D1 with a prallmordent and then a delayed
>> turn tied to another D1.
>> My problem is that I can't get both the prallmordent and delayed turn
>> outside the tie, which I want.
>> Thanks,
>> Ethan
>> ___
>> 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
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Tie and ornaments problem

2018-11-19 Thread Andrew Bernard
Hi, MWE please. Then much easier to demonstrate in your context.

Andrew


On Tue, 20 Nov 2018 at 08:40, Ethan Sue  wrote:

> I am trying to write something in lilypond and came across this part that
> I can't figure out how to notate.
> What I would like to make is D1 with a prallmordent and then a delayed
> turn tied to another D1.
> My problem is that I can't get both the prallmordent and delayed turn
> outside the tie, which I want.
> Thanks,
> Ethan
> ___
> 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: Tie shape inside chords: Inconsistent compilation

2018-10-26 Thread Pierre Perol-Schneider
Great! Thank you very much Harm,
Cheers,
Pierre

Le ven. 26 oct. 2018 à 16:13, Thomas Morley  a
écrit :

> Am Fr., 26. Okt. 2018 um 15:41 Uhr schrieb Pierre Perol-Schneider
> :
> >
> > Hi,
> > Please consider the following example:
> >
> > %%
> > \version "2.19.82"
> > music =
> > \fixed c' {
> >   \time 3/8
> >   \voiceOne
> >   4. q
> > }
> > { \music } { \music } { \music }
> > %%
> >
> > After trying several compilation, sometimes the shape command is
> applied, sometimes not.
> > I've found multiple workarounds in the past messages since this problem
> seems to be related to a known tie bug. However none of them seem to work
> in the piece I'm working on.
> > Any idea?
> > TIA, Cheers,
> > Pierre
>
> Hi Pierre,
>
> LilyPond puts in-chord Ties in a TieColumn and performs her own thingy
> according to the procedure 'positioning-done is set to, probably
> dropping a user input for \shape.
> Imho, best you can do is: set positioning-done #t, meaning: "Dear
> LilyPond, don't bother about positioning the Ties, _I_ will do it."
> Ofcourse you _should_ do then. :)
> I.e. the Ties needs a direction. In your example it's done by
> \voiceOne, you could use direction-modifiers ^/_ as well.
> Now apply \shape where you want.
>
> Example with some crazy values:
>
> music =
> \fixed c' {
>   \time 3/8
>   g'-\shape #'((0 . 0) (0 . 0) (1 . 0) (-2 . 2)) ^~
>   >4.
>   \once \override TieColumn.positioning-done = ##t
>   q
> }
> { \music } { \music } { \music }
>
> HTH,
>   Harm
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Tie shape inside chords: Inconsistent compilation

2018-10-26 Thread Thomas Morley
Am Fr., 26. Okt. 2018 um 15:41 Uhr schrieb Pierre Perol-Schneider
:
>
> Hi,
> Please consider the following example:
>
> %%
> \version "2.19.82"
> music =
> \fixed c' {
>   \time 3/8
>   \voiceOne
>   4. q
> }
> { \music } { \music } { \music }
> %%
>
> After trying several compilation, sometimes the shape command is applied, 
> sometimes not.
> I've found multiple workarounds in the past messages since this problem seems 
> to be related to a known tie bug. However none of them seem to work in the 
> piece I'm working on.
> Any idea?
> TIA, Cheers,
> Pierre

Hi Pierre,

LilyPond puts in-chord Ties in a TieColumn and performs her own thingy
according to the procedure 'positioning-done is set to, probably
dropping a user input for \shape.
Imho, best you can do is: set positioning-done #t, meaning: "Dear
LilyPond, don't bother about positioning the Ties, _I_ will do it."
Ofcourse you _should_ do then. :)
I.e. the Ties needs a direction. In your example it's done by
\voiceOne, you could use direction-modifiers ^/_ as well.
Now apply \shape where you want.

Example with some crazy values:

music =
\fixed c' {
  \time 3/8
  4.
  \once \override TieColumn.positioning-done = ##t
  q
}
{ \music } { \music } { \music }

HTH,
  Harm

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


Re: tie with manual repeat

2018-10-05 Thread Gianmaria Lari
It works! Thank you Aaron!
g.

On Fri, 5 Oct 2018 at 11:08, Aaron Hill  wrote:

> On 2018-10-05 2:03 am, Gianmaria Lari wrote:
> > I have the following code
> >
> > \version "2.19.82"
> > \fixed c' {
> >   a1~
> >   \set Score.repeatCommands = #'((volta "1")) a2 b2 \set
> > Score.repeatCommands = #'((volta #f))
> >   \set Score.repeatCommands = #'((volta "2")) a1^"Fine" \set
> > Score.repeatCommands = #'((volta #f)) \bar "|."
> >   c1 _"Da capo al Fine" \bar ":|."
> > }
> >
> > with this output
> >
> > [image: image.png]
> >
> > How can I make a tie also on the "a" in the second alternative?
> > Thank you, g.
>
> You just need to append \repeatTie to the note in question.
>
> -- Aaron Hill
>
> ___
> 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: tie with manual repeat

2018-10-05 Thread Aaron Hill

On 2018-10-05 2:03 am, Gianmaria Lari wrote:

I have the following code

\version "2.19.82"
\fixed c' {
  a1~
  \set Score.repeatCommands = #'((volta "1")) a2 b2 \set
Score.repeatCommands = #'((volta #f))
  \set Score.repeatCommands = #'((volta "2")) a1^"Fine" \set
Score.repeatCommands = #'((volta #f)) \bar "|."
  c1 _"Da capo al Fine" \bar ":|."
}

with this output

[image: image.png]

How can I make a tie also on the "a" in the second alternative?
Thank you, g.


You just need to append \repeatTie to the note in question.

-- Aaron Hill

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


Re: tie direction !?

2018-07-27 Thread Torsten Hämmerle
David Kastrup wrote
> Can be a memory-order thing.  When two things compare equal, their final
> order of decisions can depend just on which choice happened to get a
> location lower in memory.  In that case, the results need not even be
> deterministic given identical scores on the same platform with the same
> program.

Possibly yes.  On the other hand, this never seem to happen if the exact
same situation is being moved away from Y-offset 0 (the middle line).

I think it'd be favourable in any case to have a well-defined tie direction
in these neutral cases, i.e. pointing away from the neutral stem direction. 
Tie.neutral-direction gives the impression to determine the tie direction in
neutral/undecided cases, but it obviously doesn't.

As Harm said, explicitly setting the tie direction is very unsatisfactory at
least if transposing instruments are concerned.

Isn't that a case for the issue tracker? "Unambiguously respect
Tie.neutral-direction"?

All the best,
Torsten




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: tie direction !?

2018-07-27 Thread David Kastrup
Torsten Hämmerle  writes:

> Thomas Morley-2 wrote
>> I already thought creating a function for setting tie-direction, _iff_
>> the notes are on the middle line, probably taking stem-direction into
>> account. It would give me more flexibility, though ofcourse the
>> considerations mentioned above are still valid.
>
> Actually, the C++ coding does take the stem directions of the tied notes
> into account, but in our cases, they point in opposite direction and so any
> tie direction will be equally good or bad.
>
>
>
> Thomas Morley-2 wrote
>> Obviously it has something to do with the notes being on the
>> middle-line, so I tried the some inconsistent behaviour with notes on
>> other lines in order to get more info/insight. Without success so far
>
> Yes, that's why I claimed this strange effect only happens for middle-line
> ties.
>
> The up/down decision seems to be fragile as hell.
>
> As it's a centre-line (i.e. Y-offset = #0) problem, this reminds me of
> numeric rounding errors (inaccuracies): sometimes, the result is < 0,
> sometimes it's > 0, but always very close to 0.

Can be a memory-order thing.  When two things compare equal, their final
order of decisions can depend just on which choice happened to get a
location lower in memory.  In that case, the results need not even be
deterministic given identical scores on the same platform with the same
program.

-- 
David Kastrup

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


Re: tie direction !?

2018-07-27 Thread Torsten Hämmerle
Thomas Morley-2 wrote
> I already thought creating a function for setting tie-direction, _iff_
> the notes are on the middle line, probably taking stem-direction into
> account. It would give me more flexibility, though ofcourse the
> considerations mentioned above are still valid.

Actually, the C++ coding does take the stem directions of the tied notes
into account, but in our cases, they point in opposite direction and so any
tie direction will be equally good or bad.



Thomas Morley-2 wrote
> Obviously it has something to do with the notes being on the
> middle-line, so I tried the some inconsistent behaviour with notes on
> other lines in order to get more info/insight. Without success so far

Yes, that's why I claimed this strange effect only happens for middle-line
ties.

The up/down decision seems to be fragile as hell.

As it's a centre-line (i.e. Y-offset = #0) problem, this reminds me of
numeric rounding errors (inaccuracies): sometimes, the result is < 0,
sometimes it's > 0, but always very close to 0.



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: tie direction !?

2018-07-27 Thread Thomas Morley
2018-07-27 1:02 GMT+02:00 Torsten Hämmerle :
> Simon Albrecht-2 wrote
>> The most sensible solution to me seems to be for Tie to use the
>> neutral-direction property and heed it in such cases, overriding the
>> direction if it is set.
>
> Using Harm's example, setting Tie.neutral-direction to #DOWN will just flip
> everything around.
> Then, the first tie is up and the second tie is down.
>
> All this only happens for opposite stem directions and tied notes on the
> middle stave line, everything is quite unpredictable and the slightest
> change in spacing etc. may flip a tie to any direction.
>
> Robert's code will react very sensitive to changes like
>\override Tie.details.note-head-gap = …
> When just changing this from standard #0.2 to #0.20001, the first tie will
> change its direction.
>
> Perhaps some penalty calculations yield nearly identical results for
> different tie directions so that the slightest environmental change may
> result in a tie direction change.
>
> All the best,
> Torsten


I stumbled across it while transposing a flute-part for alto-flute.

While it's trivial to set tie-direction manually, I'd prefer not to do
so, because it may be wrong after some other transposing or in
polyphonic situations or using partombine and the like.
I already thought creating a function for setting tie-direction, _iff_
the notes are on the middle line, probably taking stem-direction into
account. It would give me more flexibility, though ofcourse the
considerations mentioned above are still valid.

Obviously it has something to do with the notes being on the
middle-line, so I tried the some inconsistent behaviour with notes on
other lines in order to get more info/insight. Without success so far


Most likely Torsten's guess is correct.
Thus I tried
\override Tie.details.horizontal-distance-penalty-factor = 50
which indeed gives consisten behaviout (if other details-properties
are unchanged), the tie doesn't look as nice as before, though.




Thanks,
  Harm

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


Re: tie direction !?

2018-07-26 Thread Torsten Hämmerle
Simon Albrecht-2 wrote
> The most sensible solution to me seems to be for Tie to use the 
> neutral-direction property and heed it in such cases, overriding the 
> direction if it is set.

Using Harm's example, setting Tie.neutral-direction to #DOWN will just flip
everything around.
Then, the first tie is up and the second tie is down.

All this only happens for opposite stem directions and tied notes on the
middle stave line, everything is quite unpredictable and the slightest
change in spacing etc. may flip a tie to any direction.

Robert's code will react very sensitive to changes like
   \override Tie.details.note-head-gap = …
When just changing this from standard #0.2 to #0.20001, the first tie will
change its direction.

Perhaps some penalty calculations yield nearly identical results for
different tie directions so that the slightest environmental change may
result in a tie direction change.

All the best,
Torsten



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: tie direction !?

2018-07-26 Thread Simon Albrecht
The most sensible solution to me seems to be for Tie to use the 
neutral-direction property and heed it in such cases, overriding the 
direction if it is set.


Best, Simon


On 26.07.2018 13:34, Robert Schmaus wrote:

Might be the same thing as here:

http://lilypond.1069038.n5.nabble.com/Curious-thing-about-ties-td196616.html

On 26 Jul 2018, at 12:37, Thomas Morley > wrote:



Hi,

please consider the following example:

\version "2.19.82"

\relative c'' {
 f,1
 r4 b~ b8 a b4~
 b8 a b2.
 \repeat unfold 8 f8
}

The ties have different directions.
If you change the example a little bit you may (or may not) get equal
directions.

Where does it comes from?
Or wit different wording, what are the conditions for the tie's
direction applying here?

Thanks,
 Harm

___
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



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


Re: tie direction !?

2018-07-26 Thread Robert Schmaus
Might be the same thing as here:

http://lilypond.1069038.n5.nabble.com/Curious-thing-about-ties-td196616.html

> On 26 Jul 2018, at 12:37, Thomas Morley  wrote:
> 
> Hi,
> 
> please consider the following example:
> 
> \version "2.19.82"
> 
> \relative c'' {
>  f,1
>  r4 b~ b8 a b4~
>  b8 a b2.
>  \repeat unfold 8 f8
> }
> 
> The ties have different directions.
> If you change the example a little bit you may (or may not) get equal
> directions.
> 
> Where does it comes from?
> Or wit different wording, what are the conditions for the tie's
> direction applying here?
> 
> Thanks,
>  Harm
> 
> ___
> 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: {SPAM 04.7} Re: {SPAM 01.9} Re: Tie across voices

2018-05-05 Thread David Kastrup
David Sumbler  writes:

> The automatic creation of contexts is obviously very useful, especially
> when one is just a beginner at Lilypond.  But I almost wish that there
> were an option to turn it off, which would be useful for forcing
> oneself to understand how this all actually works!

If there are no contexts created automatically, the user has to
accommodate every element and relation of the context hierarchy.  That
makes stuff like introducing intermediate contexts into the hierarchy
much harder than it should be.

-- 
David Kastrup

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


Re: {SPAM 04.7} Re: {SPAM 01.9} Re: Tie across voices

2018-05-05 Thread David Sumbler
On Fri, 2018-05-04 at 23:55 +0200, Simon Albrecht wrote:
> On 04.05.2018 19:23, David Sumbler wrote:
> > 
> > It seems that if, in a
> > <<{\musicA} {\musicB}>>
> > passage, \musicA does not specify a new Voice, then the music
> > before
> > the << >> passage and, importantly, also the music afterwards will
> > all
> > be treated as belonging to the same voice.  Is that correct?
> Have a look at this example:
> 
> 
> \version "2.19.80"
> 
> <<
>    c
>    c
>  >>
> 
> \new Staff
> <<
>    c
>    c
>  >>
> 
> \new Staff
> <<
>    c
>    \\
>    c
>  >>
> 
> \new Staff
> \new Voice
> <<
>    c
>    c
>  >>
> 
> 
> resulting in the attached output.
> <<>> just combines music expressions simultaneously. Depending on
> which 
> contexts are explicitly created, separate implicit contexts will be 
> created or not.
> 
> Best,
> Simon

I have always found the implicit creation of contexts etc. rather
confusing, which is why I have been inclined to define the higher
elements of the structure explicitly.  I used even to have completely
unnecessary \bookpart-s etc. but I try to avoid that sort of thing now.
 On the other hand, I suppose I have rather tended to take the implicit
creation of Voices for granted.  Especially in the light of your
example, I am starting to think that perhaps I should make it a policy
always to define Voices explicitly.

As it is, I found your example quite hard to understand, and I dare say
I am not alone in that.  However, having experimented with it quite a
bit, I now see (I think) that:

Example 1: here the << informs Lilypond that what follows is music, but
the Staff and Voice themselves are created by each of the simultaneous
'c's, which otherwise have nowhere to go.

Example 2: here a Staff has already been created, so the simultaneous
notes already have somewhere to go and therefore appear on to the same
Staff.  I think that they each individually create a voice, since they
have separate stems and because of the warning that Lilypond gives.
 Both voices seem to have voiceOne style, presumably since nothing else
has been specified; Lilypond is therefore protesting about the
resulting collision.

Example 3: The << \\ >> construct causes each of the simultaneous notes
to have its own voice, specifically voiceOne and voiceTwo.  If I add
another \\ section the contents go into voiceThree etc.  Is that
correct?

Example 4: Here a voice is explicitly defined, and therefore Lilypond
understands that the simultaneous notes both have to go into that one
voice, rather than creating new ones: hence the doubled notehead on a
single stem.  If I add a third note at the same pitch, no more
noteheads are produced, but surprisingly Lilypond does not give a
warning.

Have I understood all of this correctly?  Sorry if this all seems
elementary, especially since I have been using Lilypond on and off for
several years.

The automatic creation of contexts is obviously very useful, especially
when one is just a beginner at Lilypond.  But I almost wish that there
were an option to turn it off, which would be useful for forcing
oneself to understand how this all actually works!

David

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


  1   2   3   4   >