Skip to content

Commit

Permalink
Merge pull request #1743 from cuthbertLab/happy-new-year-2025
Browse files Browse the repository at this point in the history
Happy New Year 2025
  • Loading branch information
mscuthbert authored Jan 4, 2025
2 parents 1dfb6d0 + 0d533d3 commit 851e674
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 14 deletions.
7 changes: 7 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
`music21` -- A Toolkit for Computer-Aided Musical Analysis and
Computational Musicology

Copyright © 2006-2024 [Michael Scott Asato Cuthbert](http://www.trecento.com)
Copyright © 2006-2025 [Michael Scott Asato Cuthbert](http://www.trecento.com)

For more information, visit:
https://www.music21.org/music21docs/
Expand Down
10 changes: 6 additions & 4 deletions music21/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
'''
The music21 Framework is Copyright © 2006-2024 Michael Scott Asato Cuthbert.
The music21 Framework is Copyright © 2006-2025 Michael Scott Asato Cuthbert.
Some Rights Reserved
Released under the BSD (3-clause) license. See license.txt.
Expand Down Expand Up @@ -52,7 +52,7 @@
If you have the wrong version there are several options for getting
the right one.
- 1. (Best) Upgrade to Python 3, latest (currently 3.12).
- 1. (Best) Upgrade to a recent version of Python 3 (such as 3.13).
The great features there will more
than make up for the headache of downloading
Expand All @@ -62,7 +62,9 @@
Try running "python3" instead of "python"
- 2. Upgrade pip and setuptools to the latest version
and then "upgrade" music21 to an earlier version.
and then use "upgrade" to downgrade music21 to
an earlier version.
For instance to install version 4 you'd run:
$ pip install --upgrade pip setuptools
Expand Down Expand Up @@ -122,7 +124,7 @@

# individual modules
# KEEP ALPHABETICAL unless necessary for load reasons, if so
# put a note. Keep one letter per line.
# put a note.

'articulations',
'bar',
Expand Down
6 changes: 3 additions & 3 deletions music21/common/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ class OffsetSpecial(StrEnum):
* New in v7.
'''
AT_END: str = 'highestTime'
LOWEST_OFFSET: str = 'lowestOffset'
HIGHEST_OFFSET: str = 'highestOffset'
AT_END = 'highestTime'
LOWEST_OFFSET = 'lowestOffset'
HIGHEST_OFFSET = 'highestOffset'


class GatherSpanners(BooleanEnum):
Expand Down
4 changes: 2 additions & 2 deletions music21/license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# distributed with this package, particularly the corpus files
# which have their own copyrights and licenses.
#
# Copyright: music21 is "Copyright © 2006-2024 Michael Scott Asato Cuthbert"
# Copyright: music21 is "Copyright © 2006-2025 Michael Scott Asato Cuthbert"
# and is open-source licensed under the
# BSD 3-Clause License (beginning with music21 v2.0)
# reprinted below.
Expand All @@ -22,7 +22,7 @@ the BSD license still under effect.
---
BSD License

Copyright (c) 2006-2024 Michael Scott Asato Cuthbert
Copyright (c) 2006-2025 Michael Scott Asato Cuthbert
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
20 changes: 16 additions & 4 deletions music21/romanText/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
from music21 import bar
from music21 import base
from music21 import common
from music21.common.types import OffsetQL
from music21 import environment
from music21 import exceptions21
from music21 import harmony
Expand Down Expand Up @@ -703,15 +704,21 @@ def translateSingleMeasure(self, measureToken):
m.coreElementsChanged()
return m

def translateSingleMeasureAtom(self, a, m, *, isLastAtomInMeasure=False):
def translateSingleMeasureAtom(
self,
a: rtObjects.RTAtom,
m: stream.Measure,
*,
isLastAtomInMeasure: bool = False,
) -> None:
'''
Translate a single atom in a measure token.
`a` is the Atom
`m` is a `stream.Measure` object.
Uses coreInsert and coreAppend methods, so must have `m.coreElementsChanged()`
called afterwards.
called afterward.
'''
if (isinstance(a, rtObjects.RTKey)
or (self.foundAKeySignatureSoFar is False
Expand Down Expand Up @@ -831,7 +838,12 @@ def translateSingleMeasureAtom(self, a, m, *, isLastAtomInMeasure=False):
m.coreInsert(self.currentOffsetInMeasure, rtt)
# environLocal.warn(f' Got an unknown token: {a}')

def processRTChord(self, a, m, currentOffset):
def processRTChord(
self,
a: rtObjects.RTChord,
m: stream.Measure,
currentOffset: OffsetQL
) -> None:
'''
Process a single RTChord atom.
'''
Expand Down Expand Up @@ -887,7 +899,7 @@ def processRTChord(self, a, m, currentOffset):
rn.followsKeyChange = False
except roman.RomanNumeralException: # pragma: no cover
# environLocal.printDebug(f' cannot create RN from: {a.src}')
rn = note.Note() # create placeholder
rn = roman.RomanNumeral() # create placeholder

if self.pivotChordPossible is False:
# probably best to find duration
Expand Down

0 comments on commit 851e674

Please sign in to comment.