cuthbertLab/music21 — pull request #72 by gperciva (2014-11-26 02:14:33+00:00)
Title: Adjust duration fields for stage1 musedata

According to craigsapp in
https://github.com/cuthbertLab/music21/issues/69
"""
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])
"""

This patch adjusts the musedata import to match the "example code"
mentioned by Craig.