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

Custom scales or integer scales? #10

Open
DavidAPowers opened this issue Jun 8, 2018 · 3 comments
Open

Custom scales or integer scales? #10

DavidAPowers opened this issue Jun 8, 2018 · 3 comments

Comments

@DavidAPowers
Copy link

I know I could easily hack the scale list, but being able to use arbitrary scale would make this even more useful. For example, the augmented scale has another version [m2 3 4 aug5 6].

It would also be quite useful to be able to deal with pitches as integers, for example a 9 note scale [0 1 3 4 5 7 8 9 11]

I'm willing to contribute, if that's useful.

@jsrmath
Copy link
Owner

jsrmath commented Jun 10, 2018

Hi David,

Thanks for the feedback! I'm on vacation right now so can't look at this too extensively, but I like the idea of being able to load one's own scales. It gets tricky, because there are a couple of other things, like scale aliases and scale precedence, that are handled separately, so that all would need to be streamlined somehow to easily accommodate new scales.

There's also the issue of where these scales are declared. I think the best way to do it would be to have a function on the scale module withCustomScales that returns a new instance of the scale module to avoid having it be a mutation. Getting this right with everything else would be non-trivial. I might work on this at some point, but I'm not sure when. If you're feeling inspired and would like to give it a go, that would be great, but I tend to be a bit picky when it comes to stylistic things.

As for your second comment, the issue here is Sharp11 takes a very strict approach when it comes to spelling, so integer pitches don't fully specify a note. For example, from C is 6 an F# or a Gb?

@DavidAPowers
Copy link
Author

DavidAPowers commented Jun 10, 2018

Hi, regarding the second issue, from the point of view of doing more interesting theoretical operations on scales or harmonies, I would strongly suggest that you want a module that represents pitches as integers. And if you like a functional programming style a set or array of integers is quite easy to manipulate.
Such a module could be added to the codebase with an adapter to take string input, and that would enable a larger set of theoretical operations to be performed.
I understand this might not be of interest to you, but I was interested in doing some generative or computer assisted composition. If you did want to add some new functionality, I would be willing to help.

@jsrmath
Copy link
Owner

jsrmath commented Jun 18, 2018

There is certainly a lot to be done in the realm of generative composition using numerical pitch classes. Working that into the current Sharp11 ecosystem, which is geared towards Western/jazz music theory, would be possible but challenging. My suggestion would be this. If you find features of Sharp11 to be useful to you, include it in your project and develop on top of it. If you find yourself thinking that you've written modules that are well suited to being part of the core Sharp11 library and are interested in merging, we could talk then. You also might be interested in checking out sharp11-improv if you haven't already.

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