Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411430 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 19, 2024, 05:08:04 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsGimmicky - random music to level design generation
Pages: [1]
Print
Author Topic: Gimmicky - random music to level design generation  (Read 1361 times)
necromian
Level 2
**

ʘ_ʘ


View Profile WWW
« on: November 06, 2010, 08:02:23 PM »



So I made a little experimental game in gm7. You play as a little man. As he runs to the right, platforms are spawned. The platforms spawned correspond to a randomly generated song (in the pentatonic scale of course). For example, if the melody increases in pitch, depending on how much the pitch increases, a platform will be spawned that is higher than the previous one. The length of the platforms depends on the sustained length of the notes. I made some lo-fi retro filters so that it's more interesting to look at.

Move with arrow keys, jump with up. Press spacebar to toggle surface effects, press enter to double game speed (music sounds cooler that way). If you just want to hear the music, fall in a hole and hold right.

Download it here - http://www.mediafire.com/?ba1ti6ryj4n1ygd
Logged
mokesmoe
Level 10
*****



View Profile WWW
« Reply #1 on: November 06, 2010, 10:17:06 PM »

Spacebar should remove the horizontal lines too, as they look really bad without the effects.

The music sounds really good! It sounds like I'm listening to an actual song. In fact, I fell off and held right while switching windows so right would be stuck on and the music would play while I do other stuff. (Using double speed)
Logged
tesselode
Level 5
*****



View Profile WWW
« Reply #2 on: November 07, 2010, 05:50:52 AM »

I must agree that the music sounds like actual music. It's a nice idea, the only problem is it's hard to tell that the height and length of the platforms actually goes with the music. I'm not sure how you would make it so that it isn't, though.
Logged
necromian
Level 2
**

ʘ_ʘ


View Profile WWW
« Reply #3 on: November 07, 2010, 03:33:18 PM »

I must agree that the music sounds like actual music. It's a nice idea, the only problem is it's hard to tell that the height and length of the platforms actually goes with the music. I'm not sure how you would make it so that it isn't, though.
You're right, most people won't notice the correlation between platforms and notes. Oh well.
Logged
Doktor_Q
Level 2
**



View Profile
« Reply #4 on: November 07, 2010, 03:51:51 PM »

So, how did you do the music generation, anyway? I would be very interested in the formulas.
Logged
necromian
Level 2
**

ʘ_ʘ


View Profile WWW
« Reply #5 on: November 07, 2010, 03:59:00 PM »

So, how did you do the music generation, anyway? I would be very interested in the formulas.
It's actually not very complicated.

The drum is a simple 1/5 beat.

A rhythm for the melody is generated. When the beat is at a certain point, the rhythm will tell the melody to change a tone or two up or down in the pentatonic scale.

The bassline alternates playing between 1,9 beats, 1,5,9 beats, and 1,3,5,9 beats. The notes that it plays alternates between the inverse of the main melody an octave lower, or a random note in the pentatonic scale an octave lower than the melody.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic