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>
The gabc language supports flat/natural/sharp accidentals for any note.
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: