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

Setting melody/bass? #6

Open
xhevahir opened this issue Oct 27, 2021 · 1 comment
Open

Setting melody/bass? #6

xhevahir opened this issue Oct 27, 2021 · 1 comment

Comments

@xhevahir
Copy link

I'm wondering if one could set a fixed melody or bassline and generate a voice leading that's congruent with it. I was reading on the Google OR-Tools site about constraint programming problems but it's all Greek to me so far. Any ideas whether this is feasible?

@napulen
Copy link
Owner

napulen commented Oct 27, 2021

It is possible. I started by fixing the initial and last voicings (in a vertical way):

if i == 0 and firstVoicing:

It's all about constraining the number of combinations you can validate the rules against.

I don't see any reason why melodic constraints (on a horizontal way) couldn't also be included this way.

e.g., if my melodic line says the bass plays C4 in this chord, I prune all the combinations where the bass is C3 or C2, etc.

It's just a hassle to implement it the way I am doing it. Maybe there is a smart way of doing it, like the OR-Tools you suggest. I didn't know about these libraries, thank you for the reference.

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