Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@
"source": [
"### getContextByClass()\n",
"\n",
"This is an extremely powerful tool -- you might not use it often, but be assured that `music21` is using it on your behalf all the time when sophisticated analysis is involved. It finds the active element matching a certain class preceeding the element. Let me demonstrate:"
"This is an extremely powerful tool -- you might not use it often, but be assured that `music21` is using it on your behalf all the time when sophisticated analysis is involved. It finds the active element matching a certain class preceding the element. Let me demonstrate:"
]
},
{
Expand Down Expand Up @@ -803,7 +803,7 @@
"\n",
"Then if that fails, it will look at the score as a whole, beginning at offset 35 and working backwards, but only looking at things that are at the score level, not looking at elements within other parts. There may be scores where for instance, expressive markings appear at the Score level. This will find them.\n",
"\n",
"Related to `.getContextByClass()` is `.getAllContextsByClass()` which is a generator that returns each preceeding context."
"Related to `.getContextByClass()` is `.getAllContextsByClass()` which is a generator that returns each preceding context."
]
},
{
Expand Down
4 changes: 1 addition & 3 deletions documentation/source/usersGuide/usersGuide_61_trees.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -639,9 +639,7 @@
{
"cell_type": "markdown",
"metadata": {},
"source": [
"And using this information they can get the verticalities just preceeding or following them:"
]
"source": "And using this information they can get the verticalities just preceding or following them:"
},
{
"cell_type": "code",
Expand Down
9 changes: 8 additions & 1 deletion music21/roman.py
Original file line number Diff line number Diff line change
Expand Up @@ -3058,7 +3058,6 @@ def adjustMinorVIandVIIByQuality(
>>> rn.frontAlterationAccidental
<music21.pitch.Accidental sharp>


>>> rn = roman.RomanNumeral()
>>> rn.scaleDegree = 6
>>> rn.impliedQuality = 'major'
Expand All @@ -3068,6 +3067,9 @@ def adjustMinorVIandVIIByQuality(
>>> rn.frontAlterationAccidental is None
True

Note that this function is not called in parsing, but a private function having the
guts of this function is called.

* Changed in v6.4: public function became hook to private function having the actual guts
'''
unused_workingFigure = self._adjustMinorVIandVIIByQuality('', useScale)
Expand Down Expand Up @@ -3104,6 +3106,11 @@ def _adjustMinorVIandVIIByQuality(
'''
def sharpen(wFig: str) -> str:
changeFrontAlteration(interval.Interval('A1'), 1)

# changing the working figure is important if the private function is called
# on its own (as happens in parse figure). It doesn't have any effect if
# calling the public adjustMinorVIandVIIByQuality.

# If root is in the figure, lower the root to avoid double-sharpening
if '##' in wFig:
wFig = wFig.replace('##8', '#8')
Expand Down
Loading