Skip to content

GABC converter: inconsistently generating accidentals #20

Description

@igneus

The gabc language supports flat/natural/sharp accidentals for any note.

from music21 import converter
import chant21

chant = converter.parse('gabc: (c4) la(ixi exe gxg fxf dxd)')
chant.show('text')

The gabc converter generates a Flat element for any flat accidental encountered, but while for B and E it also produces a flat Accidental for the Note(s) affected, it doesn't do so for other pitches:

{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.Flat>
            {0.0} <chant21.chant.Neume>
                {0.0} <chant21.chant.Note B->
            {1.0} <chant21.chant.Flat>
            {1.0} <chant21.chant.Neume>
                {0.0} <chant21.chant.Note E->
            {2.0} <chant21.chant.Flat>
            {2.0} <chant21.chant.Neume>
                {0.0} <chant21.chant.Note G>
            {3.0} <chant21.chant.Flat>
            {3.0} <chant21.chant.Neume>
                {0.0} <chant21.chant.Note F>
            {4.0} <chant21.chant.Flat>
            {4.0} <chant21.chant.Neume>
                {0.0} <chant21.chant.Note D>

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