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

Add option to print only the first flat on each line #357

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/gabc-output/soft-alterations-preamble.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
\gresetinitiallines{0}
\gresetalterationeffect{line}
8 changes: 8 additions & 0 deletions tests/gabc-output/soft-alterations.gabc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
%%
(c3)
soft(gXg) (:) hard(gxg) soft(gXg) (:) soft(gXg) soft(gXg) (:) paren(gx?g) soft(gXg) (:) soft(gYg) soft(gXg) (:) hard(gxg) soft(iXi) (Z)
soft(g##g) (:) hard(g#g) soft(g##g) (:) soft(g##g) soft(g##g) (:) paren(g#?g) soft(g##g) (:) soft(gYg) soft(g##g) (:) hard(g#g) soft(i##i) (Z)
soft(gYg) (:) hard(gyg) soft(gYg) (:) soft(gYg) soft(gYg) (:) paren(gy?g) soft(gYg) (:) soft(gXg) soft(gYg) (:) hard(gyg) soft(iYi) (Z)
<alt>These two lines should look the same:</alt>
a(g) a(fxf) a(gxg) a(f) a(g) (:) aa(fxf) aa(gxg) aa(f) aa(g) (:) aaaa(lxl) aaaa(mxm) aaaa(l) aaaa(m) (:) a(g) (Z)
a(gYg) a(fXf) a(gXg) a(fXf) a(gXg) (:) aa(fxf) aa(gxg) aa(fXf) aa(gXg) (:) aaaa(lXl) aaaa(mXm) aaaa(lXl) aaaa(mXm) (:) a(gXg) (Z)
Binary file added tests/gabc-output/soft-alterations.pdf
Binary file not shown.
7 changes: 7 additions & 0 deletions tests/tex-output/dominican-flats/alma-correct.gabc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name:Alma Redemptoris;
office-part:Antiphona;
mode:5;
book:Antiphonarium O.P. (Gillet), 1933, p. 132*;
transcriber:Andrew Hinkley;
%%
(c3) Al(gxdf/ghh::ikkvJIHG//hihh>)ma(fef) (;) Re(h)demp(h)tó(d)ris(ef) Ma(gxgvFEe)ter,(d) (:) quæ(hz) pér(i!jkj~)vi(ih)a(gxgh) (;3) caé(hih)li(h) por(de/fg)ta(f) (;3) ma(h//d!e!fg)nes,(f) (;) et(k) stel(jkJIHh)la(g) ma(hiHGFEz)ris,(f) (;) suc(d)cúr(gxeg)re(g) ca(g)dén(fee)ti,(d) (;) súr(h)ge(h)re(h) qui(g) cu(hih)rat,(gf) pó(e)pu(f)lo.(f) (:z) Tu,(kkvIHik) (;6) quæ(k) ge(j)nu(kl)í(kj)sti,(ih) (;) na(gxgh)tú(hvGF)ra(f) mi(g)rán(fee>)te,(d) (;) tu(d)um(ef) san(fz)ctum(fef) Ge(gxgf)ni(ed)tó(e)rem,(d) (:) Vir(kkvJIHhg~)go(h) (;3) pri(hfgFE)us(d) (;) ac(h) po(i!jk)sté(ih)ri(gh)us,(h) (;z) Ga(h)bri(h)é(gxhg)lis(f) ab(gh) o(hvGFg)re(ed) (;) su(d)mens(ef) il(gf~)lud(ed) A(egFE)ve,(f) (:) pec(h)ca(g)tó(h)rum(d!efz) mi(gxgf)se(e)ré(d)re.(d) (::)
7 changes: 7 additions & 0 deletions tests/tex-output/dominican-flats/alma-new.gabc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name:Alma Redemptoris;
office-part:Antiphona;
mode:5;
book:Antiphonarium O.P. (Gillet), 1933, p. 132*;
transcriber:Andrew Hinkley;
%%
(c3) Al(gXdf/ghh::gXikkvJIHG//hihh>)ma(fef) (;) Re(h)demp(h)tó(d)ris(ef) Ma(gxgvFEe)ter,(d) (:) quæ(h) pér(i!jkj~)vi(ih)a(gXgh) (;3) caé(hih)li(h) por(gXde/fg)ta(f) (;3) ma(h//gXd!e!fg)nes,(f) (;) et(k) stel(jkJIHh)la(gXg) ma(gXhiHGFE)ris,(f) (;) suc(d)cúr(gXeg)re(gXg) ca(gXg)dén(fee)ti,(d) (;) súr(h)ge(h)re(h) qui(gXg) cu(hih)rat,(gXgf) pó(e)pu(f)lo.(f) (:) Tu,(kkvIHik) (;6) quæ(k) ge(j)nu(kl)í(kj)sti,(ih) (;) na(gXgh)tú(gXhvGF)ra(f) mi(gXg)rán(fee>)te,(d) (;) tu(d)um(ef) san(f)ctum(fef) Ge(gXgf)ni(ed)tó(e)rem,(d) (:) Vir(kkvJIHgXhg~)go(h) (;3) pri(gXhfgFE)us(d) (;) ac(h) po(i!jk)sté(ih)ri(gXgh)us,(h) (;) Ga(h)bri(h)é(gXhg)lis(f) ab(gXgh) o(gXhvGFg)re(ed) (;) su(d)mens(ef) il(gXgf~)lud(ed) A(gXegFE)ve,(f) (:) pec(h)ca(gXg)tó(h)rum(d!ef) mi(gXgf)se(e)ré(d)re.(d) (::)
7 changes: 7 additions & 0 deletions tests/tex-output/dominican-flats/alma-original.gabc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name:Alma Redemptoris;
office-part:Antiphona;
mode:5;
book:Antiphonarium O.P. (Gillet), 1933, p. 132*;
transcriber:Andrew Hinkley;
%%
(c3) Al(gxdf/ghh::ikkvJIHG//hihh>)ma(fef) (;) Re(h)demp(h)tó(d)ris(ef) Ma(gxgvFEe)ter,(d) (:) quæ(h) pér(i!jkj~)vi(ih)a(gxgh) (;3) caé(hih)li(h) por(de/fg)ta(f) (;3) ma(h//d!e!fg)nes,(f) (;) et(k) stel(jkJIHh)la(g) ma(hiHGFE)ris,(f) (;) suc(d)cúr(gxeg)re(g) ca(g)dén(fee)ti,(d) (;) súr(h)ge(h)re(h) qui(g) cu(hih)rat,(gf) pó(e)pu(f)lo.(f) (:) Tu,(kkvIHik) (;6) quæ(k) ge(j)nu(kl)í(kj)sti,(ih) (;) na(gxgh)tú(hvGF)ra(f) mi(g)rán(fee>)te,(d) (;) tu(d)um(ef) san(f)ctum(fef) Ge(gxgf)ni(ed)tó(e)rem,(d) (:) Vir(kkvJIHhg~)go(h) (;3) pri(hfgFE)us(d) (;) ac(h) po(i!jk)sté(ih)ri(gh)us,(h) (;) Ga(h)bri(h)é(gxhg)lis(f) ab(gh) o(hvGFg)re(ed) (;) su(d)mens(ef) il(gf~)lud(ed) A(egFE)ve,(f) (:) pec(h)ca(g)tó(h)rum(d!ef) mi(gxgf)se(e)ré(d)re.(d) (::)
Binary file not shown.
38 changes: 38 additions & 0 deletions tests/tex-output/dominican-flats/dominican-flats.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
\documentclass{article}
\usepackage[paperwidth=17in,paperheight=8.5in,margin=1in]{geometry}
\usepackage[autocompile]{gregoriotex}

\usepackage{fontspec}
\usepackage{gregoriotex}

\setmainfont[
Path = ../../../fonts/ ,
Extension = .otf ,
UprightFont = *-Regular ,
UprightFeatures = { SmallCapsFont = *SC-Regular } ,
BoldFont = *-Bold ,
BoldFeatures = { SmallCapsFont = *SC-Bold } ,
ItalicFont = *-Italic ,
ItalicFeatures = { SmallCapsFont = *SC-Italic } ,
BoldItalicFont = *-BoldItalic ,
BoldItalicFeatures = { SmallCapsFont = *SC-BoldItalic } ,
Ligatures = TeX
]{Alegreya}

\begin{document}

\bigskip

\begin{tabular}{p{4.1in}p{4.1in}p{4.1in}}
Score 4971 from GregoBase, with line breaks inserted to match the original printed source. Every B is flatted (te); for example, the flat on \emph{Genitorem} extends to the end of the line, so the B in \emph{Virgo} and \emph{prius} are flatted. &
Without explicit line breaks, the B in \emph{Virgo} and \emph{prius} move to a new line and should be flatted, but are not. &
Using soft flats. The B in \emph{Mater} has a hard flat, so it is printed even though not strictly required. The B in \emph{Virgo} correctly has a flat.
\\
\gregorioscore{alma-correct}%
&
\gregorioscore{alma-original}%
&
\gregorioscore{alma-new}%
\end{tabular}

\end{document}