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

Curious behavior of "add#7" #1369

Closed
malcolmsailor opened this issue Aug 11, 2022 · 2 comments · Fixed by #1373
Closed

Curious behavior of "add#7" #1369

malcolmsailor opened this issue Aug 11, 2022 · 2 comments · Fixed by #1373

Comments

@malcolmsailor
Copy link
Contributor

music21 version

8.0.0a9

Problem summary

When using the add[] syntax with #7 to build RNs, we get the wrong bassnote.

Steps to reproduce

>>> from music21.roman import RomanNumeral as RN
>>> RN("IV[add#7]").bass() # expect F
<music21.pitch.Pitch E#4>

A similar thing happens with IV[add##7] and IV[add###7] but not with IV[add7]. And with iii[add##7] but not with iii[add#7]. Thus it seems to be an issue when the pitch-class of the raised 7th overlaps with the root.

Similar issue with

>>> RN("ii6[add#2]").bass()
<music21.pitch.Pitch E#4>

(I discovered this because believe it or not IV[add#7] occurs in the DCML ABC corpus)

@mscuthbert
Copy link
Member

Confirmed, real bug. And can confirm it's not because of implied key, etc.

Strangely, this works.

In [13]: RN('II[add###6]', 'C').pitches
Out[13]: 
(<music21.pitch.Pitch D4>,
 <music21.pitch.Pitch F#4>,
 <music21.pitch.Pitch A4>,
 <music21.pitch.Pitch B###4>)

but this does not:

In [14]: RN('V[add###6]', 'C').pitches
Out[14]: 
(<music21.pitch.Pitch E###4>,
 <music21.pitch.Pitch G4>,
 <music21.pitch.Pitch B4>,
 <music21.pitch.Pitch D5>)

apparently it's taking the octave from the bass, so it matters if the letter name is "above" the bass letter name (where "above" is measured in order C,D,E,F,G,A,B).

Strangely, also, adding flat notes takes good care to ensure that the bass is the implied bass:

In [22]: RN('V6[addbb4]', 'C').pitches
Out[22]: 
(<music21.pitch.Pitch B4>,
 <music21.pitch.Pitch D5>,
 <music21.pitch.Pitch G5>,
 <music21.pitch.Pitch C--6>)

In [23]: RN('vi6[addbb4]', 'C').pitches
Out[23]: 
(<music21.pitch.Pitch C4>,
 <music21.pitch.Pitch D--4>,
 <music21.pitch.Pitch E4>,
 <music21.pitch.Pitch A4>)

In [24]: RN('vi6[addbbb4]', 'C').pitches
Out[24]: 
(<music21.pitch.Pitch C4>,
 <music21.pitch.Pitch E4>,
 <music21.pitch.Pitch A4>,
 <music21.pitch.Pitch D---5>)

In [25]: RN('V6[addbbb4]', 'C').pitches
Out[25]: 
(<music21.pitch.Pitch B4>,
 <music21.pitch.Pitch D5>,
 <music21.pitch.Pitch G5>,
 <music21.pitch.Pitch C---6>)

@mscuthbert
Copy link
Member

Note that 'IV#7' works fine, which is probably how this chord should be written:

(<music21.pitch.Pitch F4>,
 <music21.pitch.Pitch A4>,
 <music21.pitch.Pitch C5>,
 <music21.pitch.Pitch E#5>)

mscuthbert added a commit that referenced this issue Aug 12, 2022
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

Successfully merging a pull request may close this issue.

2 participants