diff --git a/dist/dist.py b/dist/dist.py index a45aa940d7..3922506976 100644 --- a/dist/dist.py +++ b/dist/dist.py @@ -21,7 +21,7 @@ 4. run test/testSingleCoreAll.py (normally not necessary, because it's slower and mostly duplicates multiprocessTest, but should be done before making a release). Done automatically by Travis-CI on GitHub commit -5. then test/testDocumentation +5. then python3 test/testDocumentation.py # only designed for Python 3... 6. then test/testSerialization 7. run documentation/make.py clean 8. run documentation/make.py [*] @@ -32,7 +32,8 @@ 10. And finally this file ON PYTHON 2.7 -11. COMMIT to Github at this point, then don't change anything until the next step is done. +11. COMMIT to Github at this point w/ commit comment of the new version, + then don't change anything until the next step is done. (.gitignore SHOULD avoid uploading the large files created here...) 12. Create a new release on GitHub and upload the FIVE files created here. Use tag v2.0.1 (etc.). diff --git a/music21/documentation/source/usersGuide/.ipynb_checkpoints/usersGuide_03_pitches-checkpoint.ipynb b/music21/documentation/source/usersGuide/.ipynb_checkpoints/usersGuide_03_pitches-checkpoint.ipynb index 7e2d72f47e..5ee4b10b63 100644 --- a/music21/documentation/source/usersGuide/.ipynb_checkpoints/usersGuide_03_pitches-checkpoint.ipynb +++ b/music21/documentation/source/usersGuide/.ipynb_checkpoints/usersGuide_03_pitches-checkpoint.ipynb @@ -987,15 +987,17 @@ "source": [ "Music21 can also deal with other `quarterLengths` such as 0.8,\n", "which is 4/5ths of a quarter note, or 1/3 which is an eighth note triplet.\n", + "\n", "Just be careful when creating triplets, because of a weird Python 2 quirk\n", - "that makes it so that if you divide two integers you always get back just\n", + "that makes it so that if you divide two integers with \"/\" you always get back just\n", "the integer part of the number, so 8/3 is 2, since 8/3 is 2.66666... and\n", - "the integer part is 2:" + "the integer part is 2. I will use \"//\" in this example, since \"//\" appears\n", + "in both Python 2 and Python 3 and is equivalent to Python 2's \"/\"" ] }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 1, "metadata": { "collapsed": false }, @@ -1006,18 +1008,18 @@ "2" ] }, - "execution_count": 33, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "8/3" + "8//3" ] }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 2, "metadata": { "collapsed": false }, @@ -1028,13 +1030,13 @@ "0" ] }, - "execution_count": 34, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "1/3" + "1//3" ] }, { diff --git a/music21/documentation/source/usersGuide/usersGuide_03_pitches.ipynb b/music21/documentation/source/usersGuide/usersGuide_03_pitches.ipynb index 7e2d72f47e..5ee4b10b63 100644 --- a/music21/documentation/source/usersGuide/usersGuide_03_pitches.ipynb +++ b/music21/documentation/source/usersGuide/usersGuide_03_pitches.ipynb @@ -987,15 +987,17 @@ "source": [ "Music21 can also deal with other `quarterLengths` such as 0.8,\n", "which is 4/5ths of a quarter note, or 1/3 which is an eighth note triplet.\n", + "\n", "Just be careful when creating triplets, because of a weird Python 2 quirk\n", - "that makes it so that if you divide two integers you always get back just\n", + "that makes it so that if you divide two integers with \"/\" you always get back just\n", "the integer part of the number, so 8/3 is 2, since 8/3 is 2.66666... and\n", - "the integer part is 2:" + "the integer part is 2. I will use \"//\" in this example, since \"//\" appears\n", + "in both Python 2 and Python 3 and is equivalent to Python 2's \"/\"" ] }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 1, "metadata": { "collapsed": false }, @@ -1006,18 +1008,18 @@ "2" ] }, - "execution_count": 33, + "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "8/3" + "8//3" ] }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 2, "metadata": { "collapsed": false }, @@ -1028,13 +1030,13 @@ "0" ] }, - "execution_count": 34, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "1/3" + "1//3" ] }, { diff --git a/music21/musicxml/xmlToM21.py b/music21/musicxml/xmlToM21.py index 459ba67736..3f8f59798d 100644 --- a/music21/musicxml/xmlToM21.py +++ b/music21/musicxml/xmlToM21.py @@ -1923,8 +1923,8 @@ def xmlToDuration(self, mxNote, inputM21=None): durRaw.quarterLength = qLen try: d.components = durRaw.components - except duration.DurationException: - qLenRounded = 2.0**round(math.log2(qLen)) + except duration.DurationException: # TODO: Test + qLenRounded = 2.0**round(math.log(qLen, 2)) # math.log2 appears in py3.3 environLocal.printDebug(['mxToDuration', 'rounding duration to {0} as type is not'.format(qLenRounded) + 'defined and raw quarterlength ({0}) is not a computable duration'.format(qLen)])