Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#1,659 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
data

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Python
スター
2.6k
フォーク
459
平均マージ
1日 7時間
マージ済み PR(30日)
40

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cuthbertLab/music21 のほかの issue

cuthbertLab/music21 の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。