-
Notifications
You must be signed in to change notification settings - Fork 14
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
Allow common music notation chord names #50
base: master
Are you sure you want to change the base?
Conversation
…in index.js instead.
@@ -20,9 +19,15 @@ | |||
"engines": { | |||
"node": ">=8" | |||
}, | |||
"keywords": ["music", "utility", "audio"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Prettier went wild here and changed the formatting. 🙈
Thanks for the PR :) I think it might make sense to use the Airbnb code style guide here.
What do you think @enjikaka? |
reference here https://github.com/airbnb/javascript#naming--uppercase |
I don't feel strongly for the casing differences. So I'm not sure what is best in this case. 🤔 Would a lot of stuff break if we changed to |
I see your point, that would probably also mean we would have to change the intervals / scales etc for consistency. I wasn't thinking about the case where you are just importing a specific chord type. |
Had another thought about it, and how would you feel if we did it a bit more explicit like Interval for now. (not generating the object and spreading it). To maximize tree shaking and splitting all code should be statically analyzable. I would love to look into using some codegen method to create the export files before build. Looked into this but never got it to work 😞 Does that make sense? I really appreciate your efforts. |
@duivvv I changed to that now! 👍 Did notice there are 4 flow errors related to intervals though. But maybe you're on to them? |
I'm trying something out with babel-plugin-codegen in a different branch, will tag you there when I open the PR so we can discuss it. I might be on to something that would make it easy to maintain, allow for static exports and make it easy to add aliases (what we're trying to achieve in this PR I guess) |
It would have the same result as above + the advantage of having all chords centralized in 1 file. |
This rewrites the specification of chords to allow for more names than the constant. For example: maj7, dim etc. This is to easier extend with more special chords later like: 7b9, dim7, 7s9 etc without having awkwardly long constant names.