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

Implement basic melody generation #16

Open
12 of 22 tasks
oubiwann opened this issue Aug 5, 2022 · 0 comments
Open
12 of 22 tasks

Implement basic melody generation #16

oubiwann opened this issue Aug 5, 2022 · 0 comments

Comments

@oubiwann
Copy link
Contributor

oubiwann commented Aug 5, 2022

Tasks, from page 82 of The Complete Musician, Fourth Edition:

  • Start on one member of the tonic triad (e.g, 1, 3, or 5)
  • End with the two-pitch pattern 2, 1 or 7, 1
  • Limit the total tonal range of the melody (span of pitches) to the interval of a 10th
  • Set most of the tonal activity in the range of a 6th
  • Move primarily by one step
  • Optionally, (less frequently) steps can be in thirds, fourths, or fifths
  • When doing such disjunct steps, do more thirds than the others
  • Limit larger jumps to be smaller than a perfect 5th
  • Don't make dissonant leaps
  • Don't leave tensions unresolved
  • After leaps, consider using a change in direction to fill in the tonal jump (the larger the jump, the more important this is)
  • Do not do multiple large jumps in a row
  • After doing two small jumps in a row (i.e., two jumps by thirds), change direction.
  • Avoid repeated notes and patterns
  • Aim for smooth and continuous shapes (ascending / descending patterns)

Bugs in implementation:

  • Length of melody is not always what is expected
  • The final note is not always the tonic
  • Notes are sometimes repeating, despite attempts to codify the prevention of this
  • Every once in a while, the generated melody gets an index error (when trying to lists:nth)
  • The initial scale length isn't getting extended to a 10th
  • Need to implement proper melody inversion
  • Need to end melody inversion on tonic
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