Comments (4)
Sorry, but the external shell program and not working on Windows are show-stoppers to using this approach. If you want to make a separate repo that people can download which adds this functionality to music21 I'd be happy to point to that project.
from music21.
Sure, that makes sense. A half-solution and a new security hole really aren't very good. I'll try again!
from music21.
After some further research, we've decided not to bother with this in music21 itself. The following is an explanation of our decision, for people from The Future who may want to know.
We did find that the python-magic library allows both MIME type and encoding detection without using a shell command. It wraps (and therefore relies on the existence of) a C library for proper operation. We could ship the C library, the python-magic library, and a custom-made "magic file" that would allow fully accurate file-type guessing for all of music21's supported file types, in addition to greatly improved encoding detection. Although this really would solve the two problems, it also introduces significant complexity.
In addition, I believe I'm the only person who's ever desired more reliable file-type and encoding detection in music21, and I only want this because we (at ELVIS/SIMSSA) run music21 on a public Web server. In other words, considering the problems it would cause the music21 developers to maintain a feature that's really only for us, it's more reasonable at this time to improve our software than to push something to music21.
If something changes in the future, and the music21 developers would indeed like to incorporate improved file-type and encoding detection, I would be happy to contribute a patch. Thanks to Myke for allowing my exploration!
from music21.
Thanks for the update and explanation, Chris!
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.