Skip to content

GABC converter: flat/natural breaks a neume in two #19

Description

@igneus

Today I stumbled upon the fact that when parsing gabc, a flat (as well as a natural) in the middle of a neume is not considered element of the neume, but an "extra-neumatic" element, thus breaking the neume in two:

from music21 import converter
import chant21

chant = converter.parse('gabc: (c4) la(igixig)')
chant.show('text')

Result I would expect:

{0.0} <chant21.chant.Section>
    {0.0} <chant21.chant.Word>
        {0.0} <chant21.chant.Syllable>
            {0.0} <chant21.chant.Clef>
    {0.0} <chant21.chant.Word>
        {0.0} <chant21.chant.Syllable lyrics=la>
            {0.0} <chant21.chant.Neume>
                {0.0} <chant21.chant.Note B>
                {1.0} <chant21.chant.Note G>
                {?.0} <chant21.chant.Flat>
                {?.0} <chant21.chant.Note B->
                {?.0} <chant21.chant.Note G>

Actual result:

{0.0} <chant21.chant.Section>
    {0.0} <chant21.chant.Word>
        {0.0} <chant21.chant.Syllable>
            {0.0} <chant21.chant.Clef>
    {0.0} <chant21.chant.Word>
        {0.0} <chant21.chant.Syllable lyrics=la>
            {0.0} <chant21.chant.Neume>
                {0.0} <chant21.chant.Note B>
                {1.0} <chant21.chant.Note G>
            {2.0} <chant21.chant.Flat>
            {2.0} <chant21.chant.Neume>
                {0.0} <chant21.chant.Note B->
                {1.0} <chant21.chant.Note G>

Volpiano parsing behaves differently - flat is considered part of the neume here. Is there a bug in the gabc parser?

from music21 import converter
import chant21

chant = converter.parse('cantus: 1---jhijh')
chant.show('text')
{0.0} <chant21.chant.Section>
    {0.0} <chant21.chant.Word>
        {0.0} <chant21.chant.Syllable>
            {0.0} <chant21.chant.Clef>
    {0.0} <chant21.chant.Word>
        {0.0} <chant21.chant.Syllable>
            {0.0} <chant21.chant.Neume>
                {0.0} <chant21.chant.Note B>
                {1.0} <chant21.chant.Note A>
                {2.0} <chant21.chant.Flat>
                {2.0} <chant21.chant.Note B->
                {3.0} <chant21.chant.Note A>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions