Skip to content

Commit

Permalink
fix quodJactatur errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mscuthbert committed Sep 1, 2015
1 parent 590aa72 commit f73396b
Show file tree
Hide file tree
Showing 8 changed files with 162 additions and 11 deletions.
6 changes: 3 additions & 3 deletions dist/dist.py
Expand Up @@ -17,9 +17,9 @@
1. update the VERSION in _version.py and the single test cases in base.py and
in case of major version changes freezeThaw.JSONFreezer.jsonPrint if this wasn't done already.
2. run test/multiprocessTest.py for Python2 AND Python3
3. If all tests pass, run `corpus.cacheMetadata(['core', 'virtual'])`.
3. If all tests pass, for a major change, run `corpus.cacheMetadata(['core', 'virtual'])`. (TODO: check is working?)
4. run test/testSingleCoreAll.py
(normally not necessary,because it's slower and mostly duplicates multiprocessTest,
(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
6. then test/testSerialization
Expand All @@ -28,7 +28,7 @@
[*] you will need sphinx, IPython (pip or easy_install), markdown, and pandoc (.dmg) installed
9. run documentation/upload [not via eclipse] or upload via ssh.
9. run documentation/upload.py [not via eclipse] or upload via ssh.
10. And finally this file ON PYTHON 2.7
Expand Down
9 changes: 5 additions & 4 deletions music21/alpha/trecento/quodJactatur.py
Expand Up @@ -122,7 +122,7 @@ def prependBlankMeasures(myStream, measuresToAppend = 1, inPlace = True):
rests) to be beginning of myStream
>>> from music21.trecento import quodJactatur
>>> from music21.alpha.trecento import quodJactatur
>>> qj = quodJactatur.getQJ()
>>> qj.duration.quarterLength
70.0
Expand Down Expand Up @@ -186,7 +186,7 @@ def getQJ():
loads Quod Jactatur from the corpus, transposes it to
an easy to view range and stores it in the cache.
>>> from music21.trecento import quodJactatur
>>> from music21.alpha.trecento import quodJactatur
>>> qj = quodJactatur.getQJ()
>>> qj.flat.notesAndRests[0]
<music21.note.Note C>
Expand Down Expand Up @@ -436,9 +436,10 @@ def runTest(self):


if __name__ == "__main__":
# music21.mainTest()
import music21
music21.mainTest()
# bentWolfSolution()
possibleSolution()
# possibleSolution()
# findRetrogradeVoices()
pass
#------------------------------------------------------------------------------
Expand Down
5 changes: 2 additions & 3 deletions music21/corpus/__init__.py
Expand Up @@ -6,10 +6,9 @@
# Authors: Christopher Ariza
# Michael Scott Cuthbert
#
# Copyright: (c) 2009 The music21 Project
# License: LGPL
# Copyright: Copyright © 2009 Michael Scott Cuthbert and the music21 Project
# License: LGPL or BSD, see license.txt
#------------------------------------------------------------------------------

'''
The music21 corpus includes a collection of freely distributable
music in MusicXML, Humdrum, and other representations. The corpus
Expand Down
150 changes: 150 additions & 0 deletions music21/documentation/source/usersGuide/Untitled.rst
@@ -0,0 +1,150 @@
.. _Untitled:

.. WARNING: DO NOT EDIT THIS FILE:
AUTOMATICALLY GENERATED.
PLEASE EDIT THE .py FILE DIRECTLY.
.. code:: python
%load_ext music21.ipython21
.. code:: python
from music21 import *
n = note.Note("C#6")
n.show()
.. image:: Untitled_files/Untitled_1_0.png



.. code:: python
bach = corpus.parse('bwv66.6')
.. code:: python
bach.show()
.. image:: Untitled_files/Untitled_3_0.png



.. code:: python
k = bach.analyze('key')
.. code:: python
k
.. parsed-literal::
:class: ipython-result
<music21.key.Key of f# minor>
.. code:: python
k.alternateInterpretations
.. parsed-literal::
:class: ipython-result
[<music21.key.Key of A major>,
<music21.key.Key of b minor>,
<music21.key.Key of E major>,
<music21.key.Key of c# minor>,
<music21.key.Key of B major>,
<music21.key.Key of F# major>,
<music21.key.Key of D major>,
<music21.key.Key of e minor>,
<music21.key.Key of g# minor>,
<music21.key.Key of C# major>,
<music21.key.Key of a minor>,
<music21.key.Key of G major>,
<music21.key.Key of e- minor>,
<music21.key.Key of b- minor>,
<music21.key.Key of d minor>,
<music21.key.Key of C major>,
<music21.key.Key of A- major>,
<music21.key.Key of F major>,
<music21.key.Key of g minor>,
<music21.key.Key of f minor>,
<music21.key.Key of B- major>,
<music21.key.Key of E- major>,
<music21.key.Key of c minor>]
.. code:: python
n = note.Note('C')
s = stream.Stream()
s.append(n)
s.analyze('key')
.. parsed-literal::
:class: ipython-result
<music21.key.Key of F major>
.. code:: python
s.analyze('key').alternateInterpretations
.. parsed-literal::
:class: ipython-result
[<music21.key.Key of f minor>,
<music21.key.Key of A- major>,
<music21.key.Key of c minor>,
<music21.key.Key of a minor>,
<music21.key.Key of C major>,
<music21.key.Key of g minor>,
<music21.key.Key of B- major>,
<music21.key.Key of b- minor>,
<music21.key.Key of G major>,
<music21.key.Key of E- major>,
<music21.key.Key of d minor>,
<music21.key.Key of C# major>,
<music21.key.Key of e minor>,
<music21.key.Key of e- minor>,
<music21.key.Key of c# minor>,
<music21.key.Key of F# major>,
<music21.key.Key of D major>,
<music21.key.Key of A major>,
<music21.key.Key of E major>,
<music21.key.Key of E major>,
<music21.key.Key of b minor>,
<music21.key.Key of f# minor>,
<music21.key.Key of f# minor>]
.. code:: python
import random
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion music21/metadata/caching.py
Expand Up @@ -44,7 +44,7 @@ def cacheMetadata(
useMultiprocessing=True,
):
'''
Cache metadata from corpuses in `corpusNames` as local cache files:
Cache metadata from corpora in `corpusNames` as local cache files:
Call as ``metadata.cacheMetadata()``
Expand Down
1 change: 1 addition & 0 deletions music21/romanText/rtObjects.py
Expand Up @@ -36,6 +36,7 @@

reOptKeyOpenAtom = re.compile(r'\?\([A-Ga-g]+[b#]*:')
reOptKeyCloseAtom = re.compile(r'\?\)[A-Ga-g]+[b#]*:?')
# ?g:( ?
reKeyAtom = re.compile('[A-Ga-g]+[b#]*;:')
reAnalyticKeyAtom = re.compile('[A-Ga-g]+[b#]*:')
reKeySignatureAtom = re.compile(r'KS\-?[0-7]')
Expand Down

0 comments on commit f73396b

Please sign in to comment.