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

Bugs in choral signs #387

Closed
rpspringuel opened this issue May 8, 2015 · 19 comments
Closed

Bugs in choral signs #387

rpspringuel opened this issue May 8, 2015 · 19 comments
Assignees
Milestone

Comments

@rpspringuel
Copy link
Contributor

Playing around with the choral signs I've noticed the following bugs:

  1. When there is only one choral sign, spacing wise it is treated as a low choral sign, but style wise it's a high choral sign. This should be consistently one or the other.
  2. High choral signs ignore beforechoralsignspace
@eroux
Copy link
Contributor

eroux commented May 8, 2015

Can also please test if this issue is still valid?

@rpspringuel
Copy link
Contributor Author

That issue does seem to be still valid. My vertical position on the first choral sign isn't quite as low as was displayed in the attached pdf, but it's still on the bottom line of the staff (well below the associate notes). The second choral sign is in the same place as was reported before.

@eroux
Copy link
Contributor

eroux commented May 8, 2015

ok thanx, let's treat them both in the same issue then (this one)

@eroux eroux added this to the 4.0 milestone May 14, 2015
@henryso
Copy link
Contributor

henryso commented May 19, 2015

I think the changes that I made to allow horizontal episemas to go into the stratosphere has fixed the high choral sign gna! issue. The second choral sign is still an issue.

@eroux
Copy link
Contributor

eroux commented May 19, 2015

Good news!

@henryso
Copy link
Contributor

henryso commented May 19, 2015

Looking at the source, I am doubting that high choral signs should actually obey beforechoralsignspace. Maybe beforechoralsignspace should be renamed instead?

@henryso henryso self-assigned this May 19, 2015
@henryso
Copy link
Contributor

henryso commented May 19, 2015

@rpspringuel Can you give a few examples of the first point? If you can also explain expected output, that would also help.

I really don't think high choral signs should obey beforechoralsignspace. If we do want to have a scalable space before high signs, I think there should be a different (new) space here. Anyone else have an opinion on this?

@eroux
Copy link
Contributor

eroux commented May 20, 2015

It's been a long time I haven't been using these, but I think @henryso is right, they're not meant to obey beforechoralsignspace

@rpspringuel
Copy link
Contributor Author

I don't have any real world examples of choral signs. I put 2 down as a bug simply based on the naming of the distances. If high choral signs are not meant to obey beforechoralsignspace then a rename is probably in order to indicate this.

For the first point, use the following:

Main.tex:

% !TEX TS-program = LuaLaTeX+se
\documentclass[11pt]{article}

\usepackage[debug,autocompile]{gregoriotex}
\usepackage[T1]{fontenc}

\begin{document}

