Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force end of line on discretionary #1190

Closed
eroux opened this issue Jul 21, 2016 · 15 comments
Closed

force end of line on discretionary #1190

eroux opened this issue Jul 21, 2016 · 15 comments
Assignees
Milestone

Comments

@eroux
Copy link
Contributor

eroux commented Jul 21, 2016

In the example of #1189, there is an alignement problem at the end of the first line, this is due to #959. The problem here is that #959 can be avoided in a simple way by adding a z in the score (which changes the bar spacing computations and fixes the problem). In the example of #1189 though, the problem appears on a discretionary, and it seems that the manual fix cannot be applied.

@eroux eroux added this to the 5.0 milestone Jul 21, 2016
@eroux
Copy link
Contributor Author

eroux commented Jul 21, 2016

This bug also impacts the possibility to manually cut the lines for big initials

@eroux
Copy link
Contributor Author

eroux commented Jul 27, 2016

I'm a bit puzzled here on the best way to input a forced line break at a clef change in gabc... I see two real-life cases:

  • (z0::c3) which could become (z0::c3z) and would output a clef change then the TeX for (::z)
  • (c4) or (z0c4) which could become (c4z) or (z0c4z) and would basically just output a clef change then the TeX for (z)

in both case, z0 is ignored and there is no need for a discretionary, just a bol clef change followed by a simple bar syllable. This implies almost only work on the C side I think... What do you think about the notation? We should document it somewhere, maybe in a tips and tricks section? Or in the clef change section of the gabc documentation?

@rpspringuel
Copy link
Contributor

Why is the z0 necessary at all in this situation? Wouldn't it make more sense for the notation to be (::zc4) or (zc4). Your proposals read to me like "in-line clef change followed by line break" when what is wanted is "line break with new clef". Is there some complication in the code that I'm not aware of.

@eroux
Copy link
Contributor Author

eroux commented Jul 27, 2016

The z0 is not necessary (it's ignored), but it's important to allow it, because the normal use case is a user writing (z0::c3) and then realizing he wants to force a line break, so just adding a z somewhere, something easy to remove. Also, I think (c4z) and (c4) (z) should give the same result...

@eroux
Copy link
Contributor Author

eroux commented Jul 31, 2016

I think this could be the priority now... I don't think there is any change needed on the TeX side, and my guess is that it's not too heavy on the C side... @henryso would you be able to take a look when you have time? No emergency at all...

@henryso
Copy link
Contributor

henryso commented Jul 31, 2016

I've spent some time on this during this past week, but I'm still thinking about the implementation.

@henryso henryso self-assigned this Jul 31, 2016
@eroux
Copy link
Contributor Author

eroux commented Jul 31, 2016

Ok thanks a lot!

@rpspringuel
Copy link
Contributor

rpspringuel commented Aug 2, 2016

What about (z::c4) being valid notation? This makes it easy to convert a (z0::c4) instance (just delete the 0) but also avoids having two z in the same parentheses. It's a bit "out of order" in that the line break is being indicated before the barline, but it's not unreasonable for Gregorio to "correct" this because otherwise the new line would start with a bar line.

As I see it, all of the following should give the same result:

  • (z::c4)
  • (::zc4)
  • (::c4z)
  • (::z) (c4)
  • (::) (c4z)
  • (::) (z) (c4)
  • (::) (c4) (z)

In these cases, the bar line should end one line and the next begin with the new clef.

If there is no bar line, then the above cases are pretty much the same (just without the bar line). What I'm unsure about are cases where the clef occurs before the bar line (e.g. (c4::z)). I can't think of a reason why some one would want that, but I suppose the program ought to know what to do with it should it encounter it (even if it's just to raise an error).

@henryso
Copy link
Contributor

henryso commented Aug 2, 2016

That changes some of my thinking on the implementation, not that this is a bad thing, but I'll wait for the dust to clear before putting any more time into it.

@eroux
Copy link
Contributor Author

eroux commented Aug 2, 2016

Well, the action to remove a 0 to make a line break is not very intuitive but why not... This is quite a rare case that we'll have to document somehow so we can choose what we want. @henryso on what basis did you start to work? Maybe there's no need to change

@henryso
Copy link
Contributor

henryso commented Aug 2, 2016

I was saving the location of z0 and, if only bars and clefs are encountered until a z, I was removing the z0 from the note list.

@henryso
Copy link
Contributor

henryso commented Aug 4, 2016

@rpspringuel, what is your objection to having both z0 and z in the same syllable? If we're rewriting to handle the cases in your previous post, it's probably not too much more difficult to simultaneously coalesce z0 into nothing if there's a forced line break in the sequence.

Edit: by the way, I think it's simpler to implement the original suggestion than to rewrite the sequence, but it's not impossible.

@rpspringuel
Copy link
Contributor

I've always interpreted z0 as the request for an automatic custos without ending the line. Thus having both z0 and z in the same syllable is saying both "don't end the line" and "end the line" at the same time (if they are next to each other). Since ending the line also produces an automatic custos, having both also seems like were requesting the automatic custos twice, which is redundant.

Also, looking over my previous post, I'm no longer sure that I really like what I was proposing. My thinking right now is running more towards respecting the relative order of the bar lines/clefs/line breaks, as a user might want them to appear in a particular order for some reason, even if that isn't the usual order.

In other words, you should probably ignore what I'm saying on this issue because my opinions are clearly not as firmly fixed as I thought.

@henryso
Copy link
Contributor

henryso commented Aug 5, 2016

Any more thoughts on this? If not, I will implement as described in the opening post.

@eroux
Copy link
Contributor Author

eroux commented Aug 5, 2016

Fine for me!

henryso added a commit to henryso/gregorio that referenced this issue Aug 6, 2016
henryso added a commit to henryso/gregorio that referenced this issue Aug 9, 2016
henryso added a commit to henryso/gregorio that referenced this issue Aug 9, 2016
[with thanks to @eroux]
Part of the implementation for gregorio-project#1190.
henryso added a commit to henryso/gregorio-test that referenced this issue Aug 9, 2016
henryso added a commit to henryso/gregorio-test that referenced this issue Aug 9, 2016
@henryso henryso closed this as completed Aug 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants