Measure.rightBarline not being correctly set when appending bar.Repeat
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
The report points at Measure._getRightBarline(), which only checks _endElements, so start there and run the reproduction script to see which barline append() actually sets. Decide first whether an end-direction bar.Repeat appended to a measure should become its rightBarline, since the reporter flags that as unresolved. Done means m2.rightBarline returns the end repeat in the reproduction, with a regression test added.
由索引模型根据 Issue 内容生成。
描述
music21 version
9.1.0
Problem summary
When appending an object like bar.Repeat(direction="end") to a measure object, the barline attributes of that measure object aren't being correctly set.
Steps to reproduce
>>> m1 = stream.Measure()
>>> m2 = stream.Measure()
>>> repeat_b = bar.Repeat(direction="start")
>>> repeat_e = bar.Repeat(direction="end")
>>> m1.append(repeat_b)
>>> m1.leftBarline
<music21.bar.Repeat direction=start>
>>> m1.rightBarline
>>> m2.append(repeat_e)
>>> m2.rightBarline
>>> m2.leftBarline
<music21.bar.Repeat direction=end>
>>> r1 = note.Rest("whole")
>>> r2 = note.Rest("whole")
>>> m1 = stream.Measure()
>>> m2 = stream.Measure()
>>> m1.append(repeat_b)
>>> m1.append(r1)
>>> m2.append(r2)
>>> m2.append(repeat_e)
>>> m1.leftBarline
<music21.bar.Repeat direction=start>
>>> m1.rightBarline
>>> m2.rightBarline
>>> m2.leftBarline
>>>
Expected vs. actual behavior
When appending a bar.Repeat object with direction=="end" to a measure, the rightBarline attribute should receive it as its value. Instead, it sets leftBarline sometimes and not rightBarline.
OS is Linux Mint 21.2. I'd fix it myself, but I can't find where the attributes are being set when appending the bar.Repeat object. If anyone can help in that regard, that would be much appreciated.
Edit: Apparently this is because Measure._getRightBarline() only checks for elements of _endElements, and I'm assuming append() doesn't modify this attribute. Not sure if this is the intended behavior.
- 主要语言
- Python
- 星标
- 2.6k
- 派生
- 459
- 平均合并
- 1 天 7 小时
- 30 天内合并 PR
- 40
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cuthbertLab/music21 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
cuthbertLab/music21#2084 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
cuthbertLab/music21#2082 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
cuthbertLab/music21#2074 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
cuthbertLab/music21#2055 · 3 条评论 ·
维护者通常 1 天内回复
-
Slur bezier-x/y from start element gets overwritten by stop element's values可能重新可做 @bingliscodes 于 9 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
cuthbertLab/music21#2019 · 3 条评论 ·
维护者通常 1 天内回复
查看 cuthbertLab/music21 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
jbacalso24/mimry#291 ·
维护者通常 1 天内回复
-
good first issue
难度 2/5 1 小时以内 新手友好度 82/100
eli-alvarado/us-watchlist-alerts#14 ·
维护者通常 1 天内回复
-
from-review-extraction python severity:nit
难度 2/5 1-3 小时 新手友好度 80/100
LearningCircuit/local-deep-research#7462 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
cathrynlavery/diagram-design#441 ·
维护者通常 2 天内回复
-
[Cleanup] Include the public header in work_split.cpp可能已有人在做 @blozano-tt 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
tenstorrent/tt-metal#60850 ·
维护者通常 1 天内回复