Dynamically Generating Music

I have a requirement to have some "sort of" music in a flash swf file,

Now the fun part: in total I have about 2k filesize to play with!

My suggested solution is to have 8 notes saved as midi (total about 1k)
These are played through javascript in the web page, called from the flash file,
the flash will need to generate an appropriate sequence to call the notes to sound like some sort of music.

*Ideally* the music would be able to speed up and slow down depending on other factors in the flash...

Obviously I can compromise on some of the factors with this ;-)
(number of notes, speed variations etc, but not on the filesize available!)

Rather than store 8 note samples (of which only 1 can be played at any time in most embedded java implementations), store 5 chord samples arranged as per the pentatonic scale (type "pentatonic scale" into google if you've got no idea what I'm on about.)

As I presume you are going to have a fixed event timer for performing your basic game loop - and if you put the "music" (loosely defined) at the start of the loop, you should get a reasonable consistent timeframe.

this would give you the ability to have "randomish" "music" that is guaranteed to sound at least half decent.

You don't need to use the pentatonic scale, but unless you have a music background whereby you understand the concepts of progression, major and minor scales etc etc, then it's a lot easier to use the pentatonic system.

Sorry for the complete lack of response for ages on this - work unfortunatly has called me away from this for the time being - but the answer seems to make sense and looks like it'll work so here you are!

Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain. A* is a particularly easy way to approach it. I’ll start with the algor…

As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough. To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…

In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB.
To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…