Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Jamming with Genetic Algorithms

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
752 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Dec 11, 2008

Notes:

* The genetic algorithm is used to evolve chords.
* I'm a terrible drummer.

* http://mingus.googlecode.com/

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:
see all

All Comments (10)

Sign In or Sign Up now to post a comment!
  • What I'm getting at is that a chord is made up out of more than one frequency, so how would you make that work. Should you still solve for 0 or should you just compare on a per note basis? Maybe it would be easier to have a fitness function that just counts thirds and fifths.

  • but if you graphed out:

    y = sin(x) + sin(x*1.4173759), it would take many, many revolutions for both sin functions to equal 0.

  • Well, the point of this kind of genetic algorithm, where fitness is determined by the harmony of the chord, the point would be to have good-sounding chords randomly generated as if the computer was the composer. But I suppose intervention would be possible, as genetic algorithms are flexible.

  • err, i made a mistake:

    If you graphed this out, sin(x) AND sin(x*1.5) would both equal zero when X is 0, 3, 6, 12 and so on*

  • I am guessing that because you are a programmer that you know what sin() and cos() do.

    Well, imagine this formula:

    y = sin(x) + sin(x * 1.5)

    If you graphed this out, y would equal 0 when X is 0, 3, 6, 12, and so on (assuming sin(1) meant one whole revolution, like sin(360 degrees) or sin(pi * 2))

  • It sounds interesting, but how would you get the fitness for for instance D, E, F when you are looking for C, E, G?

  • Imagine frequencies and harmony as something like planets orbiting around the sun. If planet A orbits the sun 1.5 times sun then planet B, it will take planet A 3 revolutions for planet B to make 2 revolutions, and after that point you would be back where you originally were. However, if the ratio was something like 2:5.5123 rather than 2:3, it would take much longer for the planets to meet up again at the same point they originally were.

  • Okay, I see.

    However, I have something I want you to try:

    Have fitness be determined by the amount of time it would take for the chord to reach a repetition point in the waveform. A harmonious chord is one where the waveform comes to a repetition sooner than a non-harmonious chord, relative to the same note. For example: C sounds harmonious when played with a G, because they are fifths, meaning that mathematically G is 1.5 times the wavelength of C. .....

  • You are understanding correctly that this is not an algorithm that finds _some_ chord, because a lot of random notes make up some kind of exotic chord so that GA would be done in 1 or 2 generations and thus not so interesting.

    I was more interested in the semi chaotic process that you could play against when you know what chord you are looking for. It introduces variations.

    It's evolving from a random collection of notes to the one you 'want' and plays the best chord in every generation.

  • Perhaps I am not fully understanding the terms you are using, but if you can use a function to determine the next set of chords, why use a genetic algorithm to find it?

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more