MIDI import only detects overlaps from same start time (rather than same end time also)
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
- 20/100
Hướng nghiên cứu
Start by running the reproduction snippet on the attached repro-src.mid and comparing repro-exported.mid against it. The title points at MIDI import detecting overlaps by shared start time but not shared end time, so check how tied notes are grouped when a bass note joins the chord. Done means the exported file holds the C3/E5 chord through beat one of measure 2 without re-attacking it, and the single-track case matches the multi-track workaround.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
music21 version
9.9.1
Operating System(s) checked
macOS 26.2
Problem summary
In some cases, importing then re-exporting a MIDI file with a note tied across a measure causes the note to repeat.
Steps to reproduce
from music21 import *
f = converter.parse('repro-src.mid')
f.write('midi', "repro-exported.mid")
Where:
repro-src.midis a MIDI type 1 file with a single track, rendering this:
Expected vs. actual behavior
- Expected: The exported MIDI file represents the same musical intention as the source--that is, the C3/E5 chord is held through the first beat of the 2nd measure.
- Actual: The exported MIDI file doesn't tie the C3/E5 chord, but rather plays it again at the beginning of the measure, as if it was written:
More information
I've tried multiple variations of this and found a few different behaviors that all seem to be related, but I'm not sure what the actual expected behavior should be given the structure of the source MIDI. Is my program required to "clean up" or parse the MIDI file into separate tracks somehow before having music21 export it?
- If you
show()the file, the score looks even different from the exported MIDI: it plays the A4 notes in series with the C3/E5 chord, not simultaneously
- If I edit the MIDI file to have the E5 and the A4 notes on one track, and the C3 on a second track (e.g., export the C3 onto a bass clef), everything works as expected. The exported file has 3 tracks, with the E5 and A4 notes on track 2, and the C3 on track 3.
- If I remove the C3 note so that only the E5 is tied, the export works as expected. It seems like something about adding the bottom note is causing the midi export to be wonky. (Note however that in this case,
show()still renders the A4 notes in series with the E5, rather than simultaneously with it.)
- The MIDI files in question are mechanically generated, so there shouldn't be any question of duration variance causing problems.
I've attached the source and exported MIDI files for context.
- 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 9 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ự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
UKGovernmentBEIS/control-arena#917 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
debpalash/VoiceStudio#2937 ·
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
aws-samples/sample-per-model-bedrock#261 ·
Maintainer thường phản hồi trong vòng 1 ngày