Missing humdrumPosition in thisSpine.stream.flatten() with root cause analysis
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
Start with the Humdrum (**kern) parser's DynamSpine.parse() around line 1445, where a Dynamic is created for the piano marking in the pickup measure. Then check the del el.humdrumPosition at about line 1811 and the lookup prioritiesToSearch[dynamic.humdrumPosition] at about line 1947. Done means a score parsed from sonata06-1.krn without an AttributeError, with the pickup dynamic kept in the stream. The reproduction needs the external kern file, so get a local copy first.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
music21 version
9.1.0
Problem summary
Loaded a krn format into music21 and received the following error message:
AttributeError: 'Dynamic' object has no attribute 'humdrumPosition'
Steps to reproduce
from music21 import converter
score = converter.parse('http://kern.ccarh.org/data?l=beethoven/sonatas&file=sonata06-1.krn')
Expected vs. actual behavior
Expecting the Sonata to render but get error message instead.
Root Cause Analysis
After running the debugger, I noticed that when the parse() method from the DynamSpine class is run in line 1445, and when eventC = 'p', then a Dynamic object is created <music21.dynamics.Dynamic p>. This object has a humdrumPosition attribute. But this attribute is removed from the object in line 1811 (del el.humdrumPosition) which is why when trying to access this attribute in line 1947 (prioritiesToSearch[dynamic.humdrumPosition] = dynamic), we receive the error message.
In this particular sonata, I noticed that the dynamic object is the piano marking in the pickup measure. Curiously, if we remove this marking from the .krn file (line 21), then everything works as expected.
To summarize, it is likely that music21 has difficulty parsing dynamic markings found in pickup measures
Miscellaneous Information
Apple M1 Pro
macOS Sonoma 14.3.1
- Ngôn ngữ chính
- Python
- Star
- 2.6k
- Fork
- 459
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 40
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cuthbertLab/music21
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
cuthbertLab/music21#2084 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
cuthbertLab/music21#2082 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`TypeError` in `ChordReducer.run()` on multi-part `stream.Score` without instrument `partId`sĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
cuthbertLab/music21#2074 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
cuthbertLab/music21#2055 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Slur bezier-x/y from start element gets overwritten by stop element's valuesCó thể làm lại được @bingliscodes đã nhận 8 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
cuthbertLab/music21#2019 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cuthbertLab/music21
Issue tương tự
-
`burr` fails to start when the Python path has a space in itCó thể đã có người làm @enekoreto đã nhận hôm nay. Đang mởstatus/needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 5 ngày
-
gemini 出现了新的域名需要加入Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
debpalash/VoiceStudio#2903 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dagster-io/community-integrations#367 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
aws-samples/sample-per-model-bedrock#243 ·
Maintainer thường phản hồi trong vòng 1 ngày