Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

streamStatus accidentals inconsistencies

Đang mở
#1,668 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Start by running the four-line snippet from the report and checking the note's accidental display. The mismatch sits between PartExporter.fixupNotationMeasured() in music21/musicxml/m21ToXml.py, which checks haveAccidentalsBeenMade(), and makeAccidentals() in music21/stream/makeNotation.py, which sets the property directly; streamStatus.accidentals is also involved. Done means a note whose accidental has displayType 'never' is exported with no accidental, and existing accidental tests still pass.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

music21 version

9.2.0b2

Problem summary
Accidentals are remade on streams that users may have already made accidentals for instead of short-circuiting. Discovered responding to #1667.

Steps to reproduce

n = note.Note()
n.pitch.accidental = pitch.Accidental('flat')
n.pitch.accidental.displayType = 'never'
n.show()

Expected vs. actual behavior
Expected: no accidental
Actual: accidental

More information
PartExporter.fixupNotationMeasured() checks haveAccidentalsBeenMade():
https://github.com/cuthbertLab/music21/blob/a938a8c8c74f21ceec5a99a1998d96c00d5f77e9/music21/musicxml/m21ToXml.py#L2866

But makeAccidentals sets the property instead:
https://github.com/cuthbertLab/music21/blob/a938a8c8c74f21ceec5a99a1998d96c00d5f77e9/music21/stream/makeNotation.py#L1739-L1740

But even PartExporter.fixupNotationMeasured() is probably too late, given that fromGeneralObject() runs first, runs makeNotation, and neither streamStatus.accidentals nor streamStatus.haveAccidentalsBeenMade() is checked.

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

Mở trong Codespaces

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.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cuthbertLab/music21

Tất cả issue của cuthbertLab/music21

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.