**harm spine import errors out on unrecognized token
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 28/100
Línea de trabajo
Start with the humdrum harm-token handling in music21/humdrum/harmparser.py, where the parser returns None for unrecognized tokens (around line 66), and reproduce by parsing the linked .krn file with converter.parse(format='humdrum'). Done means an unrecognized **harm token no longer raises, and the maintainers have settled whether the fix is a default object, an opt-out setting, or keeping the raw token string, since the issue lists all three without choosing. The thread has no replies and the issue is over three years old, so confirm the approach with a maintainer before writing code.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
music21 version
8.3.0
Problem summary
Steps to reproduce
import music21
path = 'https://raw.githubusercontent.com/jcdevaney/TAVERN/master/Beethoven/B068/Joined/B068_00_01a_a.krn'
score = music21.converter.parse(path, format='humdrum') # raises type error
Expected vs. actual behavior
I would expect the **harm spine parser to either not run by default or to handle unrecognized symbols without raising an error. If running the parser remains the default, perhaps there could be a setting that lets us not run the parser.
More information
This was run on a mac m1. An easy fix would be to have some sort of handling of unrecognized chord symbols. This line currently returns None which is fine but the final result of an unrecognized token should be some kind of default or empty music21 roman object.
The reason the score linked to above doesn't process is because it encodes the duration information into the chord tokens as well which is a relatively common thing to do in humdrum. In my case, I am not even using the results of the HarmParser. Instead I use music21's tools for reading any spine and take the **harm tokens as they are. But even doing it this way does not work without editing the score to remove the durations and occasional other unrecognized tokens.
Ideally there would be:
- a default value for unrecognized tokens
- a way to omit automatic parsing of **harm spines
- a bit of a side-quest, but it seems like you should be able to access the original **harm token's string no matter how it eventually gets represented (like the .contents attribute of objects in spine.eventList)
- 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
-
documentation good first issue
Dificultad 2/5 Medio día Aptitud para principiantes 72/100
sujithputta02/Esapay#13 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Flaky: credential-proxy admission metric test asserts a wall-clock bound it does not establishAbiertoneeds-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
gke-labs/kube-agents#3277 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
jbacalso24/mimry#291 ·
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 2/5 Menos de una hora Aptitud para principiantes 82/100
eli-alvarado/us-watchlist-alerts#14 ·
Los mantenedores suelen responder en 1 día