MIDI import: makeTies()/makeMeasures() permanently desyncs later note offsets by whole bars when simultaneous notes of different length collide
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 54/100
Línea de trabajo
Start by reproducing the supplied MIDI example with mido and music21.converter.parse(..., quantizePost=False), then trace midiTrackToStream and its makeMeasures()/makeTies() processing. Compare the resulting note offsets with the raw MIDI event timing; done means the final note lands at offset 12.0 rather than 16.0 and later offsets remain synchronized.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
music21 version: 10.5.0
MIDI import permanently desyncs note offsets by one bar once a short tied note ends while a longer tied note is still sounding — every later note shifts one bar late from there on. Seen on real orchestral MIDI, inflating a track's measure count.
Minimal reproduction
import mido, music21
t = 480
mid = mido.MidiFile(ticks_per_beat=t, type=1)
trk = mido.MidiTrack(); mid.tracks.append(trk)
M = mido.Message
trk.extend([
M('note_on', note=58, velocity=100, time=0),
M('note_on', note=62, velocity=100, time=0),
M('note_on', note=55, velocity=100, time=0),
M('note_off', note=58, velocity=0, time=t*8),
M('note_off', note=62, velocity=0, time=0),
M('note_off', note=55, velocity=0, time=t*4),
M('note_on', note=60, velocity=100, time=0),
M('note_off', note=60, velocity=0, time=t),
])
mid.save('repro.mid')
raw = music21.converter.parse('repro.mid', quantizePost=False)
for n in sorted(raw.flatten().notes, key=lambda x: x.offset):
print(n.offset, n.quarterLength, n.tie)
Last note should land at offset 12.0; it lands at 16.0:
0.0 4.0 <Tie start>
0.0 4.0 <Tie start>
8.0 4.0 <Tie stop>
8.0 4.0 <Tie continue>
12.0 4.0 <Tie stop>
16.0 1.0 None
Workaround: cross-check against a raw mido decode and rebuild when it disagrees; real fix likely belongs in midiTrackToStream's makeMeasures()/makeTies().
- Lenguaje dominante
- Python
- Estrellas
- 2.6k
- Forks
- 459
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 40
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cuthbertLab/music21
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
cuthbertLab/music21#2084 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
cuthbertLab/music21#2082 ·
Los mantenedores suelen responder en 1 día
-
`TypeError` in `ChordReducer.run()` on multi-part `stream.Score` without instrument `partId`sAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
cuthbertLab/music21#2074 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
cuthbertLab/music21#2055 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Slur bezier-x/y from start element gets overwritten by stop element's valuesQuizá libre de nuevo @bingliscodes la tomó hace 9 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
cuthbertLab/music21#2019 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de cuthbertLab/music21
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
common-workflow-language/cwl-utils#477 ·
Los mantenedores suelen responder en 1 día
-
Add dependabotAbiertofeat
Dificultad 2/5 Menos de una hora Aptitud para principiantes 72/100
open-nudge/opentemplate#204 ·
Los mantenedores suelen responder en 1 día
-
github-stale-ci-pr-closer: KV state is double-wrapped, never persists, and hits the depth-32 limitPosiblemente ocupada @VascoSch92 la tomó hoy. Abiertopriority:medium ready-for-dev
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OpenHands/extensions#781 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
curriculum documentation quality
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
githubnext/gh-aw-workshop#4638 ·
Los mantenedores suelen responder en 1 día