-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
romanText parser assumes fast 3/8 #1185
Comments
Hi, thanks for the note. In version 7, the default interpretation of 3/8 changed to assume one dotted-quarter beat, not 3 eighth note beats. This is mentioned here, but I don't see that we added it to the release notes. >>> ts = meter.TimeSignature('3/8')
>>> ts.beatCount
1
>>> ts = meter.TimeSignature('slow 3/8')
>>> ts.beatCount
3 I skimmed the Romantext spec, and it looks silent on this point. This, though, does work on v7: >>> content = """Time signature: 3/8
... m1 C: I b1.66 V
... """
>>> music21.converter.parse(content, format="romanText").show() |
@MarkGotham any thoughts here? Should the RomanText converter assume 3/8 is compound single or simple triple? |
Hi, thanks for your response! It's surprising to me that a meter with "3" in the numerator would default to having 1 beat. I think of meters with numerators of 3 to be simple, and only meters with numerators n * 3 where n > 1 to be compound. Presumably music21 assumes 3/4 and 3/2 have 3 beats each? It's certainly your prerogative to have your library understand 3/8 as you see fit, but I can't be the only musician that understands meter conventions in this way, so maybe it would be worth adding a warning when using 3/8 (or 3/16?) if the user does not explicitly specify "fast" or "slow"? All that said, what I would really like to know is if there is a way for me to parse this file. Can I explicitly specify the default interpretation of 3/8 as "slow" to the parser somehow? |
Sure, it's Python so you can patch anything at runtime ;) import music21
class TimeSigSubClass(music21.meter.TimeSignature):
def __init__(self, value: str = '4/4', divisions=None): # I copied the signature
if value == '3/8':
value = 'slow 3/8' # hack it in
super().__init__(value, divisions=divisions)
music21.meter.TimeSignature = TimeSigSubClass
content = """Time signature: 3/8
m1 C: I b3 V
"""
music21.converter.parse(content, format="romanText") |
Certainly I'm partial to ensuring the when-in-rome files can be processed by music21 without any hassle!
I didn't propose or merge the changes in question, but I think intuition could cut either way. In contemporary music 3/16 is almost exclusively a 1-beat meter, and 3/8 also, usually, in my experience. Even a 3/4 scherzo in Beethoven can be a 1-beat meter, although that would be a crummy default. In The Rhythm Book, Rory Stuart writes for a jazz/contemporary music audience: "the dotted-quarter note pulse we feel, whether the meter is 3/8, 6/8, 9/8 ..." |
Since Roman numeral analysis is not very useful in those genres, that's a good argument for defaulting to slow 3/8 in the RomanText parser. |
I agree that the intuition for 3/8 could go either way, depending on the musician. Hence my suggestion of a warning if "slow" or "fast" is not specified. Also agree that it would be good for the RomanText parser to be compatible by default with the When-in-Rome corpus, since these will presumably often be used together. But in the meantime, thanks for the suggested hack! |
After investigating some more it seems that only some analyses in the When-in-Rome corpus assume slow 3/8 (e.g., |
Thanks for this. I've checked and romanText accepts
Thanks again. |
Thanks for the quick work, Mark; it's good to know the when-in-rome corpus is now compatible with v7.
I'll keep count for anybody raising this in future. If somebody felt strongly about proposing those changes I suppose they could try to get consensus developed through the mailing list.
I think that's clear in music21; the reporter mentioned the original paper, and I didn't know how willing you'd be to change the files, so that's why I was posing the questions :-)
I'm not entirely opposed to that, but a couple things come to mind.
If anyone wants to propose a warning for "naked" 3/8 or 3/16's in a PR I'm happy to have another look, but I think there's greater ROI in just cleaning up the way music21 warns generally before adding one-off warnings for specific ambiguous musical situations (see #254). Thanks again @malcolmsailor for bringing the original ambiguity to attention! |
No, we will not be adding a general warning for creating/parsing a 3/8 time signature without specifying beats. Many people parse files for other reasons and don't use beats at all, and we'd be gumming up people's usage. I could be open to having a warning for 3/8 for RomanText specifically. Though there's usually a better way: scan through the rest of the RomanText file and see if the string " b2 " exists -- if it does assume that 3/8 is slow 3/8. -- that would fix it for most (except for cases where the TS changes later) The decision to make music21's default for 3/8 be 1-beat was made pretty recently, and I think there was a pretty compelling reason for the change, though it escapes me. I just looked up the RT specification (which of course Mark + I contributed to writing) and it's unfortunately ambiguous on this point. And the specification does not allow for things like "slow" or "fast" so music21's parser won't be loading it, unless the specification changes (and we add a version to it, etc.) FWIW -- I wanted the specification to always use 6-beat 6/8, etc. because I hate parsing 1.66.5 etc. but that's where it went. |
music21 version
7.1.0
Problem summary
The romanText parser raises an exception on this file from the When-in-Rome corpus.
The exception is
music21.romanText.translate.RomanTextTranslateException: too many notes in this measure: m83 i b3 bVI
The time signature is 3/8. If I understand the Romantext format correctly, beat 3 should be the third 8th note of the measure, thus the exception is unexpected.
Steps to reproduce
Here is a minimal example to reproduce the bug
The text was updated successfully, but these errors were encountered: