Missing humdrumPosition in thisSpine.stream.flatten() with root cause analysis
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
- 30/100
Direzione di ricerca
Start with the Humdrum (**kern) parser's DynamSpine.parse() around line 1445, where a Dynamic is created for the piano marking in the pickup measure. Then check the del el.humdrumPosition at about line 1811 and the lookup prioritiesToSearch[dynamic.humdrumPosition] at about line 1947. Done means a score parsed from sonata06-1.krn without an AttributeError, with the pickup dynamic kept in the stream. The reproduction needs the external kern file, so get a local copy first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
music21 version
9.1.0
Problem summary
Loaded a krn format into music21 and received the following error message:
AttributeError: 'Dynamic' object has no attribute 'humdrumPosition'
Steps to reproduce
from music21 import converter
score = converter.parse('http://kern.ccarh.org/data?l=beethoven/sonatas&file=sonata06-1.krn')
Expected vs. actual behavior
Expecting the Sonata to render but get error message instead.
Root Cause Analysis
After running the debugger, I noticed that when the parse() method from the DynamSpine class is run in line 1445, and when eventC = 'p', then a Dynamic object is created <music21.dynamics.Dynamic p>. This object has a humdrumPosition attribute. But this attribute is removed from the object in line 1811 (del el.humdrumPosition) which is why when trying to access this attribute in line 1947 (prioritiesToSearch[dynamic.humdrumPosition] = dynamic), we receive the error message.
In this particular sonata, I noticed that the dynamic object is the piano marking in the pickup measure. Curiously, if we remove this marking from the .krn file (line 21), then everything works as expected.
To summarize, it is likely that music21 has difficulty parsing dynamic markings found in pickup measures
Miscellaneous Information
Apple M1 Pro
macOS Sonoma 14.3.1
- 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 9 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
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
huggingface/sentence-transformers#4186 ·
I maintainer di solito rispondono entro 5 giorni
-
documentation good first issue
Difficoltà 2/5 Mezza giornata Idoneità per principianti 72/100
sujithputta02/Esapay#13 ·
-
bot-triaged module: correctness (silent) module: mps module: NaNs and Infs triage review
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
README: CI link/badge checkAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
SCIInstitute/SCIRun#2842 ·
I maintainer di solito rispondono entro 3 giorni