\grechangedim{highchoralsignshift}{-1cm}{1}
\renewcommand{\grehighchoralsignstyle}[1]{{\Large\tt#1}}

\grechangedim{lowchoralsignshift}{1cm}{1}
\renewcommand{\grelowchoralsignstyle}[1]{{\it#1}}

\includescore{test}
\end{document}

test.gabc:

% !TEX root = Main.tex
% !TEX encoding = UTF-8

%%
(c4) Line(c[cs:l]f[cs:h]) One(f[cs:h]c[cs:l]) Line(c[cs:s]) Line(c[cs:s]b) Line(c[cs:s]d)

The values for highchoralsignshift and lowchoralsignshift are chosen so that high choral signs should be pushed really high up while low ones should be pushed really far down. Likewise the styles are set to make an obvious difference between the two. Looking at the results, you'll see that the first two s's are styled like the h's (high choral signs), but pushed down like the l's (low choral signs), though not as much, indicating a higher baseline. They should be treated as either one or the other (though I'll be honest, I don't know which). The third s is consistently treated as a low choral sign.

@henryso
Copy link
Contributor

henryso commented May 20, 2015

It also has something to do with the height of the sign. It appears that if the note is on a line, it's using the highchoralsignshift and if it's in a space, it's using the lowchoralsignshift. You can see this if you change the above to

(c4) Line(c[cs:l]f[cs:h]) One(f[cs:h]c[cs:l]) Line(d[cs:s]) Line(d[cs:s]b) Line(d[cs:s]e)

@henryso
Copy link
Contributor

henryso commented May 20, 2015

I'm not sure what exactly is the right fix, if any, here. This is the code in question:

  \or% 10: if it is a low choral sign, we shift it a bit lower, of a user-defined value
    \grelowchoralsignstyle{\global\advance\gre@dimen@glyphraisevalue by -\gre@dimen@lowchoralsignshift} %
  \or% 11: if it is a high choral sign, we shift it a bit lower, of a user-defined value
    \ifnum\greisonaline=1%
      \grehighchoralsignstyle{\global\advance\gre@dimen@glyphraisevalue by -\gre@dimen@highchoralsignshift} %
    \else %
      \grelowchoralsignstyle{\global\advance\gre@dimen@glyphraisevalue by -\gre@dimen@lowchoralsignshift} %
    \fi %
  \or% 12: if it is a low choral sign that is lower than the note, we shift it a bit higher
    \ifnum\greisonaline=1%
      \grehighchoralsignstyle{\global\advance\gre@dimen@glyphraisevalue by -\gre@dimen@highchoralsignshift} %
    \else %
      \grelowchoralsignstyle{\global\advance\gre@dimen@glyphraisevalue by -\gre@dimen@lowchoralsignshift} %
    \fi %

so highchoralsignshift is actually used when shifting a choral sign slightly up and lowchoralsignshift when shifting a choral sign slightly down. Therefore, I think the right thing to do is to rename those dimensions, as they seem to be doing the correct thing otherwise. What do you think?

@henryso
Copy link
Contributor

henryso commented May 20, 2015

(deleted - see below)

@eroux
Copy link
Contributor

eroux commented May 20, 2015

ok, also they should be documented better apparently (very simply, like the others)

@rpspringuel
Copy link
Contributor Author

I have to admit to being a bit confused now. Clearly the code doesn't do what I would expect given the names. So either the distances need to be renamed, or the code changed (or possibly both), but I'm not sure which.

Can anyone point to example chants which have choral signs in them? I know I brought this up on theoretical grounds only, but actual examples of choral signs would help me figure out what's supposed to be going on.

@henryso
Copy link
Contributor

henryso commented May 20, 2015

I don't think there are any chants in liturgical books with choral signs. I think this is an editorial feature. I use it, for example, to add celeriter and tenete symbols to notes.

@henryso
Copy link
Contributor

henryso commented May 20, 2015

@rpspringuel There is definitely something amiss here. The code I pasted above is using \grehighchoralsignstyle or \grelowchoralsignstyle depending on \greisonaline. I need to study this further.

@henryso
Copy link
Contributor

henryso commented May 21, 2015

Never mind. I doubt \gre@calculate@glyphraisevalue should even be calling \grehighchoralsignstyle and \grelowchoralsignstyle at all. Still, I will study this more to ascertain exactly what these two dimensions are doing.

@henryso
Copy link
Contributor

henryso commented May 21, 2015

I think the code is doing the right thing, but the dimensions are badly named. I deleted my earlier comment about my suggested renames since I am recapping it here. Here are my findings:

  • beforechoralsignspace should be renamed to beforelowchoralsignspace
  • lowchoralsignshift is used (a) for low choral signs that are not lower than the note, regardless of whether it's on a line or in a space and (b) for high choral signs and low choral signs that are lower than the note which are in a space. The default value shifts the glyph down. This should be renamed choralsigndownshift
  • highchoralsignshift is used for high choral signs and low choral signs that are lower than the note which are on a line. The default value shifts the glyph up. This should be renamed choralsignupshift

I'm going to put this explanation in the documentation, but I'll be the first to admit that I have no idea why these shifts work.

I am also going to reverse the sign of the default value of choralsignupshift and apply the proper sign in \gre@calculate@glyphraisevalue. This way, the value is the amount to shift the sign up, so as to reduce confusion in the naming.

@henryso
Copy link
Contributor

henryso commented May 21, 2015

The pull request for this (#439) is ready for review.

@henryso henryso closed this as completed May 21, 2015
rpspringuel added a commit to rpspringuel/gregorio that referenced this issue May 21, 2015
* develop:
  Added \GreGlyphHeights macro to track the high and low pitches of a glyph. Part of gregorio-project#59.
  Renamed and documented choral sign dimensions.  Fixes gregorio-project#387.
  Fixed choral signs around porrectus and torculus resupinus.  Fixes gregorio-project#387
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