Skip to content

Commit

Permalink
Prevented a rising note after an oriscus flexus from generating a por…
Browse files Browse the repository at this point in the history
…rectus.

Fixes gregorio-project#1220.
  • Loading branch information
henryso committed Sep 8, 2016
1 parent 807fdda commit 25bbf97
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 28 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/).
[Unreleased][unreleased]
## Fixed
- Horizontal episemata bridge spaces more correctly. As mentioned earlier, you can prevent this by appending `2` to the `_` on the note before the space you do not want bridged. See [#1216](https://github.com/gregorio-project/gregorio/issues/1216).
- A rising note after an oriscus flexus will no longer generate a porrectus (see [#1220](https://github.com/gregorio-project/gregorio/issues/1220)).

## Changed
- Notes are now left-aligned as if all clefs had the same width as the largest clef in the score. You can get previous behavior back with `\grebolshiftcleftype{current}`, or temporary force alignment until the end of a score with `\grelocalbolshiftcleftype`. See Documentation of these functions and [#1189](https://github.com/gregorio-project/gregorio/issues/1189).
Expand Down
56 changes: 28 additions & 28 deletions src/gabc/gabc-glyphs-determination.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ static __inline gregorio_scanner_location *copy_note_location(
return loc;
}

static __inline bool is_normal_punctum(const gregorio_note *const note)
{
return note->u.note.shape == S_PUNCTUM
&& note->u.note.liquescentia != L_INITIO_DEBILIS;
}

/****************************
*
* This function is the basis of all the determination of glyphs. The
Expand Down Expand Up @@ -88,6 +94,10 @@ static char add_note_to_a_glyph(gregorio_glyph_type current_glyph_type,
gabc_determination *end_of_glyph,
gregorio_shape *punctum_inclinatum_orientation)
{
#define this_note_starts_new_glyph { \
next_glyph_type = G_PUNCTUM; \
*end_of_glyph = DET_END_OF_PREVIOUS; \
}

/* next glyph type is the type of the glyph that will be returned (the
* new type of the glyph with the note added to it, or the type of the
Expand Down Expand Up @@ -122,8 +132,7 @@ static char add_note_to_a_glyph(gregorio_glyph_type current_glyph_type,
* we determine here the shape of the thing if it is made of puncta
*/
if (current_pitch == last_pitch) {
next_glyph_type = G_PUNCTUM;
*end_of_glyph = DET_END_OF_PREVIOUS;
this_note_starts_new_glyph;
break;
}
switch (current_glyph_type) {
Expand All @@ -136,14 +145,11 @@ static char add_note_to_a_glyph(gregorio_glyph_type current_glyph_type,
break;
case G_PODATUS:
if (current_pitch > last_pitch) {
if (current_glyph_first_note->u.note.shape == S_PUNCTUM &&
current_glyph_first_note->u.note.liquescentia !=
L_INITIO_DEBILIS) {
if (is_normal_punctum(current_glyph_first_note)) {
next_glyph_type = G_SCANDICUS;
*end_of_glyph = DET_END_OF_CURRENT;
} else {
next_glyph_type = G_PUNCTUM;
*end_of_glyph = DET_END_OF_PREVIOUS;
this_note_starts_new_glyph;
}
} else {
next_glyph_type = G_TORCULUS;
Expand All @@ -162,37 +168,37 @@ static char add_note_to_a_glyph(gregorio_glyph_type current_glyph_type,
next_glyph_type = G_PES_QUADRATUM;
*end_of_glyph = DET_END_OF_CURRENT;
} else {
next_glyph_type = G_PUNCTUM;
*end_of_glyph = DET_END_OF_PREVIOUS;
this_note_starts_new_glyph;
}
break;
case G_VIRGA_STRATA: /* really a pes stratus */
if (current_pitch > last_pitch) {
next_glyph_type = G_SALICUS;
} else {
next_glyph_type = G_PUNCTUM;
*end_of_glyph = DET_END_OF_PREVIOUS;
this_note_starts_new_glyph;
}
break;
case G_SALICUS:
if (current_pitch < last_pitch) {
next_glyph_type = G_SALICUS_FLEXUS;
*end_of_glyph = DET_END_OF_CURRENT;
} else {
next_glyph_type = G_PUNCTUM;
*end_of_glyph = DET_END_OF_PREVIOUS;
this_note_starts_new_glyph;
}
break;
case G_FLEXA:
if (current_pitch > last_pitch) {
next_glyph_type = G_PORRECTUS;
if (is_normal_punctum(current_glyph_first_note)) {
next_glyph_type = G_PORRECTUS;
} else {
this_note_starts_new_glyph;
}
} else {
if (liquescentia & L_DEMINUTUS) {
*end_of_glyph = DET_END_OF_CURRENT;
next_glyph_type = G_ANCUS;
} else {
*end_of_glyph = DET_END_OF_PREVIOUS;
next_glyph_type = G_PUNCTUM;
this_note_starts_new_glyph;
}
}
break;
Expand All @@ -203,31 +209,27 @@ static char add_note_to_a_glyph(gregorio_glyph_type current_glyph_type,
*end_of_glyph = DET_END_OF_CURRENT;
next_glyph_type = G_TORCULUS_LIQUESCENS;
} else {
*end_of_glyph = DET_END_OF_PREVIOUS;
next_glyph_type = G_PUNCTUM;
this_note_starts_new_glyph;
}
break;
case G_TORCULUS_RESUPINUS:
if (current_pitch > last_pitch) {
*end_of_glyph = DET_END_OF_PREVIOUS;
next_glyph_type = G_PUNCTUM;
this_note_starts_new_glyph;
} else {
*end_of_glyph = DET_END_OF_CURRENT;
next_glyph_type = G_TORCULUS_RESUPINUS_FLEXUS;
}
break;
case G_PORRECTUS:
if (current_pitch > last_pitch) {
*end_of_glyph = DET_END_OF_PREVIOUS;
next_glyph_type = G_PUNCTUM;
this_note_starts_new_glyph;
} else {
*end_of_glyph = DET_END_OF_CURRENT;
next_glyph_type = G_PORRECTUS_FLEXUS;
}
break;
default:
*end_of_glyph = DET_END_OF_PREVIOUS;
next_glyph_type = G_PUNCTUM;
this_note_starts_new_glyph;
break;
}
break;
Expand All @@ -236,8 +238,7 @@ static char add_note_to_a_glyph(gregorio_glyph_type current_glyph_type,
case S_ORISCUS_DESCENDENS:
case S_ORISCUS_DEMINUTUS:
case S_QUILISMA:
*end_of_glyph = DET_END_OF_PREVIOUS;
next_glyph_type = G_PUNCTUM;
this_note_starts_new_glyph;
break;
case S_VIRGA:
if (current_glyph_type == G_VIRGA && last_pitch == current_pitch) {
Expand Down Expand Up @@ -282,8 +283,7 @@ static char add_note_to_a_glyph(gregorio_glyph_type current_glyph_type,
if (current_glyph_type == G_PUNCTUM && last_pitch < current_pitch) {
next_glyph_type = G_VIRGA_STRATA;
} else {
*end_of_glyph = DET_END_OF_PREVIOUS;
next_glyph_type = G_PUNCTUM;
this_note_starts_new_glyph;
}
break;
case S_PUNCTUM_INCLINATUM_UNDETERMINED:
Expand Down

0 comments on commit 25bbf97

Please sign in to comment.