Fix malformed ratio in sparschuh-stanhope.scl - #2003
Open
float3 wants to merge 1 commit into
Open
Conversation
Degree 8 is written `697//441`, with a doubled slash. No Scala parser can
read it: the file is unparseable from that line on.
The intended value is unambiguous. The comment on the same line documents
the degree as (128/81) * (6273/6272), and that product is exactly 697/441:
128 * 6273 = 802944
81 * 6272 = 508032
802944 / 508032 = 697/441 (both divide by 1152)
It is also consistent with the file's own arithmetic — 6273/6272 is
+0.276 cents, as the comment states — and it sits correctly between its
neighbours 3/2 (1.5) and 82/49 (1.6735) at 1.5805.
This changes one character and preserves the column alignment of the
surrounding degrees. No other file in the archive contains a doubled
slash.
Note that music21 still cannot parse this file after the fix, for an
unrelated reason: ScalaData.parse only skips lines that *start* with `!`
and does not strip trailing inline `!` comments, which every degree line
here carries. That is a separate parser issue, not a data one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Degree 8 is written
697//441, with a doubled slash. No Scala parser can read it: the file is unparseable from that line on.This changes one character and preserves the column alignment of the surrounding degrees. No other file in the archive contains a doubled slash.
Note that music21 still cannot parse this file after the fix, for an unrelated reason: ScalaData.parse only skips lines that start with
!and does not strip trailing inline!comments.