You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Then open both the original and the new file in a MIDI editor:
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
The text was updated successfully, but these errors were encountered:
jacobtylerwalls
changed the title
Drums get modified when MIDI file read by music21
Percussion "pitch" not preserved on MIDI import for generic/unrecognized percussion instruments
Dec 10, 2023
It boils down to music21 exhibiting a lossy import for percussion sounds it has decided not represent with dedicated classes (along the lines of #1518). We could still preserve the pitch number from the MIDI event and stick it here, where you see None currently:
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:
Then open both the original and the new file in a MIDI editor:
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
The text was updated successfully, but these errors were encountered: