Comments (3)
Unfortunately, the parsing is correct. See: http://www.ccarh.org/publications/books/beyondmidi/online/musedata/record-organization/index.html#regular -- the duration in divisions can only occupy two spaces, and column 5 must be blank.
However, the theoretically perfect is the enemy of the actually useful, so I have added a patch that uses the number in column 5 ( python column 4 ) as part of the division if it is not blank. If it's not a number though then it will raise an Exception.
Running the test suite now and then committing. Thanks!
P.S. In testing, use "forceSource=True" in your converter.parse() call, which will not cache anything.
from music21.
Walter happened to be in just now, and I checked with him. All of the Haydn string quartets are in the "Stage 1" MuseData format. Stage 1 is functionally equivalent to MIDI files. Stage 1 is the format into which data entry is entered via real-time performance (such as Finale HyperScribe). The Stage 1 files are then typically converted into Stage 2 MuseData files further edited for printing, with Stage 2 files being functionally equivalent to MusicXML files.
The confusion is that the duration field in Stage 2 files is in columns 6-9 (indexed from 1), while in Stage 1 files duration is stored in columns 5-8 (also indexed from 1). So in Stage 1 files, "rest168" is correct, but it would be "rest 168" in Stage 2 files. The main reason for this shift is to accommodate cue-sized rests in Stage 2 files, which are indicated by the tag "crest" (which takes up columns 1-5). Stage 1 files were not updated for "crest" since it is only intended for MIDI-level data entry (which has no need of cue-sized rests).
In other words, the example code should probably be (as Myke has done):
if self.stage == 1:
divisions = int(self.src[4:7])
else:
divisions = int(self.src[5:8])
Personally, I'd be tempted to convert all the old formats to musicxml and junk the old files.
That's great, particularly for Stage 1 files which also have complexities such as music in each new time signature will be placed in a separate file, etc. But you guys are also aware of the license agreement for MuseData files?:
http://musedata.ccarh.org/legal/lcr.html
Any exceptions should go through Eleanor Selfridge-Field ([email protected]).
from music21.
The permission to redistribute these files in music21 was cleared with ESF a long time ago and is acknowledged.
from music21.
Related Issues (20)
- 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
- Incorrect Key Signature Parsing in MEI Files
- can't run tests because of lilypond import issue HOT 1
- tinyNotation --> tiny doc clarification ;)
- Voices changing staffs
- Tiny doc clarification HOT 3
- Allow objects to be in multiple sites
- expandRepeats don't work as expected HOT 1
- Loading `MusicXML` file produces error
- Extra rest inserted when parsing MusicXML with backup/forward tags
- MusicXML writer: Ottavas that start or end in the middle of a multi-voice measure get the wrong notes from the other voices HOT 10
- The documentation not found HOT 2
- documentation and user's guide not found! HOT 3
- Offset reset after rest or alteration within a voice? HOT 1
- Stem styles aren't exported unless stemDirection is explicit
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.