Abjad / abjad

Abjad is a Python API for building LilyPond files. Use Abjad to make PDFs of music notation.
https://abjad.github.io
GNU General Public License v3.0
234 stars 41 forks source link

WIP: C flat does not work properly in relative mode #1488

Closed jgarte closed 1 year ago

jgarte commented 1 year ago

Closes #1471

This is my hacky attempt for now to get that particular input to do the right thing but I haven't tested against all possible inputs to see if I've introduced a bug now somewhere else.

My thinking at the moment is to not go into the first if branch when pitch.pitch_class.number > reference.pitch_class.number and the reference.pitch_class.number is in the following list [9]. I realize this might only fix one edge case and introduce others...

@trevorbaca

Were you thinking of a different conceptual logic to fix this?

Feel free to work on this if you'd like to fix the bug sooner as I might not be able to try again until next weekend.

trevorbaca commented 1 year ago

Hi @jgarte please add a test or two to show the functionality that's fixed.

jgarte commented 1 year ago

@trevorbaca Should I create a new test file or add it to an existing test file?

trevorbaca commented 1 year ago

@jgarte any news on adding tests for this?

You can the tests wherever you want. Note that there's an abjad/tests/test_LilyPondParser__functions__relative.py file that contains these sort of things already. If you use that file, add your new test(s) to the bottom of the file.