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

Musical expectation #52

Open
oggy22 opened this issue Nov 13, 2018 · 2 comments
Open

Musical expectation #52

oggy22 opened this issue Nov 13, 2018 · 2 comments

Comments

@oggy22
Copy link
Owner

oggy22 commented Nov 13, 2018

Write an intelligent method that extends the tone sequence predicting its further development, or in other words, this method calculates the musical expectations.

For example given:
0,2,1,3 -> 2,4,3,5, etc. (C-E, D-F -> E-G, F-A, etc).
0,4,2,5 -> 4, 7, 5, 9 etc. (as above, but chromatically)
C,G,E,G,C,G, -> E,G, etc (Alberti bass)
E,D,E,C,E,B -> E,A,E,G#

Pseudo implementation (doesn't account for the last example where const tone is required)
Expectation(List seq)

for (int size = 1; size <= n-2; size++)
{
step = seq[size] - seq[0];
if (step applies for entire seq) return the extension;
}

@oggy22 oggy22 self-assigned this Nov 14, 2018
@oggy22 oggy22 removed their assignment Apr 9, 2019
@oggy22
Copy link
Owner Author

oggy22 commented Dec 24, 2022

Duplicate of #88

@oggy22 oggy22 marked this as a duplicate of #88 Dec 24, 2022
@oggy22
Copy link
Owner Author

oggy22 commented Dec 24, 2022

Duplicate of #88

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

1 participant