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

Scale::name returns the full pathname of the scale #41

Open
modosc opened this issue Jun 1, 2021 · 2 comments
Open

Scale::name returns the full pathname of the scale #41

modosc opened this issue Jun 1, 2021 · 2 comments

Comments

@modosc
Copy link

modosc commented Jun 1, 2021

from here i expected scale.name to be the name from the .scl comment:
https://github.com/surge-synthesizer/tuning-library/blob/main/include/Tunings.h#L92

but it's actually the full path name to the file when you're parsing a file:
https://github.com/surge-synthesizer/tuning-library/blob/main/include/TuningsImpl.h#L177

is this expected? if not i'm happy to put a pr together to fix it. thanks!

@baconpaul
Copy link
Collaborator

Pretty sure that's expected. The .scl comment appears in scale.description (or should).

SECTION( "Properly read a file with DOS line endings" )

@baconpaul
Copy link
Collaborator

Oh I see what you mean. You mean the convention that the filename is in the first comment line to be parsed.
Right.
So we can add that but it is different than the name (which is the actual file name nor the purported one). Add a feature like 'firstCommentLineName' or some such and store it on the object would be a great change though!
From most of the scl files I've seen that convention is not very reliable but agree it would be nice to expose.

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