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

Percussion "pitch" not preserved on MIDI import for generic/unrecognized percussion instruments

Đang mở
#1,659 1 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

@PRAYAG-PATEL-1998 đang làm issue này rồi.

Từ ngày 26/10/2026.

  • #2108 của @mscuthbert — đã merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
30/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
data

Hướng nghiên cứu

Start by reproducing the report: parse the Groove MIDI file with music21.converter.parse(..., quantizePost=False), write it back with stream.write("midi", ...), and compare the drum notes in a MIDI editor. The payload does not name the module that maps percussion pitches, so locate it from the MIDI import code. Done means percussion notes on channel 10 keep their pitches on a round trip, with a test covering an unrecognized percussion instrument.

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

Mô tả

good first issue percussion

music21 version

9.1.0

Problem summary

I'm trying to manipulate a MIDI file from the Groove MIDI dataset:
groove/drummer1/eval_session/1_funk-groove1_138_beat_4-4.mid

When I read, and then immediately rewrite the file on the disk, some "pitches" (or rather some instruments as drums are represented as pitches in channel 9/10 in midi) are changed.

Steps to reproduce

Run the following:

from pathlib import Path
import music21

file_path = Path("groove/drummer1/eval_session/1_funk-groove1_138_beat_4-4.mid")

stream = music21.converter.parse(file_path, quantizePost=False)
stream.write("midi", fp="/tmp/test_write.mid")

Then open both the original and the new file in a MIDI editor:
midi

Expected vs. actual behavior

I would expect the new file to be the same as the initial one.

More information

Python version: 3.11.5

Ngôn ngữ chính
Python
Star
2.6k
Fork
459
Merge trung bình
12 giờ 54 phút
Pull request đã merge (30 ngày)
45

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.