Comments (5)
Priority is higher for title, composer, lower for other information that m21 can handle (except for date uncertainty, etc. which would be a good test of the m21 metadata system that goes beyond MusicXML), and lowest for things that m21 can't currently handle, such as language-specific titles, etc.
from music21.
It looks to me like the problems could originate with HumdrumDataCollection.InsertGlobalEvents(). I see two issues with this function:
-
parseLines is called twice, so insertGlobalEvents is called twice. The first time, it is called before self.eventList has anything in it. Because self.eventList is empty, insertGlobalEvents can't do anything. The second time it is called, it exits immediately because the self.globalEventsInserted flag has already been set.
-
While the GlobalEvents may be correctly parsed, they are not correctly inserted into a metadata object by the insertGlobalEvents function. The problem appears to be at line 709 of spineParser.py. The correctly parsed GlobalEvents are not put into a metadata object, they are just shoved into the top level of the score.
I made some quick and gross hacks to fix the above two problems. I tested my code on the bach 371 chorales humdrum repo and it appears to read in the title correctly. With this code, only the title of the humdrum piece is properly read into the metadata, not composer or any other info. These hacks can be found in my forked copy of music21. I just added about 5 lines to insertGlobalEvents(). here is the fix for bullet point 1 here is the fix for bullet point 2
Once you can confirm with me that I'm taking the right approach, I will follow up and add the other info to the metadata.
(apologies for the messed up whitespace in my commit... my emacs is not configured right. If you decide to merge in my changes, I will fix the whitespace.)
from music21.
these look like a great approach to the problem. Thank you! Please make a fresh branch off of the master git repository with just these changes and let's start pull request merging. :-) Thanks!
from music21.
Alright, I have a pull request pending from my own fork
I gotta say, your CI system is pretty cool. I didn't know that could be integrated so smoothly with github.
from music21.
Hi John! I used your method to get most metadata parsing working from humdrum to music21. I used a slightly different approach, but I'm glad for your code ideas. It's in the commit for today.
Dates are still missing, but now it's easy to add new data. It's all in the GlobalReference object.
Thanks!
from music21.
Related Issues (20)
- Percussion "pitch" not preserved on MIDI import for generic/unrecognized percussion instruments HOT 1
- Tuplet noted in ABC convert to MusicXML
- change music program (instrument) HOT 1
- read midi file HOT 1
- Normal Form isn't computed correctly HOT 1
- Prevent redundant accidentals HOT 1
- streamStatus accidentals inconsistencies
- When there are no barlines HOT 2
- Add xmlID as a property of at least note and rest objects when parsing xml/mei scores HOT 1
- Midi to MusicXML? HOT 1
- In ABC notation, inline notation of key and time signature changes in the middle of a song using [] does not convert correctly to MusicXML.
- Diminuendo doesn't span all elements that are part of it HOT 2
- Chord symbol "Co omit5" does not parse
- Chatgpt--Music21 HOT 1
- simplifyMultipleEnharmonics gives different spellings in different octaves
- MusicXML import of scores which include drumset parts loses most of instrument information HOT 1
- Chord clarifciation HOT 2
- Issues with install the music21 library in kaggle notebook HOT 1
- Missing humdrumPosition in thisSpine.stream.flatten() with root cause analysis HOT 1
- Measure.rightBarline not being correctly set when appending bar.Repeat HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from music21.