This is an (almost) interactive project. This is an algorithm which generated a melody containing 100 notes. For more details, check the algorithm inside the project.
by @samuelvega