MIDI import only detects overlaps from same start time (rather than same end time also)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 20/100
Direzione di ricerca
Start by running the reproduction snippet on the attached repro-src.mid and comparing repro-exported.mid against it. The title points at MIDI import detecting overlaps by shared start time but not shared end time, so check how tied notes are grouped when a bass note joins the chord. Done means the exported file holds the C3/E5 chord through beat one of measure 2 without re-attacking it, and the single-track case matches the multi-track workaround.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
music21 version
9.9.1
Operating System(s) checked
macOS 26.2
Problem summary
In some cases, importing then re-exporting a MIDI file with a note tied across a measure causes the note to repeat.
Steps to reproduce
from music21 import *
f = converter.parse('repro-src.mid')
f.write('midi', "repro-exported.mid")
Where:
repro-src.midis a MIDI type 1 file with a single track, rendering this:
Expected vs. actual behavior
- Expected: The exported MIDI file represents the same musical intention as the source--that is, the C3/E5 chord is held through the first beat of the 2nd measure.
- Actual: The exported MIDI file doesn't tie the C3/E5 chord, but rather plays it again at the beginning of the measure, as if it was written:
More information
I've tried multiple variations of this and found a few different behaviors that all seem to be related, but I'm not sure what the actual expected behavior should be given the structure of the source MIDI. Is my program required to "clean up" or parse the MIDI file into separate tracks somehow before having music21 export it?
- If you
show()the file, the score looks even different from the exported MIDI: it plays the A4 notes in series with the C3/E5 chord, not simultaneously
- If I edit the MIDI file to have the E5 and the A4 notes on one track, and the C3 on a second track (e.g., export the C3 onto a bass clef), everything works as expected. The exported file has 3 tracks, with the E5 and A4 notes on track 2, and the C3 on track 3.
- If I remove the C3 note so that only the E5 is tied, the export works as expected. It seems like something about adding the bottom note is causing the midi export to be wonky. (Note however that in this case,
show()still renders the A4 notes in series with the E5, rather than simultaneously with it.)
- The MIDI files in question are mechanically generated, so there shouldn't be any question of duration variance causing problems.
I've attached the source and exported MIDI files for context.
- Lingua principale
- Python
- Stelle
- 2.6k
- Fork
- 459
- Merge medio
- 1g 7h
- PR unite (30g)
- 40
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cuthbertLab/music21
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cuthbertLab/music21#2084 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cuthbertLab/music21#2082 ·
I maintainer di solito rispondono entro 1 giorno
-
`TypeError` in `ChordReducer.run()` on multi-part `stream.Score` without instrument `partId`sAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
cuthbertLab/music21#2074 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cuthbertLab/music21#2055 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Slur bezier-x/y from start element gets overwritten by stop element's valuesForse di nuovo libera @bingliscodes l’ha presa 8 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cuthbertLab/music21#2019 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cuthbertLab/music21
Issue simili
-
Workflow.schedule stops when a cron deadline passes before sleepForse già presa @HuaTNA l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug] HiveDialect shares its colspecs dict with SQLAlchemy's DefaultDialect (python/pyhive)Forse già presa @rusackas l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
apache/kyuubi#7786 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
[20.0] hr_work_entry: Duration column of Export Time Entries is truncated to whole hoursForse già presa @odooaktiv l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
fix formatting of the sample database page of the docsForse già presa @Aaqibhafeezkhan l’ha presa oggi. Apertadocumentation good first issue help wanted
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
chaoss/CollectOSS#544 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno