Closed rubencart closed 7 months ago
Think this error might be related. In biab-internet-corpus_1015.jams
. bb1
is supposed to mean two semitones down from the root, but the library seems to interpret 1
as an interval of 1 (semitones?) up from the root?
Harte('D#:(3,5,b7)/bb1')
Traceback (most recent call last):
File "/cw/liir_code/NoCsBack/rubenc/miniconda3/envs/harmonyenv/lib/python3.12/site-packages/IPython/core/interactiveshell.py", line 3553, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-1-3f6292ada5aa>", line 1, in <module>
Harte('D#:(3,5,b7)/bb1')
File "/cw/liir_code/NoCsBack/rubenc/miniconda3/envs/harmonyenv/lib/python3.12/site-packages/harte/harte.py", line 95, in __init__
HarteInterval(x, octave=4).transposeNote(m21_root)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cw/liir_code/NoCsBack/rubenc/miniconda3/envs/harmonyenv/lib/python3.12/site-packages/harte/interval.py", line 34, in __init__
super().__init__(self._converted_interval, **keywords)
File "/cw/liir_code/NoCsBack/rubenc/miniconda3/envs/harmonyenv/lib/python3.12/site-packages/music21/interval.py", line 3054, in __init__
diatonicNew, chromaticNew, inferred = _stringToDiatonicChromatic(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cw/liir_code/NoCsBack/rubenc/miniconda3/envs/harmonyenv/lib/python3.12/site-packages/music21/interval.py", line 2597, in _stringToDiatonicChromatic
gInterval = GenericInterval(genericNumber)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/cw/liir_code/NoCsBack/rubenc/miniconda3/envs/harmonyenv/lib/python3.12/site-packages/music21/interval.py", line 892, in __init__
self.value = convertGeneric(value)
^^^^^^^^^^
File "/cw/liir_code/NoCsBack/rubenc/miniconda3/envs/harmonyenv/lib/python3.12/site-packages/music21/interval.py", line 945, in value
raise IntervalException('The Zeroth is not an interval')
music21.interval.IntervalException: The Zeroth is not an interval
This unexpected behaviour was caused by a bug in the convert_interval
function, that was solved in 858d28350fd7676d40a894fc050fb5d6c9fd6930.
Furthermore, for preventing this type of bugs in the future, pytests for intervals were implemented in 33ec15949dce8d8bfc0c1fb4a51edb7e88f1c6fc.
Finally, the latter error was fixed in d3f771b7164e09c945315716587a854b8610eefc.
All these fixes will be pushed in the next release of the library (0.4.5
).
Nice thanks!
I might be wrong, and I don't know this chord, but I don't see where the
C##3
comes from? Shouldn't the/b1
in the bass becomeC4
as first pitch? The chord occurs inbiab-internet-corpus_1004.jams
in the ChoCo dataset.