MIDI import: makeTies()/makeMeasures() permanently desyncs later note offsets by whole bars when simultaneous notes of different length collide
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
- 54/100
Hướng nghiên cứu
Start by reproducing the supplied MIDI example with mido and music21.converter.parse(..., quantizePost=False), then trace midiTrackToStream and its makeMeasures()/makeTies() processing. Compare the resulting note offsets with the raw MIDI event timing; done means the final note lands at offset 12.0 rather than 16.0 and later offsets remain synchronized.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
music21 version: 10.5.0
MIDI import permanently desyncs note offsets by one bar once a short tied note ends while a longer tied note is still sounding — every later note shifts one bar late from there on. Seen on real orchestral MIDI, inflating a track's measure count.
Minimal reproduction
import mido, music21
t = 480
mid = mido.MidiFile(ticks_per_beat=t, type=1)
trk = mido.MidiTrack(); mid.tracks.append(trk)
M = mido.Message
trk.extend([
M('note_on', note=58, velocity=100, time=0),
M('note_on', note=62, velocity=100, time=0),
M('note_on', note=55, velocity=100, time=0),
M('note_off', note=58, velocity=0, time=t*8),
M('note_off', note=62, velocity=0, time=0),
M('note_off', note=55, velocity=0, time=t*4),
M('note_on', note=60, velocity=100, time=0),
M('note_off', note=60, velocity=0, time=t),
])
mid.save('repro.mid')
raw = music21.converter.parse('repro.mid', quantizePost=False)
for n in sorted(raw.flatten().notes, key=lambda x: x.offset):
print(n.offset, n.quarterLength, n.tie)
Last note should land at offset 12.0; it lands at 16.0:
0.0 4.0 <Tie start>
0.0 4.0 <Tie start>
8.0 4.0 <Tie stop>
8.0 4.0 <Tie continue>
12.0 4.0 <Tie stop>
16.0 1.0 None
Workaround: cross-check against a raw mido decode and rebuild when it disagrees; real fix likely belongs in midiTrackToStream's makeMeasures()/makeTies().
- Ngôn ngữ chính
- Python
- Star
- 2.6k
- Fork
- 459
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 39
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
-
Midi bank number supportĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
cuthbertLab/music21#2088 ·
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
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 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 13 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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
cuthbertLab/music21#1714 ·
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 74/100
eclipse-score/inc_someip_gateway#356 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[BUG]: `GitHubRestAdapter.check_user_permission` and `has_write_access` raise `TypeError` (missing `params`), silently disabling the inactivity lifecycleCó thể đã có người làm @tarunagnihotri534 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
AOSSIE-Org/Gitcord-GithubDiscordBot#167 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
mihai-vlc/sublime-jsfmt#56 ·
-
comp/cli comp/plugins P2 type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
NousResearch/hermes-agent#141917 · 1 bình luận ·
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 78/100
riscv/riscv-opcodes#441 ·