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

first note alignment with c and f clefs #1189

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

first note alignment with c and f clefs #1189

eroux opened this issue Jul 21, 2016 · 12 comments

Comments

@eroux
Copy link
Contributor

eroux commented Jul 21, 2016

In the following example:

\documentclass[12pt, a5paper]{book}
\usepackage{libertine}
\usepackage[autocompile]{gregoriotex}
\grechangestaffsize{16}
\pagestyle{empty}
\begin{document}
\gabcsnippet{(f3) Res(f) est(e) ad(f)mi(h)rá(gf)bi(e)lis(f) vir(i)go(h) ve(g)ne(f)rá(hg)bi(f)lis(e) (z0c4) pa(c)rit(e) sed(d) in(h)tác(gfg)ta.(f.) (d+::f3) Si(f)ne(e) vi(f)ri(h) có(gf)i(e)tu,(f) ple(i)na(h) San(h)cto(f) Spí(hg)ri(f)tu,(e) gé(c)ni(e)trix(f) est(h) fac(gfg)ta.(f.) (::)}
\end{document}

giving

buggregorio

the first note of the lines is at the same distance of the clefs, but when there is a mix of c and f clefs, the consequence is that they are not aligned. I see a few ways to fix it:

  • one is manual: the user calls \gregoriobolalignonfclefs and the next score has all beginning of lines aligned as if they were f clefs
  • one is automatic (but optional): calling a function \GreScoreContainsFClef at the beginning of each score containing an f clef
  • one is even more automatic with two pass: the first detects if an actual f clef appears in the score, then the second adjusts things

I think the second one is the best... what do you think? (it should be optional though)

@eroux
Copy link
Contributor Author

eroux commented Jul 24, 2016

Thinking more about it, there should also be a user-level command like \grealignboloncleftype{x} where x is

  • current for the current case
  • max for f if there is an f clef in the score, else c
  • c to force alignment as if c clef
  • f to force alignment on f clef
  • maybe also cc, cf, ff, etc.? not sure about that...

the idea is that this function could be called in the middle of a score in the case where you want a different behavior in the middle of a score if there's a page change (with an f clef on the first page but only c clefs on the second page). The function could be called in a verbatim, and it would only change the current/next score.

@eroux
Copy link
Contributor Author

eroux commented Jul 29, 2016

In fact the most generic (and precise) way to do that would be to add a \GreSetLargestClef at the beginning of the score, with the same arguments as \GreSetInitialClef but corresponding to the largest clef... That would be the only required change in C, the rest would be in TeX. @henryso do you think we could share this one, you for the C side, I'll do the TeX side?

@henryso
Copy link
Contributor

henryso commented Jul 29, 2016

Sure. I'll try to work on it this weekend.

@henryso
Copy link
Contributor

henryso commented Jul 30, 2016

Does the #7 argument make sense for \GreSetLargestClef? If so, please describe the desired semantics.

@eroux
Copy link
Contributor Author

eroux commented Jul 30, 2016

Well, I think it has the same meaning as #4...? I'm not really sure I'm following...

@henryso
Copy link
Contributor

henryso commented Jul 30, 2016

#7 is 0 if the clef and first note are far enough to use a shorter space or 1 otherwise.

@eroux
Copy link
Contributor Author

eroux commented Jul 30, 2016

Well, the idea here is to have exactly the same arguments as would be typeset in another context, so the arguments should be exactly the same as the arguments with which \GreSetLineClef was called on the largest clef... do you see what I mean?

@henryso
Copy link
Contributor

henryso commented Jul 30, 2016

I see what you mean, but #7 is specific to the first note of the score. If \GreSetLargestClef will be typeset in place of \GreSetInitialClef, then I should make #7 depend on the first note of the score there also. If it is to be typeset elsewhere, then #7 probably doesn't make sense at all.

@henryso
Copy link
Contributor

henryso commented Jul 30, 2016

Put another way, \GreSetLinesClef only takes six arguments. The seventh argument is used in \GreSetInitialClef here:

      \ifnum#7=1\relax %
        \gre@typeclef{#1}{#2}{0}{1}{#3}{#4}{#5}{#6}%
      \else %
        \gre@typeclef{#1}{#2}{0}{2}{#3}{#4}{#5}{#6}%
      \fi %

@eroux
Copy link
Contributor Author

eroux commented Jul 30, 2016

oh sorry, I misread, well you can make it 0

@henryso
Copy link
Contributor

henryso commented Jul 30, 2016

OK.

@henryso
Copy link
Contributor

henryso commented Jul 30, 2016

Since this is a new macro, I'll just omit the seventh argument. You can always synthesize it as necessary in TeX.

eroux added a commit that referenced this issue Jul 30, 2016
eroux added a commit that referenced this issue Jul 30, 2016
@eroux eroux mentioned this issue Jul 30, 2016
henryso added a commit to henryso/gregorio that referenced this issue Jul 30, 2016
eroux added a commit that referenced this issue Jul 31, 2016
@eroux eroux closed this as completed Jul 31, 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

2 participants