Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,659 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
data

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
2.6k
Fork
459
Merge medio
1g 8h
PR unite (30g)
39

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cuthbertLab/music21

Tutte le issue di cuthbertLab/music21

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.