Skip to content
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

Other inversions of dominant 7ths #1358

Closed
malcolmsailor opened this issue Aug 6, 2022 · 2 comments
Closed

Other inversions of dominant 7ths #1358

malcolmsailor opened this issue Aug 6, 2022 · 2 comments

Comments

@malcolmsailor
Copy link
Contributor

music21 version

8.0.0a9

Problem summary

According to the docs, "Dominant 7ths can be specified by putting d7 at end". Naively, I expected "d43" to then be a dominant 7th in 43 position. It isn't, but we can get that with "43d7". Perhaps a note of clarification in the docs could be useful? Or just changing the behavior for "d43"?

Steps to reproduce

>>> from music21 import roman
>>> RN = roman.RomanNumeral
>>> RN("IV7").pitches
(<music21.pitch.Pitch F4>, <music21.pitch.Pitch A4>, <music21.pitch.Pitch C5>, <music21.pitch.Pitch E5>)
>>> RN("IVd7").pitches
(<music21.pitch.Pitch F4>, <music21.pitch.Pitch A4>, <music21.pitch.Pitch C5>, <music21.pitch.Pitch E-5>)
>>> RN("IV43").pitches
(<music21.pitch.Pitch C4>, <music21.pitch.Pitch E4>, <music21.pitch.Pitch F4>, <music21.pitch.Pitch A4>)
>>> RN("IVd43").pitches # I naively expected C-Eb-F-A
(<music21.pitch.Pitch C4>, <music21.pitch.Pitch E4>, <music21.pitch.Pitch F4>, <music21.pitch.Pitch A4>)
>>> RN("IV43d7").pitches # OK
(<music21.pitch.Pitch F4>, <music21.pitch.Pitch E-5>, <music21.pitch.Pitch A5>, <music21.pitch.Pitch B5>)
@malcolmsailor
Copy link
Contributor Author

Actually I just noticed that the last pitch of RN("IV43d7").pitches is B, which is not what I expected. So maybe there is no way to use "d" to change an inversion to a dominant 7th?

@malcolmsailor
Copy link
Contributor Author

It looks to me like this could be solved by matching patterns beyond "d7" here:

elif workingFigure.endswith('d7'):

A regex that matches d followed by the various 7th chord patterns (7, 65, 43, 42, 2... others?) should do it. I could implement this if you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant