cuthbertLab / music21

music21 is a Toolkit for Computational Musicology
https://www.music21.org/
Other
2.13k stars 402 forks source link

Stem styles aren't exported unless stemDirection is explicit #1724

Closed jacobtylerwalls closed 2 months ago

jacobtylerwalls commented 3 months ago

music21 version dev

Problem summary Stem styles (e.g. colors) aren't exported if the stem direction is unspecified.

Steps to reproduce

s = converter.parse('tinyNotation: 2/4 c2')
s.recurse().notes.first().style.stemStyle = style.Style()
s.recurse().notes.first().style.stemStyle.color = 'red'
s.write()

Expected vs. actual behavior .write() doesn't produce a <stem> element. Expected:

<stem color="#FF0000">up</stem>