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

pitch with no accidental is different from pitch with natural accidental #10

Open
reeceyang opened this issue May 2, 2023 · 3 comments

Comments

@reeceyang
Copy link
Collaborator

for example, a <music21.pitch.Pitch C5> with accidental <music21.pitch.Accidental natural> does not equal a <music21.pitch.Pitch C5> with accidental None.

fixing this might require updating the subclasses (maybe when parsing the musicxml, if a pitch has a natural accidental then set the accidental to None instead)

there might be a similar issue with enharmonic notes.

@NamelessChamber
Copy link
Collaborator

Hmm, if I understand you correctly we actually want those two pitches to show up differently because a pitch with a natural sign is going to be one of those extra pitches outside of the normal behavior of the makam.

@reeceyang
Copy link
Collaborator Author

I found this in the music21 documentation:

Screen Shot 2023-05-09 at 4 24 09 PM

Pitches should contain information about what absolute pitch they are, so a B note in Bb major would have a pitch with a 'flat' accidental. The issue comes from when we have a F pitch with an accidental of None and a F pitch with a 'natural' accidental—these are supposed to be the same pitch.

@reeceyang
Copy link
Collaborator Author

I've overrided xmlToPitch to OttomanMusicMeasureParser to convert all natural accidentals to None (this happens at the end of the function and is indicated with a comment). This is definitely a band-aid fix, so I'm leaving this issue open.

xmlToPitch is also the function where we would want to add in microtone parsing.

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

2 participants