Peculiar behavior of barlines

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Peculiar behavior of barlines

Sami Amiris
Hello all.

I would like the barlines that span both staves (not the barlines in each
individual staff alone) at the middle of the line to have the same behaviour
at the next end (to the right) and the start of the line below at the very
left. In other words, A1, A2 and A3 should all be the same as A1, likewise
for the B's and C's in the example provided- at least I think so. Currently
this doesn't happen. Is it possible?

http://lilybin.com/soj3yd/2 <http://lilybin.com/soj3yd/2>  

In general, bottom staff wins at A2 and A3 (and B's and C's accordingly),
overriding the middle inter-staff portion of the barlines which shows nicely
at A1. Any remedy?

Also, can the single barline be aligned with the second line of the double
barline at the end, to avoid showing that little portion of the staff? Start
and middle of line are fine as placements, but the end is a bit off
(consistent though).

I put the example in the lilybin to not burden the post with a lot of
clutter. I hope I did not overstep my bounds.

Thank you.



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

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Sami Amiris
Dear all,

The more I see this, it looks like I either did something totally wrong, or
it is a bug. I tried all sorts of combinations, but the behavior remains the
same. If it looks like a bug and smells like a bug (it could very well NOT
be a bug, I know it by now...). I would truly appreciate any insights
here...

Thank you all...

-S.A.



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

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Thomas Morley-2
In reply to this post by Sami Amiris
Am Mo., 16. März 2020 um 19:23 Uhr schrieb Sami Amiris <[hidden email]>:

>
> Hello all.
>
> I would like the barlines that span both staves (not the barlines in each
> individual staff alone) at the middle of the line to have the same behaviour
> at the next end (to the right) and the start of the line below at the very
> left. In other words, A1, A2 and A3 should all be the same as A1, likewise
> for the B's and C's in the example provided- at least I think so. Currently
> this doesn't happen. Is it possible?
>
> http://lilybin.com/soj3yd/2 <http://lilybin.com/soj3yd/2>
>
> In general, bottom staff wins at A2 and A3 (and B's and C's accordingly),
> overriding the middle inter-staff portion of the barlines which shows nicely
> at A1. Any remedy?
>
> Also, can the single barline be aligned with the second line of the double
> barline at the end, to avoid showing that little portion of the staff? Start
> and middle of line are fine as placements, but the end is a bit off
> (consistent though).
>
> I put the example in the lilybin to not burden the post with a lot of
> clutter. I hope I did not overstep my bounds.
>
> Thank you.
>
>
>
> --
> Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
>

Hi,

there are two reasons why you've got no reply so far.

(1) The matter is not uncomplicated.
(2) Your code is far from minimal.
You ask about BarLines. Why do you code all that clutter, like \paper
\key \time \scaleDurations \set Timing.measureLength \set
Timing.baseMoment?
Indentation is bad as well.

Speaking only for me (2) is the reason why your request was placed at
the bottom of my TODO-list.

That said and if I understand correctly...

You seem to think the last entry of the list provided to
\defineBarline will set the behaviour of the SpanBar.
That's not the whole story. Let's take a pseudo-code example:

\defineBarline "a" #'("b" "c" "d")

In the middle of a line \bar "a" will print a SpanBar as defined by
(the hopefully predefined) "d"
But:
At the end of a line \bar "a" will print a SpanBar as defined by (the
hopefully predefined) "b"
At the begin of a line \bar "a" will print a SpanBar as defined by
(the hopefully predefined) "c"

Your own BarLine-definitions always refer to the defaults, "|" and
"||", for end and begin of lines.
Btw, it makes no sense to define identically BarLines.

\defineBarLine "||-end" #'("||" #f " !")
\defineBarLine "||-beg"  #'("||" #f "!")
\defineBarLine "||-!"  #'("||-end" "||-beg" "!")
\defineBarLine "|-dashedSpan" #'("|" "|" "!")
\defineBarLine "|-!" #'("|-dashedSpan" "|-dashedSpan" "!")

Should do the trick.
Use \bar "||-!" and \bar "|-!"

Cheers,
  Harm

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Sami Amiris
Hello and thank you for your reply.

The reason for the not minimal example is because each staff has its own
timing. This is polymetric notation, not simple notation. Each staff has its
very own barlines, and when I put them in a group, the barlines are united
only when the timing of the two staves coincides. This is my situation. I
had no interest in non-polymetric notation for this effect at this time,
although now that we are discussing this, it might come up. The reason for
the many instances is to show how the bottom staff takes priority in
different cases. My main issue is that what happens at the end and start of
a staff system is not the same as in the middle.

I will try out your suggestions and get back to you. Thank you once again
for your reply.

S.A.



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

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Werner LEMBERG

> The reason for the not minimal example is because each staff has its
> own timing.  [...]

Well, the problem at hand is not related to polymetric notation at
all, AFAICS; you can use standard stuff also to demonstrate the
problem...


    Werner

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Sami Amiris
Werner LEMBERG wrote
>> The reason for the not minimal example is because each staff has its
>> own timing.  [...]
>
> Well, the problem at hand is not related to polymetric notation at
> all, AFAICS; you can use standard stuff also to demonstrate the
> problem...

Thank you for your response.

Ι respectfully disagree for one reason only: with the indicidual barlines
per staff, I could see that the inter-staff portion becomes the same as the
barline of the lower staff, never of the higher staff, when at the end or
beginning of a system. I do concur, now that I have received this messages,
that I could simply use just different barlines on each staff but without
the actual polymeter. I will do such an example to experiment, and will get
back here to report what I saw.

Thank you once again.



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

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Sami Amiris
In reply to this post by Thomas Morley-2
Hello all.


Thomas Morley-2 wrote
> \defineBarLine "||-end" #'("||" #f " !")
> \defineBarLine "||-beg"  #'("||" #f "!")
> \defineBarLine "||-!"  #'("||-end" "||-beg" "!")
> \defineBarLine "|-dashedSpan" #'("|" "|" "!")
> \defineBarLine "|-!" #'("|-dashedSpan" "|-dashedSpan" "!")
>
> Should do the trick.
> Use \bar "||-!" and \bar "|-!"

I tried the solution you told me, at the most minimal example I can think of
(keeping the labels intact for reference). It is  here
<http://lilybin.com/soj3yd/6>  . Unfortunately, it doesn't seem to compile.
What did I do wrong?

S.A.



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

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Noeck
> What did I do wrong?

You didn't finish the bar line definition in line 24:

\defineBarLine "|-!" #'("|-dashedSpan" "|-dashedSpan" "

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Sami Amiris
In reply to this post by Thomas Morley-2
Actually I stand corrected! I made a mistake, I corrected it and it works
fine! Thank you very much! This is the snippet! I know that it would do a
lot for people like me, maybe it should be included in the section about
barlines?

Thank you once again!

S.A.

</a> <http://lilybin.com/soj3yd/8>



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

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Werner LEMBERG

> [...] This is the snippet! I know that it would do a lot for people
> like me, maybe it should be included in the section about barlines?

Mhmm, this is very special, and LilyPond's documentation is already
more than 2000 pages...

I rather suggest that you contribute a well-documented snippet to the
LilyPond Snippet Repository.

  http://lsr.di.unimi.it/

This might then eventually become a part of the documentation.


     Werner

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Sami Amiris
Thank you, that is what I meant. Thank you for the link as well.

I would like to take the opportunity to that all of you great people.
Lilypond plays basically without opponents when it comes to more
"out-of-the-box" things, like polymeter and polytemporality, and I
understand more and more every day that almost everything is possible with
it, but one has to know how to do things. The problem with lilypond is not
what it can do, is understanding how to do it.

Once again, a big thanks to all!

-S.A.



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

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Sami Amiris
I apologise for flooding your email. Just found out another issue that I
would like your help, again with the barlines. Should I open another thread?
I thought they were in the same topic as before.

The question is: Is there a way to align the barlines correctly at the end
of the system?

I have written a  minimal example <http://lilybin.com/soj3yd/13>   and a
less minimal <http://lilybin.com/soj3yd/12>   if one wants to see more
barline types (the problem area is highlighted).

Thank you,

S.A.



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

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Kevin Barry
Hi Sami,

I think your alignment problem arises because you moved the barline
engraver from the score context to the staff context. Each staff
doesn't seem to "know" about the alignment of bars in other staves so
it cannot align with them. Since it seems you need different bar types
in different staves I think you will have to manually modify the
position of a barline with stuff like:
\once \override Staff.Barline.X-offset = 0.5 \bar "||-!"

If that works for you and you need to do it frequently in the score it
would be worth putting it in a variable or a function (my simple
attempts at this produced different output though so perhaps someone
else will best know how).

Kevin

On Thu, 19 Mar 2020 at 14:26, Sami Amiris <[hidden email]> wrote:

>
> I apologise for flooding your email. Just found out another issue that I
> would like your help, again with the barlines. Should I open another thread?
> I thought they were in the same topic as before.
>
> The question is: Is there a way to align the barlines correctly at the end
> of the system?
>
> I have written a  minimal example <http://lilybin.com/soj3yd/13>   and a
> less minimal <http://lilybin.com/soj3yd/12>   if one wants to see more
> barline types (the problem area is highlighted).
>
> Thank you,
>
> S.A.
>
>
>
> --
> Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
>

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Sami Amiris
Thank you for the suggestion. I tried it, so far I haven't got results. One
case that I actually aligned them well, I lost the "!" part of the barline
in between. I will continue, though. It maybe that one particular
combination of all things will produce a result.

Thank you once again.

-S.A.



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

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Kevin Barry
On Fri, Mar 20, 2020 at 06:55:44AM -0700, Sami Amiris wrote:
> Thank you for the suggestion. I tried it, so far I haven't got results.

I was able to get what you want (I think) from your minimal example from
an earlier email. The code is below (reformatted - your indentation/code
style is really hard to read). I hope this helps. Note that I modified
the barline in the lower staff not the upper one (where your comments
suggest you think the problem is).

\version "2.18.2"

\header {tagline = ""}

\layout {
  indent = 0\cm
  \context {
    \Score
    \remove "Timing_translator"
    \remove "Default_bar_line_engraver"
  }
  \context {
    \Staff
    \consists "Timing_translator"
    \consists "Default_bar_line_engraver"
  }
}

% barlines for bottom staff - double line
%
\defineBarLine "||-end" #'("||" #f " !")
\defineBarLine "||-beg"  #'("||" #f "!")
\defineBarLine "||-!"  #'("||-end" "||-beg" "!")

% PROBLEM - barlines for top staff - single thick
%
\defineBarLine ".-end" #'("." "." " !") % here
\defineBarLine ".-beg" #'("." "." "!")
\defineBarLine ".-!" #'(".-end" ".-beg" "!")

\new StaffGroup
{
  <<
    % Top staff
    \new Staff
    {
      \time 4/4
      \bar".-!"
      c'1 \bar".-!" % <<< here
    }
    % bottom, double-line
    \new Staff
    {
      \time 4/4
      \bar"||-!"
      c'1 \once \override Staff.BarLine.X-offset = #0.5 \bar"||-!"
    }
  >>
}

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Sami Amiris
Thank you for the suggestion once again.

I thank you for having spent some time on it. The whole idea is to create a
mirror image of the compound barline on the beginning of the example, which
means that they must align to the right, not to the left. Now it is a copy
of the system at the beginning, and you can also get there  inserting a
space in the barline definition of the \bar"||-!", without needing the
actual movement.

I have tried moving the lower and middle portion of the barline so as to
force the program to build the compound barline correctly, but so far it
simply makes the dotted portion disappear. I believe the problem is that
with the solid barline, the program seems to count distances from the left
side of the construct rather than the right when alligning it with other
barlines in the same part of the system. I am not sure as I haven't seen the
source code (and most probably wouldn't see it if it hit me in the face with
a 10-foot pole tbh, I need to brush up my programming skills a few thousand
parsecs to match), but this is a "phenomenological" interpretation of the
facts, if you like. It "seems" to count distances from the left. However, I
could VERY EASILY be wrong, and by all means I hope I am.

Thanks again!

S.A.



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

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Kevin Barry
On Sat, Mar 21, 2020 at 06:26:13AM -0700, Sami Amiris wrote:
> I thank you for having spent some time on it. The whole idea is to create a
> mirror image of the compound barline on the beginning of the example, which
> means that they must align to the right, not to the left.

I didn't understand much of what you wrote, but if I understand the
above correctly, then all you need to do in the minimal example is shift
the second SpanBar to the right, which you can do with:

        \once \override StaffGroup.SpanBar.X-offset = #0.5

Adding that to the same place as the other override I added makes it
"mirror" the compound barline at the beginning of the example. I hope
that helps.

Kevin

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Sami Amiris
Thank you for the suggestion.

I have been playing around with your suggestions - which I am truly very
thankful for, btw - and I have come to this so far:

1) The spanbar seems to be created at the bottom staff, at the "||-end"
definition.

2) If the spanbar is double, like the bottom double barline - the thick line
above is also as thick as a double bar - then things seem ok:

Double SpanBar <http://lilybin.com/l1xpzv/1>  

3) If the spanbar is single, I would like it to be in the same place as the
further right barline of the double. Unfortunately, in all my attempts it
remains at the left no matter what I do:

Single SpanBar <http://lilybin.com/l1xpzv/2>  

If you have managed to get the single spanbar at the far right place, I
would be most grateful if you would post me a solution.

Thank you once again,

S.A.



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

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Kevin Barry
On Sat, Mar 21, 2020 at 09:34:08AM -0700, Sami Amiris wrote:
> 3) If the spanbar is single, I would like it to be in the same place as the
> further right barline of the double. Unfortunately, in all my attempts it
> remains at the left no matter what I do:

The \override I sent in the last email will move it. I guess you didn't
try it? I added it to your minimal example here:
<http://lilybin.com/l1xpzv/3>

hope that helps,

Kevin

Reply | Threaded
Open this post in threaded view
|

Re: Peculiar behavior of barlines

Sami Amiris
Thank you, very much indeed.

I obviously did some stupid mistake(s) of some sort or another, so once
again thank you very much. Ptoblem solved!

Cheers!

-S.A.



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

12