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

Fix #1689: Make _dissonanceScore independent of octaves #1690

Closed
wants to merge 2 commits into from

Conversation

TimFelixBeyer
Copy link
Contributor

@TimFelixBeyer TimFelixBeyer commented Feb 27, 2024

Fixes #1689 where the spelling of a pitch was dependent on its octave.
This was a result of the _dissonanceScore computing Pythagorean ratios between the keyContext (which contributes a Pitch without Octave), and the given pitches. Now, the ratios are always computed between Pitches without Octaves to ensure correct scoring.

Adds a regression test and code simplifications as well.

Also incorporates new pylint recommendations about using min/max and yield from.

Fixes cuthbertLab#1689 where the spelling of a pitch was dependent on its octave.
Pylint now recommends using `yield from` and the use of `min/max` to simplify if statements.
@coveralls
Copy link

Coverage Status

coverage: 93.031% (+0.001%) from 93.03%
when pulling 67657d3 on TimFelixBeyer:patch-12
into 0927e39 on cuthbertLab:master.

@jacobtylerwalls
Copy link
Member

Hey @TimFelixBeyer would you mind cherry-picking the lint fixes into a separate PR? Thanks!

@TimFelixBeyer
Copy link
Contributor Author

Done!

@TimFelixBeyer TimFelixBeyer deleted the patch-12 branch March 3, 2024 23:19
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 this pull request may close these issues.

simplifyMultipleEnharmonics gives different spellings in different octaves
3 participants