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

Support end-of-line comments in scl files #76

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

narenratan
Copy link
Contributor

I ran into some scl files which use end-of-line comments on each ratio, for example septenariusGG49.scl from the Scala scale archive:

! septenariusGG49.scl
Sparschuh's version @ middle-c'=262Hz or a'=440Hz
12
!absolute pitches relativ to c=131 Hz
555/524 ! c# 138.75 Hz
147/131 ! d
156/131 ! eb
165/131 ! e
175/131 ! f
185/131 ! f#
196/131 ! g
208/131 ! g#
220/131 ! a 440Hz/2
234/131 ! bb
247/131 ! b
2/1

At the moment a . in the comment causes the line to be interpreted as a cent value, which can give unexpected results. For example for septenariusGG49.scl, the line 555/524 ! c# 138.75 Hz is currently given a cent value of 555.0 - I've attached a screenshot from the Surge tuning editor:
Screenshot 2024-12-29 at 22 56 41

The scl files in the Scala scale archive which give unexpected results for this reason are:

septenariusGG49.scl
sparschuh-442widefrench5th.scl
sparschuh-eleven_eyes.scl
sparschuh-eqbeat-fac_ceg.scl
sparschuh-gothic440.scl
sparschuh-oldpiano.scl
sparschuh-squiggle_harpsichord.scl
sparschuh-stanhope.scl
sparschuh-wohltemperiert.scl
sparschuh_53in13lim.scl
sparschuh_53tone5limit.scl
sparschuh_bach_cup.scl
sparschuh_dyadrat53.scl

There's also some cases from the tuning mailing list, for example here, here, and here.

I made a local tuning-library change to handle end-of-line comments so I thought I'd make a PR with it in case it's useful.

@baconpaul
Copy link
Collaborator

Oh fantastic, thanks!

@baconpaul baconpaul merged commit 2af06a1 into surge-synthesizer:main Dec 30, 2024
5 checks passed
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.

2 participants